mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
* pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P. * pthread_cancel.c: Use INVALID_TD_P. * pthread_detach.c: Likewise. * pthread_getschedparam.c: Likewise. * pthread_setschedparam.c: Likewise. * sysdeps/pthread/pthread_getcpuclockid.c: Likewise. * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise. * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P. * pthread_timedjoin.c: Likewise. * tst-basic7.c: Include <signal.h>.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@ -27,6 +27,12 @@ pthread_detach (th)
|
||||
pthread_t th;
|
||||
{
|
||||
struct pthread *pd = (struct pthread *) th;
|
||||
|
||||
/* Make sure the descriptor is valid. */
|
||||
if (INVALID_TD_P (pd))
|
||||
/* Not a valid thread handle. */
|
||||
return ESRCH;
|
||||
|
||||
int result = 0;
|
||||
|
||||
/* Mark the thread as detached. */
|
||||
|
Reference in New Issue
Block a user