source: mainline/uspace/lib/posix/signal.h@ 098eeba3

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 098eeba3 was 098eeba3, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 15 years ago

Add signal.h

  • Property mode set to 100644
File size: 2.4 KB
Line 
1/*
2 * Copyright (c) 2011 Jiri Zarevucky
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#ifndef POSIX_SIGNAL_H_
30#define POSIX_SIGNAL_H_
31
32#include <errno.h>
33
34/* HelenOS doesn't have signals, so calls to functions of this header
35 * are just replaced with their respective failure return value.
36 *
37 * Other macros and constants are here just to satisfy the symbol resolver
38 * and have no practical value whatsoever, until HelenOS implements some
39 * equivalent of signals. Maybe something neat based on IPC will be devised
40 * in the future?
41 */
42
43#define SIG_DFL ((void (*)(int)) 0)
44#define SIG_ERR ((void (*)(int)) 0)
45#define SIG_IGN ((void (*)(int)) 0)
46
47#define signal(sig,func) (errno = ENOTSUP, SIG_ERR)
48#define raise(sig) ((int)-1)
49
50typedef int sig_atomic_t;
51
52/* full POSIX set */
53enum {
54 SIGABRT,
55 SIGALRM,
56 SIGBUS,
57 SIGCHLD,
58 SIGCONT,
59 SIGFPE,
60 SIGHUP,
61 SIGILL,
62 SIGINT,
63 SIGKILL,
64 SIGPIPE,
65 SIGQUIT,
66 SIGSEGV,
67 SIGSTOP,
68 SIGTERM,
69 SIGTSTP,
70 SIGTTIN,
71 SIGTTOU,
72 SIGUSR1,
73 SIGUSR2,
74 SIGPOLL,
75 SIGPROF,
76 SIGSYS,
77 SIGTRAP,
78 SIGURG,
79 SIGVTALRM,
80 SIGXCPU,
81 SIGXFSZ
82};
83
84#endif /* POSIX_SIGNAL_H_ */
85
Note: See TracBrowser for help on using the repository browser.