Changes in uspace/lib/posix/signal.h [1a552fd:823a929] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/signal.h
r1a552fd r823a929 37 37 38 38 #include "libc/errno.h" 39 #include "sys/types.h"40 39 41 40 /* HelenOS doesn't have signals, so calls to functions of this header … … 52 51 #undef SIG_ERR 53 52 #define SIG_ERR ((void (*)(int)) 0) 54 #undef SIG_HOLD55 #define SIG_HOLD ((void (*)(int)) 0)56 53 #undef SIG_IGN 57 54 #define SIG_IGN ((void (*)(int)) 0) … … 62 59 63 60 typedef int posix_sig_atomic_t; 64 typedef int posix_sigset_t;65 typedef struct posix_mcontext {66 // FIXME: should not be empty to avoid compiler warnings (-pedantic)67 int dummy;68 } posix_mcontext_t;69 70 union posix_sigval {71 int sival_int;72 void *sival_ptr;73 };74 75 struct posix_sigevent {76 int sigev_notify; /* Notification type. */77 int sigev_signo; /* Signal number. */78 union posix_sigval sigev_value; /* Signal value. */79 void (*sigev_notify_function)(union posix_sigval); /* Notification function. */80 posix_thread_attr_t *sigev_notify_attributes; /* Notification attributes. */81 };82 83 typedef struct {84 int si_signo;85 int si_code;86 87 int si_errno;88 89 pid_t si_pid;90 uid_t si_uid;91 void *si_addr;92 int si_status;93 94 long si_band;95 96 union posix_sigval si_value;97 } posix_siginfo_t;98 99 struct posix_sigaction {100 void (*sa_handler)(int);101 posix_sigset_t sa_mask;102 int sa_flags;103 void (*sa_sigaction)(int, posix_siginfo_t *, void *);104 };105 106 typedef struct {107 void *ss_sp;108 size_t ss_size;109 int ss_flags;110 } posix_stack_t;111 112 typedef struct posix_ucontext {113 struct posix_ucontext *uc_link;114 posix_sigset_t uc_sigmask;115 posix_stack_t uc_stack;116 posix_mcontext_t uc_mcontext;117 } posix_ucontext_t;118 119 120 /* Values of posix_sigevent::sigev_notify */121 #undef SIGEV_NONE122 #define SIGEV_NONE 0123 #undef SIGEV_SIGNAL124 #define SIGEV_SIGNAL 0125 #undef SIGEV_THREAD126 #define SIGEV_THREAD 0127 128 #undef SIGRT_MIN129 #define SIGRT_MIN 0130 #undef SIGRT_MAX131 #define SIGRT_MAX 0132 133 #undef SIG_BLOCK134 #define SIG_BLOCK 0135 #undef SIG_UNBLOCK136 #define SIG_UNBLOCK 0137 #undef SIG_SETMASK138 #define SIG_SETMASK 0139 140 #undef SA_NOCLDSTOP141 #define SA_NOCLDSTOP 0142 #undef SA_ONSTACK143 #define SA_ONSTACK 0144 #undef SA_RESETHAND145 #define SA_RESETHAND 0146 #undef SA_RESTART147 #define SA_RESTART 0148 #undef SA_SIGINFO149 #define SA_SIGINFO 0150 #undef SA_NOCLDWAIT151 #define SA_NOCLDWAIT 0152 #undef SA_NODEFER153 #define SA_NODEFER 0154 155 #undef SS_ONSTACK156 #define SS_ONSTACK 0157 #undef SS_DISABLE158 #define SS_DISABLE 0159 160 #undef MINSIGSTKSZ161 #define MINSIGSTKSZ 0162 #undef SIGSTKSZ163 #define SIGSTKSZ 0164 61 165 62 /* full POSIX set */ … … 195 92 }; 196 93 197 /* Just declared to avoid compiler warnings. */198 extern int posix_sigemptyset(posix_sigset_t *set);199 extern int posix_sigprocmask(int how, const posix_sigset_t *restrict set,200 posix_sigset_t *restrict oset);201 202 94 #ifndef LIBPOSIX_INTERNAL 203 95 #define sig_atomic_t posix_sig_atomic_t 204 #define sigset_t posix_sigset_t205 #define sigval posix_sigval206 #define sigevent posix_sigevent207 #define sigaction posix_sigaction208 #define mcontext_t posix_mcontext_t209 #define ucontext_t posix_ucontext_t210 #define stack_t posix_stack_t211 #define siginfo_t posix_siginfo_t212 #define sigemptyset posix_sigemptyset213 #define sigprocmask posix_sigprocmask214 96 #endif 215 97
Note:
See TracChangeset
for help on using the changeset viewer.