OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [rtems/] [inline/] [rtems/] [rtems/] [eventset.inl] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  inline/eventset.inl
2
 *
3
 *  This include file contains the information pertaining to event sets.
4
 *
5
 *  COPYRIGHT (c) 1989-1999.
6
 *  On-Line Applications Research Corporation (OAR).
7
 *
8
 *  The license and distribution terms for this file may be
9
 *  found in the file LICENSE in this distribution or at
10
 *  http://www.OARcorp.com/rtems/license.html.
11
 *
12
 *  $Id: eventset.inl,v 1.2 2001-09-27 11:59:18 chris Exp $
13
 */
14
 
15
#ifndef __INLINE_EVENT_SET_inl
16
#define __INLINE_EVENT_SET_inl
17
 
18
/*PAGE
19
 *
20
 *  _Event_sets_Is_empty
21
 *
22
 *  DESCRIPTION:
23
 *
24
 *  This function returns TRUE if on events are posted in the event_set,
25
 *  and FALSE otherwise.
26
 */
27
 
28
RTEMS_INLINE_ROUTINE boolean _Event_sets_Is_empty(
29
  rtems_event_set the_event_set
30
)
31
{
32
  return ( the_event_set == 0 );
33
}
34
 
35
/*PAGE
36
 *
37
 *  _Event_sets_Post
38
 *
39
 *  DESCRIPTION:
40
 *
41
 *  This routine posts the given new_events into the event_set
42
 *  passed in.  The result is returned to the user in event_set.
43
 */
44
 
45
RTEMS_INLINE_ROUTINE void _Event_sets_Post(
46
  rtems_event_set  the_new_events,
47
  rtems_event_set *the_event_set
48
)
49
{
50
  ISR_Level level;
51
 
52
  _ISR_Disable( level );
53
    *the_event_set |= the_new_events;
54
  _ISR_Enable( level );
55
}
56
 
57
/*PAGE
58
 *
59
 *  _Event_sets_Get
60
 *
61
 *  DESCRIPTION:
62
 *
63
 *  This function returns the events in event_condition which are
64
 *  set in event_set.
65
 */
66
 
67
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
68
  rtems_event_set the_event_set,
69
  rtems_event_set the_event_condition
70
)
71
{
72
   return ( the_event_set & the_event_condition );
73
}
74
 
75
/*PAGE
76
 *
77
 *  _Event_sets_Clear
78
 *
79
 *  DESCRIPTION:
80
 *
81
 *  This function removes the events in mask from the event_set
82
 *  passed in.  The result is returned to the user in event_set.
83
 */
84
 
85
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
86
 rtems_event_set the_event_set,
87
 rtems_event_set the_mask
88
)
89
{
90
   return ( the_event_set & ~(the_mask) );
91
}
92
 
93
#endif
94
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.