diff --git a/src/ipc.c b/src/ipc.c index 058d6c2a3..0105b1dc0 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -469,6 +469,8 @@ rt_err_t rt_sem_control(rt_sem_t sem, rt_uint8_t cmd, void *arg) /* enable interrupt */ rt_hw_interrupt_enable(level); + rt_schedule(); + return RT_EOK; } @@ -1153,6 +1155,8 @@ rt_err_t rt_event_control(rt_event_t event, rt_uint8_t cmd, void *arg) /* enable interrupt */ rt_hw_interrupt_enable(level); + rt_schedule(); + return RT_EOK; } @@ -1597,7 +1601,6 @@ rt_err_t rt_mb_control(rt_mailbox_t mb, rt_uint8_t cmd, void *arg) /* resume all waiting thread */ rt_ipc_list_resume_all(&(mb->parent.suspend_thread)); - /* also resume all mailbox private suspended thread */ rt_ipc_list_resume_all(&(mb->suspend_sender_thread)); @@ -1609,6 +1612,8 @@ rt_err_t rt_mb_control(rt_mailbox_t mb, rt_uint8_t cmd, void *arg) /* enable interrupt */ rt_hw_interrupt_enable(level); + rt_schedule(); + return RT_EOK; } @@ -2144,6 +2149,8 @@ rt_err_t rt_mq_control(rt_mq_t mq, rt_uint8_t cmd, void *arg) /* enable interrupt */ rt_hw_interrupt_enable(level); + rt_schedule(); + return RT_EOK; } diff --git a/src/kservice.c b/src/kservice.c index 2a6733b14..694cc735f 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -20,6 +20,9 @@ #include #include +/* use precision */ +#define RT_PRINTF_PRECISION + /** * @addtogroup KernelService */ @@ -754,11 +757,11 @@ static rt_int32_t vsnprintf(char *buf, rt_size_t size, const char *fmt, va_list #endif /* get the conversion qualifier */ qualifier = 0; - if (*fmt == 'h' || *fmt == 'l' #ifdef RT_PRINTF_LONGLONG - || *fmt == 'L' + if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') +#else + if (*fmt == 'h' || *fmt == 'l') #endif - ) { qualifier = *fmt; ++ fmt;