diff options
Diffstat (limited to 'libpthread/linuxthreads.old')
-rw-r--r-- | libpthread/linuxthreads.old/cancel.c | 4 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/debug.h | 18 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/internals.h | 2 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/join.c | 6 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/manager.c | 24 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/oldsemaphore.c | 6 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/pthread.c | 10 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/rwlock.c | 12 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/spinlock.c | 2 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c | 2 |
10 files changed, 43 insertions, 43 deletions
diff --git a/libpthread/linuxthreads.old/cancel.c b/libpthread/linuxthreads.old/cancel.c index 79409675f..239b821f1 100644 --- a/libpthread/linuxthreads.old/cancel.c +++ b/libpthread/linuxthreads.old/cancel.c @@ -101,7 +101,7 @@ int pthread_cancel(pthread_t thread) /* If the thread has registered an extrication interface, then invoke the interface. If it returns 1, then we succeeded in dequeuing the thread from whatever waiting object it was enqueued - with. In that case, it is our responsibility to wake it up. + with. In that case, it is our responsibility to wake it up. And also to set the p_woken_by_cancel flag so the woken thread can tell that it was woken by cancellation. */ @@ -122,7 +122,7 @@ int pthread_cancel(pthread_t thread) if (dorestart) restart(th); - else + else kill(pid, __pthread_sig_cancel); return 0; diff --git a/libpthread/linuxthreads.old/debug.h b/libpthread/linuxthreads.old/debug.h index 94b7c084b..76779dad9 100644 --- a/libpthread/linuxthreads.old/debug.h +++ b/libpthread/linuxthreads.old/debug.h @@ -8,15 +8,15 @@ ** debugging on, add -DDEBUG_PT to CFLAGS. It was added to the original ** distribution of linuxthreads. ** -** This program is free software; you can redistribute it and/or -** modify it under the terms of the GNU Library General Public License -** as published by the Free Software Foundation; either version 2 -** of the License, or (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU Library General Public License for more details. +** This program is free software; you can redistribute it and/or +** modify it under the terms of the GNU Library General Public License +** as published by the Free Software Foundation; either version 2 +** of the License, or (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU Library General Public License for more details. ** ****************************************************************************/ diff --git a/libpthread/linuxthreads.old/internals.h b/libpthread/linuxthreads.old/internals.h index 96edbf98f..38290a5fe 100644 --- a/libpthread/linuxthreads.old/internals.h +++ b/libpthread/linuxthreads.old/internals.h @@ -34,7 +34,7 @@ #include <bits/uClibc_locale.h> #endif /* __UCLIBC_HAS_XLOCALE__ */ -/* Use a funky version in a probably vein attempt at preventing gdb +/* Use a funky version in a probably vein attempt at preventing gdb * from dlopen()'ing glibc's libthread_db library... */ #define STRINGIFY(s) STRINGIFY2 (s) #define STRINGIFY2(s) #s diff --git a/libpthread/linuxthreads.old/join.c b/libpthread/linuxthreads.old/join.c index 250b47166..a46d0b68d 100644 --- a/libpthread/linuxthreads.old/join.c +++ b/libpthread/linuxthreads.old/join.c @@ -151,7 +151,7 @@ int pthread_join(pthread_t thread_id, void ** thread_return) /* If not terminated yet, suspend ourselves. */ if (! th->p_terminated) { /* Register extrication interface */ - __pthread_set_own_extricate_if(self, &extr); + __pthread_set_own_extricate_if(self, &extr); if (!(THREAD_GETMEM(self, p_canceled) && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE)) th->p_joining = self; @@ -160,7 +160,7 @@ int pthread_join(pthread_t thread_id, void ** thread_return) __pthread_unlock(&handle->h_lock); if (already_canceled) { - __pthread_set_own_extricate_if(self, 0); + __pthread_set_own_extricate_if(self, 0); __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME); } @@ -168,7 +168,7 @@ int pthread_join(pthread_t thread_id, void ** thread_return) suspend(self); PDEBUG("after suspend\n"); /* Deregister extrication interface */ - __pthread_set_own_extricate_if(self, 0); + __pthread_set_own_extricate_if(self, 0); /* This is a cancellation point */ if (THREAD_GETMEM(self, p_woken_by_cancel) diff --git a/libpthread/linuxthreads.old/manager.c b/libpthread/linuxthreads.old/manager.c index 2af743ba1..69fdd1cb5 100644 --- a/libpthread/linuxthreads.old/manager.c +++ b/libpthread/linuxthreads.old/manager.c @@ -206,7 +206,7 @@ int attribute_noreturn __pthread_manager(void *arg) pthread_handle_free(request.req_args.free.thread_id); break; case REQ_PROCESS_EXIT: - PDEBUG("got REQ_PROCESS_EXIT from %d, exit code = %d\n", + PDEBUG("got REQ_PROCESS_EXIT from %d, exit code = %d\n", request.req_thread, request.req_args.exit.code); pthread_handle_exit(request.req_thread, request.req_args.exit.code); @@ -414,7 +414,7 @@ static int pthread_allocate_stack(const pthread_attr_t *attr, { stacksize = attr->__stacksize; } - + /* malloc a stack - memory from the bottom up */ if ((new_thread_bottom = malloc(stacksize)) == NULL) { @@ -430,7 +430,7 @@ static int pthread_allocate_stack(const pthread_attr_t *attr, * * ^ +------------------------+ * | | pthread_descr struct | - * | +------------------------+ <- new_thread + * | +------------------------+ <- new_thread * malloc block | | | * | | thread stack | * | | | @@ -443,18 +443,18 @@ static int pthread_allocate_stack(const pthread_attr_t *attr, new_thread = ((pthread_descr) ((int)(new_thread_bottom + stacksize) & -sizeof(void*))) - 1; guardaddr = NULL; guardsize = 0; - + PDEBUG("thread stack: bos=%p, tos=%p\n", new_thread_bottom, new_thread); - + /* check the initial thread stack boundaries so they don't overlap */ NOMMU_INITIAL_THREAD_BOUNDS((char *) new_thread, (char *) new_thread_bottom); - - PDEBUG("initial stack: bos=%p, tos=%p\n", __pthread_initial_thread_bos, + + PDEBUG("initial stack: bos=%p, tos=%p\n", __pthread_initial_thread_bos, __pthread_initial_thread_tos); - + /* on non-MMU systems we always have non-standard stack frames */ __pthread_nonstandard_stacks = 1; - + #endif /* __ARCH_USE_MMU__ */ } @@ -567,7 +567,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr, /* ******************************************************** */ /* This code was moved from below to cope with running threads * on uClinux systems. See comment below... - * Insert new thread in doubly linked list of active threads */ + * Insert new thread in doubly linked list of active threads */ new_thread->p_prevlive = __pthread_main_thread; new_thread->p_nextlive = __pthread_main_thread->p_nextlive; __pthread_main_thread->p_nextlive->p_prevlive = new_thread; @@ -640,9 +640,9 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr, } /* Check if cloning succeeded */ if (pid == -1) { - /******************************************************** + /******************************************************** * Code inserted to remove the thread from our list of active - * threads in case of failure (needed to cope with uClinux), + * threads in case of failure (needed to cope with uClinux), * See comment below. */ new_thread->p_nextlive->p_prevlive = new_thread->p_prevlive; new_thread->p_prevlive->p_nextlive = new_thread->p_nextlive; diff --git a/libpthread/linuxthreads.old/oldsemaphore.c b/libpthread/linuxthreads.old/oldsemaphore.c index bb393ef5e..2a7b40acc 100644 --- a/libpthread/linuxthreads.old/oldsemaphore.c +++ b/libpthread/linuxthreads.old/oldsemaphore.c @@ -92,7 +92,7 @@ int __old_sem_wait(old_sem_t * sem) while (1) { /* Register extrication interface */ - __pthread_set_own_extricate_if(self, &extr); + __pthread_set_own_extricate_if(self, &extr); do { oldstatus = sem->sem_status; if ((oldstatus & 1) && (oldstatus != 1)) @@ -105,12 +105,12 @@ int __old_sem_wait(old_sem_t * sem) while (! sem_compare_and_swap(sem, oldstatus, newstatus)); if (newstatus & 1) { /* We got the semaphore. */ - __pthread_set_own_extricate_if(self, 0); + __pthread_set_own_extricate_if(self, 0); return 0; } /* Wait for sem_post or cancellation */ suspend(self); - __pthread_set_own_extricate_if(self, 0); + __pthread_set_own_extricate_if(self, 0); /* This is a cancellation point */ if (self->p_canceled && self->p_cancelstate == PTHREAD_CANCEL_ENABLE) { diff --git a/libpthread/linuxthreads.old/pthread.c b/libpthread/linuxthreads.old/pthread.c index 53b531465..35de4b731 100644 --- a/libpthread/linuxthreads.old/pthread.c +++ b/libpthread/linuxthreads.old/pthread.c @@ -386,7 +386,7 @@ static int *__libc_multiple_threads_ptr; startup of the C library. */ void __pthread_initialize_minimal(void) { - /* If we have special thread_self processing, initialize + /* If we have special thread_self processing, initialize * that for the main thread now. */ #ifdef INIT_THREAD_SELF INIT_THREAD_SELF(&__pthread_initial_thread, 0); @@ -434,7 +434,7 @@ static void pthread_initialize(void) { /* uClibc-specific stdio initialization for threads. */ FILE *fp; - + _stdio_user_locking = 0; /* 2 if threading not initialized */ for (fp = _stdio_openlist; fp != NULL; fp = fp->__nextopen) { if (fp->__user_locking != 1) { @@ -458,7 +458,7 @@ static void pthread_initialize(void) } #else /* For non-MMU assume __pthread_initial_thread_tos at upper page boundary, and - * __pthread_initial_thread_bos at address 0. These bounds are refined as we + * __pthread_initial_thread_bos at address 0. These bounds are refined as we * malloc other stack frames such that they don't overlap. -StS */ __pthread_initial_thread_tos = @@ -674,7 +674,7 @@ pthread_t pthread_self(void) return THREAD_GETMEM(self, p_tid); } libpthread_hidden_def (pthread_self) - + int pthread_equal(pthread_t thread1, pthread_t thread2) { return thread1 == thread2; @@ -820,7 +820,7 @@ static void pthread_handle_sigcancel(int sig) { pthread_descr self = thread_self(); sigjmp_buf * jmpbuf; - + if (self == &__pthread_manager_thread) { diff --git a/libpthread/linuxthreads.old/rwlock.c b/libpthread/linuxthreads.old/rwlock.c index e25ab3ea0..eaf71e77c 100644 --- a/libpthread/linuxthreads.old/rwlock.c +++ b/libpthread/linuxthreads.old/rwlock.c @@ -60,7 +60,7 @@ rwlock_add_to_list(pthread_descr self, pthread_rwlock_t *rwlock) { pthread_readlock_info *info = self->p_readlock_free; - if (info != NULL) + if (info != NULL) self->p_readlock_free = info->pr_next; else info = malloc(sizeof *info); @@ -100,7 +100,7 @@ rwlock_remove_from_list(pthread_descr self, pthread_rwlock_t *rwlock) return info; } } - + return NULL; } @@ -137,7 +137,7 @@ rwlock_can_rdlock(pthread_rwlock_t *rwlock, int have_lock_already) * This function helps support brain-damaged recursive read locking * semantics required by Unix 98, while maintaining write priority. * This basically determines whether this thread already holds a read lock - * already. It returns 1 if so, otherwise it returns 0. + * already. It returns 1 if so, otherwise it returns 0. * * If the thread has any ``untracked read locks'' then it just assumes * that this lock is among them, just to be safe, and returns 1. @@ -259,7 +259,7 @@ pthread_rwlock_rdlock (pthread_rwlock_t *rwlock) else self->p_untracked_readlock_count++; } - + return 0; } @@ -277,7 +277,7 @@ pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock) __pthread_lock (&rwlock->__rw_lock, self); /* 0 is passed to here instead of have_lock_already. - This is to meet Single Unix Spec requirements: + This is to meet Single Unix Spec requirements: if writers are waiting, pthread_rwlock_tryrdlock does not acquire a read lock, even if the caller has one or more read locks already. */ @@ -300,7 +300,7 @@ pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock) self->p_untracked_readlock_count++; } } - + return retval; } diff --git a/libpthread/linuxthreads.old/spinlock.c b/libpthread/linuxthreads.old/spinlock.c index cf49bc781..24c81d47e 100644 --- a/libpthread/linuxthreads.old/spinlock.c +++ b/libpthread/linuxthreads.old/spinlock.c @@ -115,7 +115,7 @@ void internal_function __pthread_lock(struct _pthread_fastlock * lock, lock->__spinlock += (spin_count - lock->__spinlock) / 8; } -#endif +#endif again: diff --git a/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c b/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c index ea4881322..bd2c401fc 100644 --- a/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c +++ b/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c @@ -26,7 +26,7 @@ /* Spinlock implementation; required. */ -/* The SH5 does not have a suitable test-and-set instruction (SWAP only +/* The SH5 does not have a suitable test-and-set instruction (SWAP only operates on an aligned quad word). So we use the SH4 version instead. This must be seperately compiled in SHcompact mode, so it cannot be inline. */ |