RTEMS CPU Kit with SuperCore  4.11.3
eventimpl.h
Go to the documentation of this file.
1 
9 /* COPYRIGHT (c) 1989-2008.
10  * On-Line Applications Research Corporation (OAR).
11  *
12  * The license and distribution terms for this file may be
13  * found in the file LICENSE in this distribution or at
14  * http://www.rtems.org/license/LICENSE.
15  */
16 
17 #ifndef _RTEMS_RTEMS_EVENTIMPL_H
18 #define _RTEMS_RTEMS_EVENTIMPL_H
19 
20 #include <rtems/rtems/event.h>
21 #include <rtems/score/thread.h>
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
39 #define EVENT_CURRENT 0
40 
45 #define EVENT_SETS_NONE_PENDING 0
46 
58 
59 void _Event_Seize(
60  rtems_event_set event_in,
61  rtems_option option_set,
62  rtems_interval ticks,
63  rtems_event_set *event_out,
64  Thread_Control *executing,
65  Event_Control *event,
66  Thread_Wait_flags wait_class,
67  States_Control block_state,
68  ISR_lock_Context *lock_context
69 );
70 
71 void _Event_Surrender(
72  Thread_Control *the_thread,
73  rtems_event_set event_in,
74  Event_Control *event,
75  Thread_Wait_flags wait_class,
76  ISR_lock_Context *lock_context
77 );
78 
82 void _Event_Timeout(
83  Objects_Id id,
84  void *arg
85 );
86 
87 RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event )
88 {
89  event->pending_events = EVENT_SETS_NONE_PENDING;
90 }
91 
99  rtems_event_set the_event_set
100 )
101 {
102  return ( the_event_set == 0 );
103 }
104 
112  rtems_event_set the_new_events,
113  rtems_event_set *the_event_set
114 )
115 {
116  *the_event_set |= the_new_events;
117 }
118 
126  rtems_event_set the_event_set,
127  rtems_event_set the_event_condition
128 )
129 {
130  return ( the_event_set & the_event_condition );
131 }
132 
140  rtems_event_set the_event_set,
141  rtems_event_set the_mask
142 )
143 {
144  return ( the_event_set & ~(the_mask) );
145 }
146 
149 #ifdef __cplusplus
150 }
151 #endif
152 
153 #if defined(RTEMS_MULTIPROCESSING)
154 #include <rtems/rtems/eventmp.h>
155 #endif
156 
157 #endif
158 /* end of include file */
RTEMS_INLINE_ROUTINE void _Event_sets_Post(rtems_event_set the_new_events, rtems_event_set *the_event_set)
Posts the given new_events into the event_set passed in.
Definition: eventimpl.h:111
#define RTEMS_INLINE_ROUTINE
The following (in conjunction with compiler arguments) are used to choose between the use of static i...
Definition: basedefs.h:135
Definition: event.h:510
#define EVENT_SETS_NONE_PENDING
The following constant is the value of an event set which has no events pending.
Definition: eventimpl.h:45
void _Event_Manager_initialization(void)
Event Manager Initialization.
Definition: event.c:23
Constants and Structures Related with the Thread Control Block.
Watchdog_Interval rtems_interval
Used to manage and manipulate intervals specified by clock ticks.
Definition: types.h:119
This structure defines the Thread Control Block (TCB).
Definition: thread.h:671
uint32_t rtems_event_set
Integer type to hold an event set of up to 32 events represented as a bit field.
Definition: event.h:51
RTEMS_INLINE_ROUTINE bool _Event_sets_Is_empty(rtems_event_set the_event_set)
Checks if on events are posted in the event_set.
Definition: eventimpl.h:98
uint32_t rtems_option
The following type defines the control block used to manage option sets.
Definition: options.h:45
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(rtems_event_set the_event_set, rtems_event_set the_mask)
Removes the events in mask from the event_set passed in.
Definition: eventimpl.h:139
uint32_t States_Control
The following type defines the control block used to manage a thread&#39;s state.
Definition: states.h:41
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(rtems_event_set the_event_set, rtems_event_set the_event_condition)
Returns the events in event_condition that are set in event_set.
Definition: eventimpl.h:125
uint32_t Objects_Id
The following type defines the control block used to manage object IDs.
Definition: object.h:122
void _Event_Timeout(Objects_Id id, void *arg)
Timeout Event.
unsigned int Thread_Wait_flags
This type is able to contain several flags used to control the wait class and state of a thread...
Definition: thread.h:277