pthread_kill.c 207 B

12345678910
  1. #include "pthread_impl.h"
  2. int pthread_kill(pthread_t t, int sig)
  3. {
  4. int r;
  5. __lock(&t->killlock);
  6. r = t->dead ? ESRCH : -__syscall(SYS_tgkill, t->pid, t->tid, sig);
  7. a_store(&t->killlock, 0);
  8. return r;
  9. }