RTOS Service calls

osThreadId osThreadCreate (osThreadDef_t *thread_def, void *argument);
osThreadId osThreadGetId (void);
osStatus osThreadTerminate (osThreadId thread_id);
osStatus osThreadYield (void);
osStatus osThreadSetPriority (osThreadId thread_id, osPriority priority);
osPriority osThreadGetPriority (osThreadId thread_id);
osStatus osDelay (uint32_t millisec);
os_InRegs osEvent osWait (uint32_t millisec);

osTimerId osTimerCreate (osTimerDef_t *timer_def, os_timer_type type, void *argument);
osStatus osTimerStart (osTimerId timer_id, uint32_t millisec);
osStatus osTimerStop (osTimerId timer_id);

int32_t osSignalSet (osThreadId thread_id, int32_t signal);
int32_t osSignalClear (osThreadId thread_id, int32_t signal);
int32_t osSignalGet (osThreadId thread_id);
os_InRegs osEvent osSignalWait (int32_t signals, uint32_t millisec);

osMutexId osMutexCreate (osMutexDef_t *mutex_def);
osStatus osMutexWait (osMutexId mutex_id, uint32_t millisec);
osStatus osMutexRelease (osMutexId mutex_id);

osSemaphoreId osSemaphoreCreate (osSemaphoreDef_t *semaphore_def, int32_t count);
int32_t osSemaphoreWait (osSemaphoreId semaphore_id, uint32_t millisec);
osStatus osSemaphoreRelease (osSemaphoreId semaphore_id);

osPoolId osPoolCreate (osPoolDef_t *pool_def);
void *osPoolAlloc (osPoolId pool_id);
void *osPoolCAlloc (osPoolId pool_id);
osStatus osPoolFree (osPoolId pool_id, void *block);

osMessageQId osMessageCreate (osMessageQDef_t *queue_def, osThreadId thread_id);
osStatus osMessagePut (osMessageQId queue_id, uint32_t info, uint32_t millisec);
os_InRegs osEvent osMessageGet (osMessageQId queue_id, uint32_t millisec);

osMailQId osMailCreate (osMailQDef_t *queue_def, osThreadId thread_id);
void *osMailAlloc (osMailQId queue_id, uint32_t millisec);
void *osMailCAlloc (osMailQId queue_id, uint32_t millisec);
osStatus osMailPut (osMailQId queue_id, void *mail);
os_InRegs osEvent osMailGet (osMailQId queue_id, uint32_t millisec);
osStatus osMailFree (osMailQId queue_id, void *mail);

extern void sysThreadError(osStatus status);


Please log in to post comments.