101 FO_ASSERT_PTR_EQUAL(vl, vl_addr);
103 FO_ASSERT_PTR_NOT_NULL(vl->
queue);
109 FO_ASSERT_PTR_EQUAL(ol, vl_addr);
110 FO_ASSERT_PTR_EQUAL(vl, ol);
132 FO_ASSERT_STRING_EQUAL(e->
name,
"sample");
159 FO_ASSERT_STRING_EQUAL(e->
name,
"sample");
187 FO_ASSERT_STRING_EQUAL(e->
name,
"sample_event");
211 event_signal(NULL, NULL);
215 FO_ASSERT_EQUAL(retval, 0x0);
224 FO_ASSERT_EQUAL(retval, 0x0);
233 FO_ASSERT_EQUAL(retval, 0x0);
251 FO_ASSERT_EQUAL(retval, 0x0);
269 FO_ASSERT_EQUAL(retval, 0x0);
298 FO_ASSERT_EQUAL(retval, 0x0);
325 FO_ASSERT_PTR_NULL(retval);
353 FO_ASSERT_STRING_EQUAL(e->
name,
"sample_event");
363 CU_TestInfo tests_event[] =
int event_loop_put(event_loop_t *event_loop, event_t *e)
void sample_callback(scheduler_t *scheduler)
Sample callback function.
void other_event(void *args)
Sample event 2.
void terminate_event(void *args)
Terminate event.
void test_event_loop_put()
Test for event_loop_put()
char * name
Name of the event, used for debugging.
void scheduler_destroy(scheduler_t *scheduler)
Free any memory associated with a scheduler_t.
int occupied
Does this loop already have a worker thread.
void * sample_args
Sample args to pass.
event_t * event_init(void(*func)(scheduler_t *, void *), void *arg, char *name, char *source_name, uint16_t source_line)
void test_event_loop_enter()
Test for event_loop_enter()
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)
uint16_t s_line
Sample source line number.
void sample_event(scheduler_t *scheduler, void *args)
Sample event.
event_t * event_loop_take(event_loop_t *event_loop)
int call_num
Number of callback calls.
void * argument
The arguments for the function.
void test_event_signal_ext()
Test for event_signal_ext()
void(* func)(scheduler_t *, void *)
The function that will be executed for this event.
void test_event_loop_terminate()
Test for event_loop_enter() with terminate_event.
void test_event_init()
Test for event_init()
event_loop_t * event_loop_get()
void scheduler_agent_config(scheduler_t *scheduler)
Loads a particular agents configuration file.
void scheduler_foss_config(scheduler_t *scheduler)
Loads the configuration data from fossology.conf.
struct event_loop_internal vl_singleton
void test_event_signal()
Test for event_signal()
scheduler_t * scheduler_init(gchar *sysconfigdir, log_t *log)
Create a new scheduler object.
void test_event_loop_get()
Test for event_loop_get()
int samp_num
Number of sample event calls.
Event handling operations.
GAsyncQueue * queue
The queue that is the core of the event loop.
char * s_name
Sample source file name.
void test_event_loop_take()
Test for event_loop_take()
int terminated
Flag that signals the end of the event loop.
int event_loop_enter(scheduler_t *scheduler, void(*update_call)(scheduler_t *), void(*signal_call)(scheduler_t *))
Enters the event loop.