The POSIX threads platform.
More...
|
#define | EWF_PLATFORM_THREAD_STATIC_DECLARE(thread_ptr, thread_name_symb, thread_function_ptr_param, thread_function_data_param, stack_size_param, thread_priority_param) |
|
#define | EWF_PLATFORM_MUTEX_STATIC_DECLARE(mutex_ptr, mutex_name_symb) |
|
#define | EWF_PLATFORM_QUEUE_STATIC_DECLARE(queue_ptr, queue_name_symb, item_type, item_count) |
| Declare statically a queue for the platform and initialize its data. More...
|
|
The POSIX threads platform.
◆ EWF_PLATFORM_MUTEX_STATIC_DECLARE
#define EWF_PLATFORM_MUTEX_STATIC_DECLARE |
( |
|
mutex_ptr, |
|
|
|
mutex_name_symb |
|
) |
| |
Value:do { \
static ewf_platform_mutex ewf_platform_mutex__##mutex_name_symb = {0}; \
mutex_ptr = &(ewf_platform_mutex__##mutex_name_symb); \
} while(0)
◆ EWF_PLATFORM_QUEUE_STATIC_DECLARE
#define EWF_PLATFORM_QUEUE_STATIC_DECLARE |
( |
|
queue_ptr, |
|
|
|
queue_name_symb, |
|
|
|
item_type, |
|
|
|
item_count |
|
) |
| |
Value:do { \
static item_type ewf_platform_queue__data__##queue_name_symb[item_count]; \
ewf_platform_queue__##queue_name_symb.data = ewf_platform_queue__data__##queue_name_symb; \
ewf_platform_queue__##queue_name_symb.item_size = sizeof(item_type); \
ewf_platform_queue__##queue_name_symb.queue_size = item_count; \
ewf_platform_queue__##queue_name_symb.tail_index = 0; \
ewf_platform_queue__##queue_name_symb.used_count = 0; \
queue_ptr = &(ewf_platform_queue__##queue_name_symb); \
} while(0)
Declare statically a queue for the platform and initialize its data.
- Parameters
-
[in,out] | queue_ptr | a pointer to a _ewf_platform_queue structure that will be made to point to the statically declared queue |
[in] | queue_name_symb | a symbol that will be used to uniquely declare and name the queue |
[in] | item_type | type queue item type |
[in] | item_count | the maximum number item the queue can contain |
◆ EWF_PLATFORM_THREAD_STATIC_DECLARE
#define EWF_PLATFORM_THREAD_STATIC_DECLARE |
( |
|
thread_ptr, |
|
|
|
thread_name_symb, |
|
|
|
thread_function_ptr_param, |
|
|
|
thread_function_data_param, |
|
|
|
stack_size_param, |
|
|
|
thread_priority_param |
|
) |
| |
Value:do { \
static ewf_platform_thread__##thread_name_symb = {0}; \
ewf_platform_pthread__##thread_name_symb.thread_function_ptr = thread_function_ptr_param; \
ewf_platform_pthread__##thread_name_symb.thread_function_data = thread_function_data_param; \
ewf_platform_pthread__##thread_name_symb.stacksize = stack_size_param; \
ewf_platform_pthread__##thread_name_symb.prio = thread_priority_param; \
thread_ptr = &(ewf_platform_pthread__##thread_name_symb); \
} while(0)