Xenomai 3.3.2
Loading...
Searching...
No Matches
signal.h
1/*
2 * Copyright (C) 2013 Philippe Gerum <rpm@xenomai.org>.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17 */
18#ifndef _COBALT_BOILERPLATE_SIGNAL_H
19#define _COBALT_BOILERPLATE_SIGNAL_H
20
21#include <cobalt/signal.h>
22
23/* Generates reserved signal numbers for Boilerplate/Copperplate. */
24#define __SIGRSVD(n) (SIGRTMIN + 8 + (n))
25
26#define SIGAGENT __SIGRSVD(0) /* Request to remote agent */
27#define SIGPERIOD __SIGRSVD(1) /* Periodic signal */
28
29/* Generates private signal numbers for clients, up to SIGRTMAX. */
30#define __SIGPRIV(n) __SIGRSVD(8 + (n))
31
32#define SIGSAFE_LOCK_ENTRY(__safelock) \
33 do { \
34 push_cleanup_lock(__safelock); \
35 write_lock(__safelock);
36
37#define SIGSAFE_LOCK_EXIT(__safelock) \
38 write_unlock(__safelock); \
39 pop_cleanup_lock(&__safelock); \
40 } while (0)
41
42#endif /* _COBALT_BOILERPLATE_SIGNAL_H */