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