Lines Matching refs:guix_event_queue
135 GUIX_EVENT_QUEUE guix_event_queue; variable
148 guix_event_queue.first = GX_NULL; in gx_generic_rtos_initialize()
149 guix_event_queue.last = GX_NULL; in gx_generic_rtos_initialize()
150 guix_event_queue.free = guix_event_array; in gx_generic_rtos_initialize()
152 current = guix_event_queue.free; in gx_generic_rtos_initialize()
161 guix_event_queue.free_end = current; in gx_generic_rtos_initialize()
164 OSMutexCreate(&guix_event_queue.lock, "gx_queue_lock", &uc_error); in gx_generic_rtos_initialize()
167 OSSemCreate(&guix_event_queue.count_sem, "gx_queue_count", 0, &uc_error); in gx_generic_rtos_initialize()
218 OSMutexPend(&guix_event_queue.lock, 0, OS_OPT_PEND_BLOCKING, NULL, &uc_error); in gx_generic_event_post()
221 if (!guix_event_queue.free) in gx_generic_event_post()
224 OSMutexPost(&guix_event_queue.lock, OS_OPT_POST_NONE, &uc_error); in gx_generic_event_post()
228 linked_event = guix_event_queue.free; in gx_generic_event_post()
229 guix_event_queue.free = guix_event_queue.free->next; in gx_generic_event_post()
231 if (!guix_event_queue.free) in gx_generic_event_post()
233 guix_event_queue.free_end = GX_NULL; in gx_generic_event_post()
241 if (guix_event_queue.last) in gx_generic_event_post()
243 guix_event_queue.last -> next = linked_event; in gx_generic_event_post()
247 guix_event_queue.first = linked_event; in gx_generic_event_post()
249 guix_event_queue.last = linked_event; in gx_generic_event_post()
252 OSMutexPost(&guix_event_queue.lock, OS_OPT_POST_NONE, &uc_error); in gx_generic_event_post()
255 OSSemPost(&guix_event_queue.count_sem, OS_OPT_POST_ALL, &uc_error); in gx_generic_event_post()
266 OSMutexPend(&guix_event_queue.lock, 0, OS_OPT_PEND_BLOCKING, NULL, &uc_error); in gx_generic_event_fold()
269 pTest = guix_event_queue.first; in gx_generic_event_fold()
277 OSMutexPost(&guix_event_queue.lock, OS_OPT_POST_NONE, &uc_error); in gx_generic_event_fold()
285 OSMutexPost(&guix_event_queue.lock, OS_OPT_POST_NONE, &uc_error); in gx_generic_event_fold()
296 if (guix_event_queue.first == GX_NULL) in gx_generic_event_pop()
304 OSSemPend(&guix_event_queue.count_sem, 0, OS_OPT_PEND_BLOCKING, NULL, &uc_error); in gx_generic_event_pop()
307 OSMutexPend(&guix_event_queue.lock, 0, OS_OPT_PEND_BLOCKING, NULL, &uc_error); in gx_generic_event_pop()
310 *put_event = guix_event_queue.first -> event_data; in gx_generic_event_pop()
313 if (guix_event_queue.free_end) in gx_generic_event_pop()
315 guix_event_queue.free_end -> next = guix_event_queue.first; in gx_generic_event_pop()
319 guix_event_queue.free = guix_event_queue.first; in gx_generic_event_pop()
322 guix_event_queue.free_end = guix_event_queue.first; in gx_generic_event_pop()
323 guix_event_queue.first = guix_event_queue.first -> next; in gx_generic_event_pop()
324 guix_event_queue.free_end -> next = GX_NULL; in gx_generic_event_pop()
326 if (!guix_event_queue.first) in gx_generic_event_pop()
328 guix_event_queue.last = GX_NULL; in gx_generic_event_pop()
338 OSMutexPost(&guix_event_queue.lock, OS_OPT_POST_NONE, &uc_error); in gx_generic_event_pop()
350 OSMutexPend(&guix_event_queue.lock, 0, OS_OPT_PEND_BLOCKING, NULL, &uc_error); in gx_generic_event_purge()
353 pTest = guix_event_queue.first; in gx_generic_event_purge()
378 OSMutexPost(&guix_event_queue.lock, OS_OPT_POST_NONE, &uc_error); in gx_generic_event_purge()
495 GUIX_EVENT_QUEUE guix_event_queue; variable
508 guix_event_queue.first = GX_NULL; in gx_generic_rtos_initialize()
509 guix_event_queue.last = GX_NULL; in gx_generic_rtos_initialize()
510 guix_event_queue.free = guix_event_array; in gx_generic_rtos_initialize()
512 current = guix_event_queue.free; in gx_generic_rtos_initialize()
521 guix_event_queue.free_end = current; in gx_generic_rtos_initialize()
524 guix_event_queue.lock_sem = OSSemCreate(1); in gx_generic_rtos_initialize()
527 guix_event_queue.count_sem = OSSemCreate(0); in gx_generic_rtos_initialize()
565 OSSemPend(guix_event_queue.lock_sem, 0, &guix_uc_err); in gx_generic_event_post()
568 if (!guix_event_queue.free) in gx_generic_event_post()
571 OSSemPost(guix_event_queue.lock_sem); in gx_generic_event_post()
575 linked_event = guix_event_queue.free; in gx_generic_event_post()
576 guix_event_queue.free = guix_event_queue.free->next; in gx_generic_event_post()
578 if (!guix_event_queue.free) in gx_generic_event_post()
580 guix_event_queue.free_end = GX_NULL; in gx_generic_event_post()
588 if (guix_event_queue.last) in gx_generic_event_post()
590 guix_event_queue.last -> next = linked_event; in gx_generic_event_post()
594 guix_event_queue.first = linked_event; in gx_generic_event_post()
596 guix_event_queue.last = linked_event; in gx_generic_event_post()
599 OSSemPost(guix_event_queue.lock_sem); in gx_generic_event_post()
602 OSSemPost(guix_event_queue.count_sem); in gx_generic_event_post()
613 OSSemPend(guix_event_queue.lock_sem, 0, &guix_uc_err); in gx_generic_event_fold()
616 pTest = guix_event_queue.first; in gx_generic_event_fold()
624 OSSemPost(guix_event_queue.lock_sem); in gx_generic_event_fold()
632 OSSemPost(guix_event_queue.lock_sem); in gx_generic_event_fold()
643 if (guix_event_queue.first == GX_NULL) in gx_generic_event_pop()
646 OSSemPost(guix_event_queue.lock_sem); in gx_generic_event_pop()
652 OSSemPend(guix_event_queue.count_sem, 0, &guix_uc_err); in gx_generic_event_pop()
655 OSSemPend(guix_event_queue.lock_sem, 0, &guix_uc_err); in gx_generic_event_pop()
658 *put_event = guix_event_queue.first -> event_data; in gx_generic_event_pop()
661 if (guix_event_queue.free_end) in gx_generic_event_pop()
663 guix_event_queue.free_end -> next = guix_event_queue.first; in gx_generic_event_pop()
667 guix_event_queue.free = guix_event_queue.first; in gx_generic_event_pop()
670 guix_event_queue.free_end = guix_event_queue.first; in gx_generic_event_pop()
671 guix_event_queue.first = guix_event_queue.first -> next; in gx_generic_event_pop()
672 guix_event_queue.free_end -> next = GX_NULL; in gx_generic_event_pop()
674 if (!guix_event_queue.first) in gx_generic_event_pop()
676 guix_event_queue.last = GX_NULL; in gx_generic_event_pop()
686 OSSemPost(guix_event_queue.lock_sem); in gx_generic_event_pop()
698 OSSemPend(guix_event_queue.lock_sem, 0, &guix_uc_err); in gx_generic_event_purge()
701 pTest = guix_event_queue.first; in gx_generic_event_purge()
726 OSSemPost(guix_event_queue.lock_sem); in gx_generic_event_purge()