source: rtems/c/src/exec/rtems/macros/asr.inl @ 5e9b32b

4.104.114.84.95
Last change on this file since 5e9b32b was 5e9b32b, checked in by Joel Sherrill <joel.sherrill@…>, on 09/26/95 at 19:27:15

posix support initially added

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*  macros/asr.h
2 *
3 *  This include file contains the implemenation of all routines
4 *  associated with the asynchronous signal handler which are inlined.
5 *
6 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
7 *  On-Line Applications Research Corporation (OAR).
8 *  All rights assigned to U.S. Government, 1994.
9 *
10 *  This material may be reproduced by or for the U.S. Government pursuant
11 *  to the copyright license under the clause at DFARS 252.227-7013.  This
12 *  notice must appear in all copies of this file and its derivatives.
13 *
14 *  $Id$
15 */
16
17#ifndef __INLINE_ASR_h
18#define __INLINE_ASR_h
19
20#include <rtems/score/isr.h>
21
22/*PAGE
23 *
24 *  _ASR_Initialize
25 *
26 */
27
28#define _ASR_Initialize( _information ) \
29{ \
30  (_information)->is_enabled      = TRUE; \
31  (_information)->handler         = NULL; \
32  (_information)->mode_set        = RTEMS_DEFAULT_MODES; \
33  (_information)->signals_posted  = 0; \
34  (_information)->signals_pending = 0; \
35  (_information)->nest_level      = 0; \
36}
37
38/*PAGE
39 *
40 *  _ASR_Swap_signals
41 *
42 */
43
44#define _ASR_Swap_signals( _information ) \
45{ \
46  rtems_signal_set _signals; \
47  ISR_Level              _level; \
48   \
49  _ISR_Disable( _level ); \
50    _signals                        = (_information)->signals_pending; \
51    (_information)->signals_pending = (_information)->signals_posted; \
52    (_information)->signals_posted  = _signals; \
53  _ISR_Enable( _level ); \
54}
55
56/*PAGE
57 *
58 *  _ASR_Is_null_handler
59 *
60 */
61
62#define _ASR_Is_null_handler( _asr_handler ) \
63  ( (_asr_handler) == NULL )
64
65/*PAGE
66 *
67 *  _ASR_Are_signals_pending
68 *
69 */
70
71#define _ASR_Are_signals_pending( _information ) \
72 ( (_information)->signals_posted != 0 )
73
74/*PAGE
75 *
76 *  _ASR_Post_signals
77 *
78 */
79
80#define _ASR_Post_signals( _signals, _signal_set ) \
81  do { \
82     ISR_Level _level; \
83     \
84     _ISR_Disable( _level ); \
85       *(_signal_set) |= (_signals); \
86     _ISR_Enable( _level ); \
87  } while ( 0 )
88
89#endif
90/* end of include file */
Note: See TracBrowser for help on using the repository browser.