mirror of git://sourceware.org/git/glibc.git
Update.
2003-08-03 Jakub Jelinek <jakub@redhat.com> * sysdeps/pthread/createthread.c (do_clone): Move error handling to first syscall error check. Move syscall error check for tkill into __ASSUME_CLONE_STOPPED #ifdef.
This commit is contained in:
parent
f1205aa71f
commit
9c988b83bc
|
|
@ -1,3 +1,9 @@
|
||||||
|
2003-08-03 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/pthread/createthread.c (do_clone): Move error handling
|
||||||
|
to first syscall error check. Move syscall error check for tkill
|
||||||
|
into __ASSUME_CLONE_STOPPED #ifdef.
|
||||||
|
|
||||||
2003-08-02 Ulrich Drepper <drepper@redhat.com>
|
2003-08-02 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
|
* sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,20 @@ do_clone (struct pthread *pd, const struct pthread_attr *attr,
|
||||||
sizeof (cpu_set_t), attr->cpuset);
|
sizeof (cpu_set_t), attr->cpuset);
|
||||||
|
|
||||||
if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (res, err), 0))
|
if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (res, err), 0))
|
||||||
goto err_out;
|
{
|
||||||
|
/* The operation failed. We have to kill the thread. First
|
||||||
|
send it the cancellation signal. */
|
||||||
|
INTERNAL_SYSCALL_DECL (err2);
|
||||||
|
err_out:
|
||||||
|
(void) INTERNAL_SYSCALL (tkill, err2, 2, pd->tid, SIGCANCEL);
|
||||||
|
|
||||||
|
#ifdef __ASSUME_CLONE_STOPPED
|
||||||
|
/* Then wake it up so that the signal can be processed. */
|
||||||
|
(void) INTERNAL_SYSCALL (tkill, err2, 2, pd->tid, SIGCONT);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return INTERNAL_SYSCALL_ERRNO (res, err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the scheduling parameters. */
|
/* Set the scheduling parameters. */
|
||||||
|
|
@ -104,24 +117,11 @@ do_clone (struct pthread *pd, const struct pthread_attr *attr,
|
||||||
#ifdef __ASSUME_CLONE_STOPPED
|
#ifdef __ASSUME_CLONE_STOPPED
|
||||||
/* Now start the thread for real. */
|
/* Now start the thread for real. */
|
||||||
res = INTERNAL_SYSCALL (tkill, err, 2, pd->tid, SIGCONT);
|
res = INTERNAL_SYSCALL (tkill, err, 2, pd->tid, SIGCONT);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If something went wrong, kill the thread. */
|
/* If something went wrong, kill the thread. */
|
||||||
if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (res, err), 0))
|
if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (res, err), 0))
|
||||||
{
|
goto err_out;
|
||||||
/* The operation failed. We have to kill the thread. First
|
|
||||||
send it the cancellation signal. */
|
|
||||||
INTERNAL_SYSCALL_DECL (err2);
|
|
||||||
err_out:
|
|
||||||
(void) INTERNAL_SYSCALL (tkill, err2, 2, pd->tid, SIGCANCEL);
|
|
||||||
|
|
||||||
#ifdef __ASSUME_CLONE_STOPPED
|
|
||||||
/* Then wake it up so that the signal can be processed. */
|
|
||||||
(void) INTERNAL_SYSCALL (tkill, err2, 2, pd->tid, SIGCONT);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return INTERNAL_SYSCALL_ERRNO (res, err);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We now have for sure more than one thread. The main thread might
|
/* We now have for sure more than one thread. The main thread might
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue