1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00
2004-09-25  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/setuid.c (__setuid): Remove second
	result declaration.

2004-09-22  Andreas Schwab  <schwab@suse.de>

	* sysdeps/unix/sysv/linux/ia64/sysdep.h: Adjust whitespace.
This commit is contained in:
Ulrich Drepper
2004-09-25 07:44:41 +00:00
parent 5149942304
commit 5f66b766e7
7 changed files with 45 additions and 19 deletions

View File

@ -1,3 +1,12 @@
2004-09-25 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/i386/setuid.c (__setuid): Remove second
result declaration.
2004-09-22 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/ia64/sysdep.h: Adjust whitespace.
2004-09-24 Ulrich Drepper <drepper@redhat.com>
* misc/daemon.c (daemon): Don't succeed if /dev/null cannot be

View File

@ -1,3 +1,11 @@
2004-09-25 Ulrich Drepper <drepper@redhat.com>
* descr.h (struct pthread): Add stopped_start field.
* sysdeps/pthread/createthread.c (create_thread): Set
start_stopped flag in descriptor for new thread appropriately.
* pthread_create.c (start_thread): Only take lock to be stopped on
startup if stopped_start flag says so.
2004-09-24 Ulrich Drepper <drepper@redhat.com>
* pthread_create.c (__pthread_create_2_1): Remember whether thread

View File

@ -197,6 +197,9 @@ struct pthread
/* True if the user provided the stack. */
bool user_stack;
/* True if thread must stop at startup time. */
bool stopped_start;
/* Lock to synchronize access to the descriptor. */
lll_lock_t lock;

View File

@ -252,6 +252,8 @@ start_thread (void *arg)
/* Store the new cleanup handler info. */
THREAD_SETMEM (pd, cleanup_jmp_buf, &unwind_buf);
if (__builtin_expect (pd->stopped_start, 0))
{
int oldtype = CANCEL_ASYNC ();
/* Get the lock the parent locked to force synchronization. */
@ -260,6 +262,7 @@ start_thread (void *arg)
lll_unlock (pd->lock);
CANCEL_RESET (oldtype);
}
/* Run the code the user provided. */
#ifdef CALL_THREAD_FCT

View File

@ -186,6 +186,9 @@ create_thread (struct pthread *pd, const struct pthread_attr *attr,
if ((_mask & (__nptl_threads_events.event_bits[_idx]
| pd->eventbuf.eventmask.event_bits[_idx])) != 0)
{
/* We always must have the thread start stopped. */
pd->stopped_start = true;
/* Create the thread. We always create the thread stopped
so that it does not get far before we tell the debugger. */
int res = do_clone (pd, attr, clone_flags, start_thread,
@ -224,10 +227,11 @@ create_thread (struct pthread *pd, const struct pthread_attr *attr,
/* Determine whether the newly created threads has to be started
stopped since we have to set the scheduling parameters or set the
affinity. */
int stopped = 0;
bool stopped = false;
if (attr != NULL && (attr->cpuset != NULL
|| (attr->flags & ATTR_FLAG_NOTINHERITSCHED) != 0))
stopped = 1;
stopped = true;
pd->stopped_start = stopped;
/* Actually create the thread. */
int res = do_clone (pd, attr, clone_flags, start_thread,

View File

@ -47,7 +47,6 @@ __setuid (uid_t uid)
# ifdef __NR_setuid32
if (__libc_missing_32bit_uids <= 0)
{
int result;
int saved_errno = errno;
result = INLINE_SYSCALL (setuid32, 1, uid);