mirror of git://sourceware.org/git/glibc.git
[BZ #5245]
2007-11-08 Ulrich Drepper <drepper@redhat.com> [BZ #5245] * sysdeps/pthread/createthread.c (do_clone): Translate clone error if necessary.
This commit is contained in:
parent
f6ed654cab
commit
0f7e0ee507
|
|
@ -1,3 +1,9 @@
|
||||||
|
2007-11-08 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
[BZ #5245]
|
||||||
|
* sysdeps/pthread/createthread.c (do_clone): Translate clone error
|
||||||
|
if necessary.
|
||||||
|
|
||||||
2007-11-07 Ulrich Drepper <drepper@redhat.com>
|
2007-11-07 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
[BZ #5245]
|
[BZ #5245]
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,8 @@ do_clone (struct pthread *pd, const struct pthread_attr *attr,
|
||||||
PREPARE_CREATE;
|
PREPARE_CREATE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (stopped)
|
if (__builtin_expect (stopped != 0, 0))
|
||||||
/* We Make sure the thread does not run far by forcing it to get a
|
/* We make sure the thread does not run far by forcing it to get a
|
||||||
lock. We lock it here too so that the new thread cannot continue
|
lock. We lock it here too so that the new thread cannot continue
|
||||||
until we tell it to. */
|
until we tell it to. */
|
||||||
lll_lock (pd->lock, LLL_PRIVATE);
|
lll_lock (pd->lock, LLL_PRIVATE);
|
||||||
|
|
@ -84,7 +84,8 @@ do_clone (struct pthread *pd, const struct pthread_attr *attr,
|
||||||
if (IS_DETACHED (pd))
|
if (IS_DETACHED (pd))
|
||||||
__deallocate_stack (pd);
|
__deallocate_stack (pd);
|
||||||
|
|
||||||
return errno;
|
/* We have to translate error codes. */
|
||||||
|
return errno == ENOMEM ? EAGAIN : errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now we have the possibility to set scheduling parameters etc. */
|
/* Now we have the possibility to set scheduling parameters etc. */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue