2 * Copyright 2011, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
11 #include <syscall_utils.h>
13 #include <errno_private.h>
14 #include <signal_defs.h>
19 sigqueue(pid_t pid
, int signal
, const union sigval userValue
)
22 RETURN_AND_SET_ERRNO(EINVAL
);
25 RETURN_AND_SET_ERRNO(ESRCH
);
27 status_t error
= _kern_send_signal(pid
, signal
, &userValue
,
28 SIGNAL_FLAG_QUEUING_REQUIRED
);
30 // translate B_BAD_THREAD_ID/B_BAD_TEAM_ID to ESRCH
31 if (error
== B_BAD_THREAD_ID
|| error
== B_BAD_TEAM_ID
)
35 RETURN_AND_SET_ERRNO(error
);