From 3168deaa10fae157b38a94c5204a66d28a43ad7a Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 22 Jan 2008 18:28:53 +0000 Subject: 2008-01-22 Joel Sherrill * rtems/include/rtems/rtems/event.h, rtems/inline/rtems/rtems/eventset.inl, rtems/src/event.c, rtems/src/eventseize.c, rtems/src/eventsurrender.c, rtems/src/eventtimeout.c, score/Makefile.am, score/preinstall.am, score/include/rtems/score/interr.h, score/include/rtems/score/thread.h, score/include/rtems/score/threadq.h, score/include/rtems/score/tqdata.h, score/inline/rtems/score/threadq.inl, score/inline/rtems/score/tqdata.inl, score/src/threadq.c, score/src/threadqdequeue.c, score/src/threadqdequeuefifo.c, score/src/threadqdequeuepriority.c, score/src/threadqenqueue.c, score/src/threadqenqueuefifo.c, score/src/threadqenqueuepriority.c, score/src/threadqextract.c, score/src/threadqextractfifo.c, score/src/threadqextractpriority.c, score/src/threadqextractwithproxy.c, score/src/threadqfirst.c, score/src/threadqfirstfifo.c, score/src/threadqfirstpriority.c, score/src/threadqflush.c, score/src/threadqrequeue.c, score/src/threadqtimeout.c: Refactor thread queue enqueue and event blocking synchronization critical sections. This resulted in three copies of essentially the same hard to test critical section code becoming the one shared routine _Thread_blocking_operation_Cancel. In addition, the thread queue and event code now share a common synchronization enumerated type. Along the way, switches were reworked to eliminate dead code generated by gcc and comments and copyrights were updated. * score/include/rtems/score/threadsync.h, score/src/threadblockingoperationcancel.c: New files. --- cpukit/rtems/include/rtems/rtems/event.h | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'cpukit/rtems/include') diff --git a/cpukit/rtems/include/rtems/rtems/event.h b/cpukit/rtems/include/rtems/rtems/event.h index 4d2b4513fe..68687af31e 100644 --- a/cpukit/rtems/include/rtems/rtems/event.h +++ b/cpukit/rtems/include/rtems/rtems/event.h @@ -13,7 +13,7 @@ * + receive event condition * * - * COPYRIGHT (c) 1989-2007. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -39,6 +39,7 @@ extern "C" { #include #include #include +#include #include #include @@ -49,18 +50,6 @@ extern "C" { #define EVENT_CURRENT 0 -/* - * The following enumerated types indicate what happened while the event - * manager was in the synchronization window. - */ - -typedef enum { - EVENT_SYNC_SYNCHRONIZED, - EVENT_SYNC_NOTHING_HAPPENED, - EVENT_SYNC_TIMEOUT, - EVENT_SYNC_SATISFIED -} Event_Sync_states; - /* * Event_Manager_initialization * @@ -166,7 +155,7 @@ void _Event_Timeout ( * executing thread are received properly. */ -RTEMS_EVENT_EXTERN volatile Event_Sync_states _Event_Sync_state; +RTEMS_EVENT_EXTERN volatile Thread_blocking_operation_States _Event_Sync_state; #if defined(RTEMS_MULTIPROCESSING) #include -- cgit v1.2.3