Research Article

Embedded Microprocessor Extension Design and Optimization for Real-Time Edge Computing

Table 4

Thread management module interface.

Interface nameCMSIS interface functionInterface implementation in this article

osThreadNew()Create the threadThe thread control block is set by parameters.
osThreadGetName()Get thread nameReturns the thread name string
osThreadGetId()Get thread identifierReturns the thread control block pointer of the corresponding thread
osThreadGetState()Get thread statusReturn thread status
osThreadGetStackSize()Get thread stack sizeReturns the thread stack size in the thread control block
osThreadGetStackSpace()Get stack free spaceCalled by the current thread to return the stack space
osThreadSetPriority()Set thread prioritySet thread priority. 2 priorities, corresponding to HRTT/SRTT, are supported
osThreadGetPriority()Get thread priorityReturn thread priority
osThreadSuspend()Suspend the threadModify CSR_tmode, changes the thread state to suspend
osThreadResume()Wake up the threadModify CSR_tmode, changes the thread state to active
osThreadDetach()Set the properties to detachedModify the detached attribute in the thread control block
osThreadJoin()Wait for the child thread to exitCheck the thread control block of the child to see if it exits
osThreadExit()Exit the threadExit current thread and enter the looping sleep state
osThreadTerminate()Terminate the threadMake a thread sleep, but cannot change its control flow
osThreadGetCount()Get the number of active threadsReturns the number of currently active threads
osThreadEnumerate()Gets the active thread identifiersReturns an array of currently active thread identifiers
osDelay()Thread sleeps for a periodUsing set_compare and delay_until instruction to implement the semantics
osDelayUntil()Thread sleeps to a point in timeUsing set_compare and delay_until instruction to implement the semantics