[Kernel] Add signal implementation.

1. Add signal implementation;
2. Change the 'rt_uint8_t' of cmd to 'int';
This commit is contained in:
bernard
2017-10-15 22:31:53 +08:00
parent cd215b2545
commit b27c7e4826
11 changed files with 479 additions and 34 deletions
+12 -2
View File
@@ -108,13 +108,23 @@ void rt_tick_increase(void)
* This function will calculate the tick from millisecond.
*
* @param ms the specified millisecond
* - Negative Number wait forever
* - Zero not wait
* - Max 0x7fffffff
*
* @return the calculated tick
*/
rt_tick_t rt_tick_from_millisecond(rt_uint32_t ms)
int rt_tick_from_millisecond(rt_int32_t ms)
{
int tick;
if (ms < 0)
tick = RT_WAITING_FOREVER;
else
tick = (RT_TICK_PER_SECOND * ms + 999) / 1000;
/* return the calculated tick */
return (RT_TICK_PER_SECOND * ms + 999) / 1000;
return tick;
}
RTM_EXPORT(rt_tick_from_millisecond);