Go to the documentation of this file.
30 #define TRACE_LEVEL TRACE_LEVEL_OFF
40 static TX_INTERRUPT_SAVE_AREA
59 _tx_initialize_low_level();
90 if(params->
tcb != NULL && params->
stack != NULL)
93 status = tx_thread_create(params->
tcb, (CHAR *)
name,
99 if(status == TX_SUCCESS)
127 tx_thread_delete((TX_THREAD *) taskId);
150 tx_thread_relinquish();
188 status = tx_event_flags_create(event,
"EVENT");
191 if(status == TX_SUCCESS)
210 if(event->tx_event_flags_group_id == TX_EVENT_FLAGS_ID)
213 tx_event_flags_delete(event);
226 tx_event_flags_set(event, 1, TX_OR);
240 tx_event_flags_get(event, 1, TX_AND_CLEAR, &actualFlags, 0);
262 status = tx_event_flags_get(event, 1, TX_OR_CLEAR, &actualFlags,
268 status = tx_event_flags_get(event, 1, TX_OR_CLEAR, &actualFlags,
273 if(status == TX_SUCCESS)
294 tx_event_flags_set(event, 1, TX_OR);
315 status = tx_semaphore_create(semaphore,
"SEMAPHORE", count);
318 if(status == TX_SUCCESS)
337 if(semaphore->tx_semaphore_id == TX_SEMAPHORE_ID)
340 tx_semaphore_delete(semaphore);
361 status = tx_semaphore_get(semaphore, TX_WAIT_FOREVER);
370 if(status == TX_SUCCESS)
389 tx_semaphore_put(semaphore);
405 status = tx_mutex_create(mutex,
"MUTEX", TX_NO_INHERIT);
408 if(status == TX_SUCCESS)
427 if(mutex->tx_mutex_id == TX_MUTEX_ID)
430 tx_mutex_delete(mutex);
443 tx_mutex_get(mutex, TX_WAIT_FOREVER);
469 time = tx_time_get();
496 size, (uintptr_t)
p);
514 TRACE_DEBUG(
"Freeing memory at 0x%08" PRIXPTR
"\r\n", (uintptr_t)
p);
void osSuspendAllTasks(void)
Suspend scheduler activity.
void osResetEvent(OsEvent *event)
Set the specified event object to the nonsignaled state.
#define OS_INVALID_TASK_ID
VOID(* OsTaskFunction)(ULONG param)
Task function.
RTOS abstraction layer (Eclipse ThreadX)
void osStartKernel(void)
Start kernel.
void osAcquireMutex(OsMutex *mutex)
Acquire ownership of the specified mutex object.
void osDeleteSemaphore(OsSemaphore *semaphore)
Delete a semaphore object.
void osDeleteEvent(OsEvent *event)
Delete an event object.
void osInitKernel(void)
Kernel initialization.
void(* OsTaskCode)(void *arg)
Task routine.
void osReleaseSemaphore(OsSemaphore *semaphore)
Release the specified semaphore object.
void osDeleteTask(OsTaskId taskId)
Delete a task.
__weak_func void osFreeMem(void *p)
Release a previously allocated memory block.
__weak_func void * osAllocMem(size_t size)
Allocate a memory block.
#define OS_SYSTICKS_TO_MS(n)
bool_t osSetEventFromIsr(OsEvent *event)
Set an event object to the signaled state from an interrupt service routine.
const OsTaskParameters OS_TASK_DEFAULT_PARAMS
bool_t osWaitForSemaphore(OsSemaphore *semaphore, systime_t timeout)
Wait for the specified semaphore to be available.
bool_t osCreateEvent(OsEvent *event)
Create an event object.
#define OS_MS_TO_SYSTICKS(n)
bool_t osWaitForEvent(OsEvent *event, systime_t timeout)
Wait until the specified event is in the signaled state.
bool_t osCreateMutex(OsMutex *mutex)
Create a mutex object.
uint32_t systime_t
System time.
void osResumeAllTasks(void)
Resume scheduler activity.
systime_t osGetSystemTime(void)
Retrieve system time.
void osDelayTask(systime_t delay)
Delay routine.
void osDeleteMutex(OsMutex *mutex)
Delete a mutex object.
OsTaskId osCreateTask(const char_t *name, OsTaskCode taskCode, void *arg, const OsTaskParameters *params)
Create a task.
void osReleaseMutex(OsMutex *mutex)
Release ownership of the specified mutex object.
thread_t * OsTaskId
Task identifier.
bool_t osCreateSemaphore(OsSemaphore *semaphore, uint_t count)
Create a semaphore object.
void osSwitchTask(void)
Yield control to the next task.
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.