mirror of https://github.com/ARMmbed/mbed-os.git
rtos: fix coding style in the boot files
parent
9238bf223f
commit
87265f7744
|
@ -113,7 +113,8 @@ static osThreadId_t os_libspace_id[OS_THREAD_LIBSPACE_NUM] \
|
|||
__attribute__((section(".bss.os.libspace")));
|
||||
|
||||
// Check if Kernel has been started
|
||||
static uint32_t os_kernel_is_active (void) {
|
||||
static uint32_t os_kernel_is_active(void)
|
||||
{
|
||||
static uint8_t os_kernel_active = 0U;
|
||||
|
||||
if (os_kernel_active == 0U) {
|
||||
|
@ -125,7 +126,8 @@ static uint32_t os_kernel_is_active (void) {
|
|||
}
|
||||
|
||||
// Provide libspace for current thread
|
||||
void *__user_perthread_libspace (void) {
|
||||
void *__user_perthread_libspace(void)
|
||||
{
|
||||
osThreadId_t id;
|
||||
uint32_t n;
|
||||
|
||||
|
@ -218,21 +220,24 @@ __USED int _mutex_initialize(mutex *m)
|
|||
}
|
||||
|
||||
/* Acquire mutex */
|
||||
__USED void _mutex_acquire(mutex *m) {
|
||||
__USED void _mutex_acquire(mutex *m)
|
||||
{
|
||||
if (os_kernel_is_active() != 0U) {
|
||||
(void)osMutexAcquire(*m, osWaitForever);
|
||||
}
|
||||
}
|
||||
|
||||
/* Release mutex */
|
||||
__USED void _mutex_release(mutex *m) {
|
||||
__USED void _mutex_release(mutex *m)
|
||||
{
|
||||
if (os_kernel_is_active() != 0U) {
|
||||
(void)osMutexRelease(*m);
|
||||
}
|
||||
}
|
||||
|
||||
/* Free mutex */
|
||||
__USED void _mutex_free(mutex *m) {
|
||||
__USED void _mutex_free(mutex *m)
|
||||
{
|
||||
mutex *slot = NULL;
|
||||
core_util_critical_section_enter();
|
||||
for (int i = 0; i < OS_MUTEX_STATIC_NUM; i++) {
|
||||
|
|
|
@ -86,7 +86,8 @@ void mbed_toolchain_init()
|
|||
}
|
||||
|
||||
extern int __real_main(void);
|
||||
int __wrap_main(void) {
|
||||
int __wrap_main(void)
|
||||
{
|
||||
/* For backwards compatibility */
|
||||
return __real_main();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue