1/*
2 * Copyright 2009, Axel D��rfler, axeld@pinc-software.de. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7#include <signal.h>
8
9#include <symbol_versioning.h>
10
11#include <signal_private.h>
12
13
14int
15__siginterrupt_beos(int signal, int flag)
16{
17	struct sigaction_beos action;
18	__sigaction_beos(signal, NULL, &action);
19	if (flag)
20		action.sa_flags &= ~SA_RESTART;
21	else
22		action.sa_flags |= SA_RESTART;
23
24	return __sigaction_beos(signal, &action, NULL);
25}
26
27
28int
29__siginterrupt(int signal, int flag)
30{
31	struct sigaction action;
32	sigaction(signal, NULL, &action);
33	if (flag)
34		action.sa_flags &= ~SA_RESTART;
35	else
36		action.sa_flags |= SA_RESTART;
37
38	return sigaction(signal, &action, NULL);
39}
40
41
42DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__siginterrupt_beos", "siginterrupt@",
43	"BASE");
44
45DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__siginterrupt", "siginterrupt@@",
46	"1_ALPHA4");
47