[098eeba3] | 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 |
|
---|
[4f4b4e7] | 29 | /** @addtogroup libposix
|
---|
| 30 | * @{
|
---|
| 31 | */
|
---|
| 32 | /** @file
|
---|
| 33 | */
|
---|
| 34 |
|
---|
[098eeba3] | 35 | #ifndef POSIX_SIGNAL_H_
|
---|
| 36 | #define POSIX_SIGNAL_H_
|
---|
| 37 |
|
---|
[4f4b4e7] | 38 | #include "libc/errno.h"
|
---|
[098eeba3] | 39 |
|
---|
| 40 | /* HelenOS doesn't have signals, so calls to functions of this header
|
---|
| 41 | * are just replaced with their respective failure return value.
|
---|
| 42 | *
|
---|
| 43 | * Other macros and constants are here just to satisfy the symbol resolver
|
---|
| 44 | * and have no practical value whatsoever, until HelenOS implements some
|
---|
| 45 | * equivalent of signals. Maybe something neat based on IPC will be devised
|
---|
| 46 | * in the future?
|
---|
| 47 | */
|
---|
| 48 |
|
---|
[4f4b4e7] | 49 | #undef SIG_DFL
|
---|
[098eeba3] | 50 | #define SIG_DFL ((void (*)(int)) 0)
|
---|
[4f4b4e7] | 51 | #undef SIG_ERR
|
---|
[098eeba3] | 52 | #define SIG_ERR ((void (*)(int)) 0)
|
---|
[4f4b4e7] | 53 | #undef SIG_IGN
|
---|
[098eeba3] | 54 | #define SIG_IGN ((void (*)(int)) 0)
|
---|
| 55 |
|
---|
| 56 | #define signal(sig,func) (errno = ENOTSUP, SIG_ERR)
|
---|
[4f4b4e7] | 57 | #define raise(sig) ((int) -1)
|
---|
[098eeba3] | 58 |
|
---|
[4f4b4e7] | 59 | typedef int posix_sig_atomic_t;
|
---|
[098eeba3] | 60 |
|
---|
| 61 | /* full POSIX set */
|
---|
| 62 | enum {
|
---|
| 63 | SIGABRT,
|
---|
| 64 | SIGALRM,
|
---|
| 65 | SIGBUS,
|
---|
| 66 | SIGCHLD,
|
---|
| 67 | SIGCONT,
|
---|
| 68 | SIGFPE,
|
---|
| 69 | SIGHUP,
|
---|
| 70 | SIGILL,
|
---|
| 71 | SIGINT,
|
---|
| 72 | SIGKILL,
|
---|
| 73 | SIGPIPE,
|
---|
| 74 | SIGQUIT,
|
---|
| 75 | SIGSEGV,
|
---|
| 76 | SIGSTOP,
|
---|
| 77 | SIGTERM,
|
---|
| 78 | SIGTSTP,
|
---|
| 79 | SIGTTIN,
|
---|
| 80 | SIGTTOU,
|
---|
| 81 | SIGUSR1,
|
---|
| 82 | SIGUSR2,
|
---|
| 83 | SIGPOLL,
|
---|
| 84 | SIGPROF,
|
---|
| 85 | SIGSYS,
|
---|
| 86 | SIGTRAP,
|
---|
| 87 | SIGURG,
|
---|
| 88 | SIGVTALRM,
|
---|
| 89 | SIGXCPU,
|
---|
| 90 | SIGXFSZ
|
---|
| 91 | };
|
---|
| 92 |
|
---|
[491e1ee] | 93 | #ifndef LIBPOSIX_INTERNAL
|
---|
[4f4b4e7] | 94 | #define sig_atomic_t posix_sig_atomic_t
|
---|
| 95 | #endif
|
---|
| 96 |
|
---|
[098eeba3] | 97 | #endif /* POSIX_SIGNAL_H_ */
|
---|
| 98 |
|
---|
[4f4b4e7] | 99 | /** @}
|
---|
| 100 | */
|
---|