FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
Unit test for event operations. More...
Go to the source code of this file.
Functions | |
event_loop_t * | event_loop_get () |
void | sample_event (scheduler_t *scheduler, void *args) |
Sample event. More... | |
void | other_event (void *args) |
Sample event 2. More... | |
void | sample_callback (scheduler_t *scheduler) |
Sample callback function. More... | |
void | terminate_event (void *args) |
Terminate event. More... | |
void | test_event_loop_get () |
Test for event_loop_get() More... | |
void | test_event_init () |
Test for event_init() More... | |
void | test_event_signal_ext () |
Test for event_signal_ext() More... | |
void | test_event_signal () |
Test for event_signal() More... | |
void | test_event_loop_enter () |
Test for event_loop_enter() More... | |
void | test_event_loop_terminate () |
Test for event_loop_enter() with terminate_event. More... | |
void | test_event_loop_take () |
Test for event_loop_take() More... | |
void | test_event_loop_put () |
Test for event_loop_put() More... | |
Variables | |
struct event_loop_internal | vl_singleton |
int | el_created |
void * | sample_args |
Sample args to pass. | |
int | call_num |
Number of callback calls. | |
int | samp_num |
Number of sample event calls. | |
char * | s_name = NULL |
Sample source file name. | |
uint16_t | s_line = 0 |
Sample source line number. | |
CU_TestInfo | tests_event [] |
Unit test for event operations.
Definition in file testEvent.c.
event_loop_t* event_loop_get | ( | ) |
There is only one instance of an event loop in any program. This function will control access to that event loop. If the event loop hasn't been created yet, it will create and return the event loop. If it has been created, this function will simple return it to the caller. This first call to this function should be made from the thread that will be running the event loop.
This is to prevent confusion on if the event loop has been created.
void other_event | ( | void * | args | ) |
void sample_callback | ( | scheduler_t * | scheduler | ) |
Sample callback function.
Increases call_num on every call
Definition at line 55 of file testEvent.c.
void sample_event | ( | scheduler_t * | scheduler, |
void * | args | ||
) |
void terminate_event | ( | void * | args | ) |
void test_event_init | ( | ) |
Test for event_init()
Definition at line 108 of file testEvent.c.
void test_event_loop_enter | ( | ) |
Test for event_loop_enter()
Definition at line 189 of file testEvent.c.
void test_event_loop_get | ( | ) |
Test for event_loop_get()
Definition at line 83 of file testEvent.c.
void test_event_loop_put | ( | ) |
Test for event_loop_put()
Definition at line 328 of file testEvent.c.
void test_event_loop_take | ( | ) |
Test for event_loop_take()
Definition at line 302 of file testEvent.c.
void test_event_loop_terminate | ( | ) |
Test for event_loop_enter() with terminate_event.
0x0
Definition at line 274 of file testEvent.c.
void test_event_signal | ( | ) |
Test for event_signal()
"sample_event"
and have proper function and argument assigned Definition at line 162 of file testEvent.c.
void test_event_signal_ext | ( | ) |
Test for event_signal_ext()
Definition at line 133 of file testEvent.c.
|
extern |
CU_TestInfo tests_event[] |
Definition at line 352 of file testEvent.c.