API Summary

Tasks
ctl_task_die Terminate the executing task
ctl_task_init Create the initial task
ctl_task_remove Remove a task from the task list
ctl_task_reschedule Cause a reschedule
ctl_task_restore Put back a task on to the task list
ctl_task_run Start a task
ctl_task_set_priority Set the priority of a task
Timer
ctl_get_current_time Atomically return the current time
ctl_increment_tick_from_isr Increment tick timer
ctl_timeout_wait Wait until timeout has occurred
Event sets
ctl_events_init Initialize an event set
ctl_events_pulse Pulse events in an event set
ctl_events_set_clear Set and clear events in an event set
ctl_events_wait Wait for events in an event set
Semaphores
ctl_semaphore_init Initialize a semaphore
ctl_semaphore_signal Signal a semaphore
ctl_semaphore_wait Wait for a semaphore
Message queues
ctl_message_queue_init Initialize a message queue
ctl_message_queue_num_free Return number of free elements in a message queue
ctl_message_queue_num_used Return number of used elements in a message queue
ctl_message_queue_post Post message to a message queue
ctl_message_queue_post_multi Post messages to a message queue
ctl_message_queue_post_multi_nb Post messages to a message queue without blocking
ctl_message_queue_post_nb Post message to a message queue without blocking
ctl_message_queue_receive Receive message from a message queue
ctl_message_queue_receive_multi Receive messages from a message queue
ctl_message_queue_receive_multi_nb Receive messages from a message queue without blocking
ctl_message_queue_receive_nb Receive message from a message queue without blocking
ctl_message_queue_setup_events Associate events with the not-full and not-empty state of a message queue
Bytes queues
ctl_byte_queue_init Initialize a byte queue
ctl_byte_queue_num_free Return number of free bytes in a byte queue
ctl_byte_queue_num_used Return number of used bytes in a byte queue
ctl_byte_queue_post Post byte to a byte queue
ctl_byte_queue_post_multi Post bytes to a byte queue
ctl_byte_queue_post_multi_nb Post bytes to a byte queue without blocking
ctl_byte_queue_post_nb Post byte to a byte queue without blocking
ctl_byte_queue_receive Receive a byte from a byte queue
ctl_byte_queue_receive_multi Receive multiple bytes from a byte queue
ctl_byte_queue_receive_multi_nb Receive multiple bytes from a byte queue without blocking
ctl_byte_queue_receive_nb Receive a byte from a byte queue without blocking
ctl_byte_queue_setup_events Associate events with the not-full and not-empty state of a byte queue
Mutexes
ctl_mutex_init Initialize a mutex
ctl_mutex_lock Lock a mutex
ctl_mutex_unlock Unlock a mutex
Interrupts
ctl_global_interrupts_disable Disable global interrupts
ctl_global_interrupts_enable Enable global interrupts
ctl_global_interrupts_set Enable/disable interrupts
Error handling
ctl_handle_error Handle a CTL error condition
Memory areas
ctl_memory_area_allocate Allocate a block from a memory area
ctl_memory_area_free Free a memory area block
ctl_memory_area_init Initialize a memory area
ctl_memory_area_setup_events Set memory area events
Types
CTL_BYTE_QUEUE_t Byte queue struct definition
CTL_ERROR_CODE_t Error cause
CTL_EVENT_SET_t Event set definition
CTL_EVENT_WAIT_TYPE_t Event set wait types
CTL_MEMORY_AREA_t Memory area struct definition
CTL_MESSAGE_QUEUE_t Message queue struct definition
CTL_MUTEX_t Mutex struct definition
CTL_SEMAPHORE_t Semaphore definition
CTL_STATE_t Task states
CTL_TASK_t Task struct definition
CTL_TIMEOUT_t Type of wait
CTL_TIME_t Time definition
System state variables
ctl_current_time The current time in ticks
ctl_interrupt_count Nested interrupt count
ctl_last_schedule_time The time (in ticks) of the last task schedule
ctl_reschedule_on_last_isr_exit Reschedule is required on last ISR exit
ctl_task_executing The task that is currently executing
ctl_task_list List of tasks sorted by priority
ctl_task_switch_callout A function pointer called on a task switch
ctl_time_increment Current time tick increment
ctl_timeslice_period Time slice period in ticks