90 FO_ASSERT_PTR_EQUAL(vl, vl_addr);
92 FO_ASSERT_PTR_NOT_NULL(vl->
queue);
98 FO_ASSERT_PTR_EQUAL(ol, vl_addr);
99 FO_ASSERT_PTR_EQUAL(vl, ol);
121 FO_ASSERT_STRING_EQUAL(e->
name,
"sample");
148 FO_ASSERT_STRING_EQUAL(e->
name,
"sample");
176 FO_ASSERT_STRING_EQUAL(e->
name,
"sample_event");
200 event_signal(NULL, NULL);
204 FO_ASSERT_EQUAL(retval, 0x0);
213 FO_ASSERT_EQUAL(retval, 0x0);
222 FO_ASSERT_EQUAL(retval, 0x0);
240 FO_ASSERT_EQUAL(retval, 0x0);
258 FO_ASSERT_EQUAL(retval, 0x0);
287 FO_ASSERT_EQUAL(retval, 0x0);
314 FO_ASSERT_PTR_NULL(retval);
342 FO_ASSERT_STRING_EQUAL(e->
name,
"sample_event");
352 CU_TestInfo tests_event[] =
int event_loop_put(event_loop_t *event_loop, event_t *e)
void event_loop_terminate()
Stops the event loop from executing.
void event_signal_ext(void *func, void *args, char *name, char *s_name, uint16_t s_line)
event_t * event_loop_take(event_loop_t *event_loop)
int event_loop_enter(scheduler_t *scheduler, void(*update_call)(scheduler_t *), void(*signal_call)(scheduler_t *))
Enters the event loop.
event_t * event_init(void(*func)(scheduler_t *, void *), void *arg, char *name, char *source_name, uint16_t source_line)
Event handling operations.
void scheduler_agent_config(scheduler_t *scheduler)
Loads a particular agents configuration file.
scheduler_t * scheduler_init(gchar *sysconfigdir, log_t *log)
Create a new scheduler object.
void scheduler_foss_config(scheduler_t *scheduler)
Loads the configuration data from fossology.conf.
void scheduler_destroy(scheduler_t *scheduler)
Free any memory associated with a scheduler_t.
GAsyncQueue * queue
The queue that is the core of the event loop.
int terminated
Flag that signals the end of the event loop.
int occupied
Does this loop already have a worker thread.
char * name
Name of the event, used for debugging.
void(* func)(scheduler_t *, void *)
The function that will be executed for this event.
void * argument
The arguments for the function.
struct event_loop_internal vl_singleton
void test_event_init()
Test for event_init()
void test_event_loop_put()
Test for event_loop_put()
void test_event_signal()
Test for event_signal()
event_loop_t * event_loop_get()
void test_event_loop_terminate()
Test for event_loop_enter() with terminate_event.
void sample_callback(scheduler_t *scheduler)
Sample callback function.
void test_event_loop_enter()
Test for event_loop_enter()
int samp_num
Number of sample event calls.
char * s_name
Sample source file name.
void sample_event(scheduler_t *scheduler, void *args)
Sample event.
int call_num
Number of callback calls.
void * sample_args
Sample args to pass.
void other_event(void *args)
Sample event 2.
void test_event_signal_ext()
Test for event_signal_ext()
void test_event_loop_take()
Test for event_loop_take()
uint16_t s_line
Sample source line number.
void terminate_event(void *args)
Terminate event.
void test_event_loop_get()
Test for event_loop_get()