source: mainline/uspace/lib/posix/signal.h@ be64a84

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since be64a84 was 823a929, checked in by Petr Koupy <petr.koupy@…>, 14 years ago

Added function stubs (binutils compile-time dependencies).

  • Property mode set to 100644
File size: 2.7 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/** @addtogroup libposix
30 * @{
31 */
32/** @file
33 */
34
35#ifndef POSIX_SIGNAL_H_
36#define POSIX_SIGNAL_H_
37
38#include "libc/errno.h"
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
49#undef SIG_DFL
50#define SIG_DFL ((void (*)(int)) 0)
51#undef SIG_ERR
52#define SIG_ERR ((void (*)(int)) 0)
53#undef SIG_IGN
54#define SIG_IGN ((void (*)(int)) 0)
55
56#define signal(sig,func) (errno = ENOTSUP, SIG_ERR)
57#define raise(sig) ((int) -1)
58#define kill(pid,sig) (errno = ENOTSUP, (int) -1)
59
60typedef int posix_sig_atomic_t;
61
62/* full POSIX set */
63enum {
64 SIGABRT,
65 SIGALRM,
66 SIGBUS,
67 SIGCHLD,
68 SIGCONT,
69 SIGFPE,
70 SIGHUP,
71 SIGILL,
72 SIGINT,
73 SIGKILL,
74 SIGPIPE,
75 SIGQUIT,
76 SIGSEGV,
77 SIGSTOP,
78 SIGTERM,
79 SIGTSTP,
80 SIGTTIN,
81 SIGTTOU,
82 SIGUSR1,
83 SIGUSR2,
84 SIGPOLL,
85 SIGPROF,
86 SIGSYS,
87 SIGTRAP,
88 SIGURG,
89 SIGVTALRM,
90 SIGXCPU,
91 SIGXFSZ
92};
93
94#ifndef LIBPOSIX_INTERNAL
95 #define sig_atomic_t posix_sig_atomic_t
96#endif
97
98#endif /* POSIX_SIGNAL_H_ */
99
100/** @}
101 */
Note: See TracBrowser for help on using the repository browser.