projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
increase default thread stack/guard size
[musl]
/
src
/
thread
/
pthread_kill.c
diff --git
a/src/thread/pthread_kill.c
b/src/thread/pthread_kill.c
index
f090342
..
3d9395c
100644
(file)
--- a/
src/thread/pthread_kill.c
+++ b/
src/thread/pthread_kill.c
@@
-1,10
+1,12
@@
#include "pthread_impl.h"
#include "pthread_impl.h"
+#include "lock.h"
int pthread_kill(pthread_t t, int sig)
{
int r;
LOCK(t->killlock);
int pthread_kill(pthread_t t, int sig)
{
int r;
LOCK(t->killlock);
- r = t->dead ? ESRCH : -__syscall(SYS_tkill, t->tid, sig);
+ r = t->tid ? -__syscall(SYS_tkill, t->tid, sig)
+ : (sig+0U >= _NSIG ? EINVAL : 0);
UNLOCK(t->killlock);
return r;
}
UNLOCK(t->killlock);
return r;
}