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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [posix/] [include/] [rtems/] [posix/] [psignal.h] - Blame information for rev 846

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  $Id: psignal.h,v 1.2 2001-09-27 11:59:14 chris Exp $
3
 */
4
 
5
#ifndef __RTEMS_POSIX_SIGNALS_h
6
#define __RTEMS_POSIX_SIGNALS_h
7
 
8
#include <rtems/posix/pthread.h>
9
 
10
/*
11
 *  Currently 32 signals numbered 1-32 are defined
12
 */
13
 
14
#define SIGNAL_EMPTY_MASK  0x00000000
15
#define SIGNAL_ALL_MASK    0xffffffff
16
 
17
#define signo_to_mask( _sig ) (1 << ((_sig) - 1))
18
 
19
#define is_valid_signo( _sig ) \
20
  ((_sig) >= 1 && (_sig) <= 32 )
21
 
22
#define _States_Is_interruptible_signal( _states ) \
23
  ( ((_states) & \
24
    (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL)) == \
25
      (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL))
26
 
27
#define SIGACTION_TERMINATE \
28
  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Abnormal_termination_handler} }
29
#define SIGACTION_IGNORE \
30
  { 0, SIGNAL_ALL_MASK, {SIG_IGN} }
31
#define SIGACTION_STOP \
32
  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Stop_handler} }
33
#define SIGACTION_CONTINUE \
34
  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Continue_handler} }
35
 
36
#define SIG_ARRAY_MAX  (SIGRTMAX + 1)
37
 
38
/*
39
 *  Variables
40
 */
41
 
42
extern sigset_t  _POSIX_signals_Pending;
43
 
44
extern struct sigaction _POSIX_signals_Default_vectors[ SIG_ARRAY_MAX ];
45
 
46
extern struct sigaction _POSIX_signals_Vectors[ SIG_ARRAY_MAX ];
47
 
48
extern Watchdog_Control _POSIX_signals_Alarm_timer;
49
 
50
extern Thread_queue_Control _POSIX_signals_Wait_queue;
51
 
52
extern Chain_Control _POSIX_signals_Inactive_siginfo;
53
 
54
extern Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ];
55
 
56
/*
57
 *  POSIX internal siginfo structure
58
 */
59
 
60
typedef struct {
61
  Chain_Node  Node;
62
  siginfo_t   Info;
63
}  POSIX_signals_Siginfo_node;
64
 
65
/*
66
 *  Internal routines
67
 */
68
 
69
void _POSIX_signals_Manager_Initialization(
70
  int  maximum_queued_signals
71
);
72
 
73
void _POSIX_signals_Post_switch_extension(
74
  Thread_Control  *the_thread
75
);
76
 
77
boolean _POSIX_signals_Unblock_thread(
78
  Thread_Control  *the_thread,
79
  int              signo,
80
  siginfo_t       *info
81
);
82
 
83
boolean _POSIX_signals_Check_signal(
84
  POSIX_API_Control  *api,
85
  int                 signo,
86
  boolean             is_global
87
);
88
 
89
boolean _POSIX_signals_Clear_signals(
90
  POSIX_API_Control  *api,
91
  int                 signo,
92
  siginfo_t          *info,
93
  boolean             is_global,
94
  boolean             check_blocked
95
);
96
 
97
int killinfo(
98
  pid_t               pid,
99
  int                 sig,
100
  const union sigval *value
101
);
102
 
103
void _POSIX_signals_Set_process_signals(
104
  sigset_t   mask
105
);
106
 
107
void _POSIX_signals_Clear_process_signals(
108
  sigset_t   mask
109
);
110
 
111
/*
112
 *  Default signal handlers
113
 */
114
 
115
#define _POSIX_signals_Stop_handler NULL
116
#define _POSIX_signals_Continue_handler NULL
117
 
118
void _POSIX_signals_Abnormal_termination_handler( int signo );
119
 
120
#endif
121
/* end of file */

powered by: WebSVN 2.1.0

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