summaryrefslogtreecommitdiff
path: root/pr/src/threads
diff options
context:
space:
mode:
Diffstat (limited to 'pr/src/threads')
-rw-r--r--pr/src/threads/combined/prucpu.c8
-rw-r--r--pr/src/threads/combined/prucv.c20
-rw-r--r--pr/src/threads/combined/prulock.c24
-rw-r--r--pr/src/threads/combined/prustack.c2
-rw-r--r--pr/src/threads/combined/pruthr.c98
-rw-r--r--pr/src/threads/prcthr.c14
-rw-r--r--pr/src/threads/prdump.c4
-rw-r--r--pr/src/threads/prrwlock.c20
-rw-r--r--pr/src/threads/prsem.c26
-rw-r--r--pr/src/threads/prtpd.c24
10 files changed, 120 insertions, 120 deletions
diff --git a/pr/src/threads/combined/prucpu.c b/pr/src/threads/combined/prucpu.c
index 3913dc8d..c1b37aaf 100644
--- a/pr/src/threads/combined/prucpu.c
+++ b/pr/src/threads/combined/prucpu.c
@@ -119,7 +119,7 @@ static _PRCPUQueue *_PR_CreateCPUQueue(void)
PRInt32 index;
_PRCPUQueue *cpuQueue;
cpuQueue = PR_NEWZAP(_PRCPUQueue);
-
+
_MD_NEW_LOCK( &cpuQueue->runQLock );
_MD_NEW_LOCK( &cpuQueue->sleepQLock );
_MD_NEW_LOCK( &cpuQueue->miscQLock );
@@ -191,7 +191,7 @@ static PRStatus _PR_StartCPU(_PRCPU *cpu, PRThread *thread)
cpu->last_clock = PR_IntervalNow();
/* Before we create any threads on this CPU we have to
- * set the current CPU
+ * set the current CPU
*/
_PR_MD_SET_CURRENT_CPU(cpu);
_PR_MD_INIT_RUNNING_CPU(cpu);
@@ -210,7 +210,7 @@ static PRStatus _PR_StartCPU(_PRCPU *cpu, PRThread *thread)
/* didn't clean up CPU queue XXXMB */
PR_DELETE(cpu);
return PR_FAILURE;
- }
+ }
PR_ASSERT(cpu->idle_thread->cpu == cpu);
cpu->idle_thread->no_sched = 0;
@@ -374,7 +374,7 @@ PR_IMPLEMENT(void) PR_SetConcurrency(PRUintn numCPUs)
if (_native_threads_only)
return;
-
+
_PR_CPU_LIST_LOCK();
if (_pr_numCPU < numCPUs) {
newCPU = numCPUs - _pr_numCPU;
diff --git a/pr/src/threads/combined/prucv.c b/pr/src/threads/combined/prucv.c
index d0bf4c42..97c596fb 100644
--- a/pr/src/threads/combined/prucv.c
+++ b/pr/src/threads/combined/prucv.c
@@ -10,10 +10,10 @@
#if defined(WIN95)
/*
-** Some local variables report warnings on Win95 because the code paths
+** Some local variables report warnings on Win95 because the code paths
** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
** The pragma suppresses the warning.
-**
+**
*/
#pragma warning(disable : 4101)
#endif
@@ -86,8 +86,8 @@ PRBool _PR_NotifyThread (PRThread *thread, PRThread *me)
} else {
_PR_THREAD_UNLOCK(thread);
rv = PR_FALSE;
- }
- }
+ }
+ }
return rv;
}
@@ -142,7 +142,7 @@ void _PR_NotifyLockedThread (PRThread *thread)
thread->state = _PR_RUNNING;
_PR_THREAD_UNLOCK(thread);
_PR_MD_WAKEUP_WAITER(thread);
- }
+ }
_PR_CVAR_UNLOCK(cvar);
return;
@@ -216,9 +216,9 @@ PRStatus _PR_WaitCondVar(
}
_PR_CVAR_UNLOCK(cvar);
_PR_THREAD_UNLOCK(thread);
-
- /*
- ** Release lock protecting the condition variable and thereby giving time
+
+ /*
+ ** Release lock protecting the condition variable and thereby giving time
** to the next thread which can potentially notify on the condition variable
*/
PR_Unlock(lock);
@@ -307,7 +307,7 @@ void _PR_ClockInterrupt(void)
PRThread *thread, *me = _PR_MD_CURRENT_THREAD();
_PRCPU *cpu = me->cpu;
PRIntervalTime elapsed, now;
-
+
PR_ASSERT(_PR_MD_GET_INTSOFF() != 0);
/* Figure out how much time elapsed since the last clock tick */
now = PR_IntervalNow();
@@ -610,7 +610,7 @@ PR_IMPLEMENT(void) PRP_DestroyNakedCondVar(PRCondVar *cvar)
PR_ASSERT(_PR_NAKED_CV_LOCK == cvar->lock);
_PR_MD_FREE_LOCK(&(cvar->ilock));
-
+
PR_DELETE(cvar);
}
diff --git a/pr/src/threads/combined/prulock.c b/pr/src/threads/combined/prulock.c
index 8b2f41ee..3d459dd5 100644
--- a/pr/src/threads/combined/prulock.c
+++ b/pr/src/threads/combined/prulock.c
@@ -7,10 +7,10 @@
#if defined(WIN95)
/*
-** Some local variables report warnings on Win95 because the code paths
+** Some local variables report warnings on Win95 because the code paths
** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
** The pragma suppresses the warning.
-**
+**
*/
#pragma warning(disable : 4101)
#endif
@@ -99,7 +99,7 @@ void _PR_UnblockLockWaiter(PRLock *lock)
/* Unblock first waiter */
t = _PR_THREAD_CONDQ_PTR(q);
- /*
+ /*
** We are about to change the thread's state to runnable and for local
** threads, we are going to assign a cpu to it. So, protect thread's
** data structure.
@@ -128,9 +128,9 @@ void _PR_UnblockLockWaiter(PRLock *lock)
** thread, we just assign our own cpu to that thread and put it on
** the cpu's run queue. If the the currently running thread is a
** native thread, we assign the primordial cpu to it (on NT,
- ** MD_WAKEUP handles the cpu assignment).
+ ** MD_WAKEUP handles the cpu assignment).
*/
-
+
if ( !_PR_IS_NATIVE_THREAD(t) ) {
t->state = _PR_RUNNABLE;
@@ -206,10 +206,10 @@ PR_IMPLEMENT(void) PR_Lock(PRLock *lock)
PRThread *t;
PRCList *q;
- PR_ASSERT(me != suspendAllThread);
+ PR_ASSERT(me != suspendAllThread);
PR_ASSERT(!(me->flags & _PR_IDLE_THREAD));
PR_ASSERT(lock != NULL);
-#ifdef _PR_GLOBAL_THREADS_ONLY
+#ifdef _PR_GLOBAL_THREADS_ONLY
_PR_MD_LOCK(&lock->ilock);
PR_ASSERT(lock->owner == 0);
lock->owner = me;
@@ -258,7 +258,7 @@ retry:
}
#endif
- /*
+ /*
Add this thread to the asked for lock's list of waiting threads. We
add this thread thread in the right priority order so when the unlock
occurs, the thread with the higher priority will get the lock.
@@ -285,7 +285,7 @@ retry:
}
PR_INSERT_BEFORE(&me->waitQLinks, q);
- /*
+ /*
Now grab the threadLock since we are about to change the state. We have
to do this since a PR_Suspend or PR_SetThreadPriority type call that takes
a PRThread* as an argument could be changing the state of this thread from
@@ -317,13 +317,13 @@ PR_IMPLEMENT(PRStatus) PR_Unlock(PRLock *lock)
PR_ASSERT(lock != NULL);
PR_ASSERT(lock->owner == me);
- PR_ASSERT(me != suspendAllThread);
+ PR_ASSERT(me != suspendAllThread);
PR_ASSERT(!(me->flags & _PR_IDLE_THREAD));
if (lock->owner != me) {
return PR_FAILURE;
}
-#ifdef _PR_GLOBAL_THREADS_ONLY
+#ifdef _PR_GLOBAL_THREADS_ONLY
lock->owner = 0;
_PR_MD_UNLOCK(&lock->ilock);
return PR_SUCCESS;
@@ -397,7 +397,7 @@ PR_IMPLEMENT(PRBool) PR_TestAndLock(PRLock *lock)
PRBool rv = PR_FALSE;
PRIntn is;
-#ifdef _PR_GLOBAL_THREADS_ONLY
+#ifdef _PR_GLOBAL_THREADS_ONLY
is = _PR_MD_TEST_AND_LOCK(&lock->ilock);
if (is == 0) {
lock->owner = me;
diff --git a/pr/src/threads/combined/prustack.c b/pr/src/threads/combined/prustack.c
index 59562bac..f4b760dc 100644
--- a/pr/src/threads/combined/prustack.c
+++ b/pr/src/threads/combined/prustack.c
@@ -141,7 +141,7 @@ PRThreadStack *_PR_NewStack(PRUint32 stackSize)
ts->allocBase, ts->allocBase + ts->allocSize - 1,
ts->allocBase + REDZONE,
ts->allocBase + REDZONE + stackSize - 1));
-
+
_PR_MD_INIT_STACK(ts,REDZONE);
return ts;
diff --git a/pr/src/threads/combined/pruthr.c b/pr/src/threads/combined/pruthr.c
index 436acf84..fe0c4293 100644
--- a/pr/src/threads/combined/pruthr.c
+++ b/pr/src/threads/combined/pruthr.c
@@ -7,7 +7,7 @@
#include <signal.h>
#include <string.h>
-#if defined(WIN95)
+#if defined(WIN95)
/*
** Some local variables report warnings on Win95 because the code paths
** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
@@ -15,7 +15,7 @@
**
*/
#pragma warning(disable : 4101)
-#endif
+#endif
/* _pr_activeLock protects the following global variables */
PRLock *_pr_activeLock;
@@ -28,7 +28,7 @@ PRInt32 _pr_primordialExitCount; /* In PR_Cleanup(), the primordial thread
* If the primordial thread is a system
* thread, then _pr_primordialExitCount
* is 0. If the primordial thread is
- * itself a user thread, then
+ * itself a user thread, then
* _pr_primordialThread is 1.
*/
PRCondVar *_pr_primordialExitCVar; /* When _pr_userActive is decremented to
@@ -195,7 +195,7 @@ void _PR_NotifyJoinWaiters(PRThread *thread)
** Notify on our "termination" condition variable so that joining
** thread will know about our termination. Switch our context and
** come back later on to continue the cleanup.
- */
+ */
PR_ASSERT(thread == _PR_MD_CURRENT_THREAD());
if (thread->term != NULL) {
PR_Lock(_pr_terminationCVLock);
@@ -517,7 +517,7 @@ static void _PR_UserRunThread(void)
/* All done, time to go away */
_PR_CleanupThread(thread);
- _PR_INTSOFF(is);
+ _PR_INTSOFF(is);
_PR_NotifyJoinWaiters(thread);
@@ -704,12 +704,12 @@ static void _PR_Resume(PRThread *thread)
/* PR_ASSERT(thread->wait.monitor->stickyCount == 0); */
break;
- case _PR_LOCK_WAIT:
+ case _PR_LOCK_WAIT:
{
PRLock *wLock = thread->wait.lock;
thread->flags &= ~_PR_SUSPENDING;
-
+
_PR_LOCK_LOCK(wLock);
if (thread->wait.lock->owner == 0) {
_PR_UnblockLockWaiter(thread->wait.lock);
@@ -762,7 +762,7 @@ static PRThread *get_thread(_PRCPU *cpu, PRBool *wakeup_cpus)
thread = NULL;
for (pri = priMax; pri >= priMin ; pri-- ) {
if (r & (1 << pri)) {
- for (qp = _PR_RUNQ(cpu)[pri].next;
+ for (qp = _PR_RUNQ(cpu)[pri].next;
qp != &_PR_RUNQ(cpu)[pri];
qp = qp->next) {
thread = _PR_THREAD_PTR(qp);
@@ -874,7 +874,7 @@ void _PR_Schedule(void)
thread = NULL;
for (pri = priMax; pri >= priMin ; pri-- ) {
if (r & (1 << pri)) {
- for (qp = _PR_RUNQ(cpu)[pri].next;
+ for (qp = _PR_RUNQ(cpu)[pri].next;
qp != &_PR_RUNQ(cpu)[pri];
qp = qp->next) {
thread = _PR_THREAD_PTR(qp);
@@ -935,17 +935,17 @@ found_thread:
("switching to %d[%p]", thread->id, thread));
PR_ASSERT(thread->state != _PR_RUNNING);
thread->state = _PR_RUNNING;
-
+
/* If we are on the runq, it just means that we went to sleep on some
* resource, and by the time we got here another real native thread had
- * already given us the resource and put us back on the runqueue
+ * already given us the resource and put us back on the runqueue
*/
PR_ASSERT(thread->cpu == _PR_MD_CURRENT_CPU());
- if (thread != me)
+ if (thread != me)
_PR_MD_RESTORE_CONTEXT(thread);
#if 0
- /* XXXMB; with setjmp/longjmp it is impossible to land here, but
- * it is not with fibers... Is this a bad thing? I believe it is
+ /* XXXMB; with setjmp/longjmp it is impossible to land here, but
+ * it is not with fibers... Is this a bad thing? I believe it is
* still safe.
*/
PR_NOT_REACHED("impossible return from schedule");
@@ -953,8 +953,8 @@ found_thread:
}
/*
-** Attaches a thread.
-** Does not set the _PR_MD_CURRENT_THREAD.
+** Attaches a thread.
+** Does not set the _PR_MD_CURRENT_THREAD.
** Does not specify the scope of the thread.
*/
static PRThread *
@@ -989,7 +989,7 @@ _PR_AttachThread(PRThreadType type, PRThreadPriority priority,
-PR_IMPLEMENT(PRThread*)
+PR_IMPLEMENT(PRThread*)
_PR_NativeCreateThread(PRThreadType type,
void (*start)(void *arg),
void *arg,
@@ -1025,7 +1025,7 @@ _PR_NativeCreateThread(PRThreadType type,
thread->startFunc = start;
thread->arg = arg;
- /*
+ /*
Set thread flags related to scope and joinable state. If joinable
thread, allocate a "termination" conidition variable.
*/
@@ -1077,7 +1077,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
PRIntn useRecycled = 0;
PRBool status;
- /*
+ /*
First, pin down the priority. Not all compilers catch passing out of
range enum here. If we let bad values thru, priority queues won't work.
*/
@@ -1086,7 +1086,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
} else if (priority < PR_PRIORITY_FIRST) {
priority = PR_PRIORITY_FIRST;
}
-
+
if (!_pr_initialized) _PR_ImplicitInitialization();
if (! (flags & _PR_IDLE_THREAD))
@@ -1138,7 +1138,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
else PR_ATOMIC_INCREMENT(&_pr_userActive);
if (state == PR_JOINABLE_THREAD) {
- if (!thread->term)
+ if (!thread->term)
thread->term = PR_NewCondVar(_pr_terminationCVLock);
}
else {
@@ -1156,7 +1156,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
return thread;
}
}
- thread = _PR_NativeCreateThread(type, start, arg, priority,
+ thread = _PR_NativeCreateThread(type, start, arg, priority,
scope, state, stackSize, flags);
} else {
if (_PR_NUM_DEADUSER > 0) {
@@ -1167,7 +1167,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
} else {
PRCList *ptr;
- /* Go down list checking for a recycled thread with a
+ /* Go down list checking for a recycled thread with a
* large enough stack. XXXMB - this has a bad degenerate case.
*/
ptr = _PR_DEADUSERQ.next;
@@ -1182,7 +1182,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
ptr = ptr->next;
thread = NULL;
}
- }
+ }
_PR_DEADQ_UNLOCK;
@@ -1192,7 +1192,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
thread->arg = arg;
thread->priority = priority;
if (state == PR_JOINABLE_THREAD) {
- if (!thread->term)
+ if (!thread->term)
thread->term = PR_NewCondVar(_pr_terminationCVLock);
} else {
if(thread->term) {
@@ -1203,7 +1203,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
useRecycled++;
}
}
- }
+ }
if (thread == NULL) {
#ifndef HAVE_CUSTOM_USER_THREADS
stack = _PR_NewStack(stackSize);
@@ -1290,7 +1290,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
return NULL;
}
- /*
+ /*
Set thread flags related to scope and joinable state. If joinable
thread, allocate a "termination" condition variable.
*/
@@ -1307,9 +1307,9 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
return NULL;
}
}
-
+
}
-
+
/* Update thread type counter */
PR_Lock(_pr_activeLock);
thread->flags = flags;
@@ -1347,7 +1347,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
** If the creating thread is a kernel thread, we need to
** awaken the user thread idle thread somehow; potentially
** it could be sleeping in its idle loop, and we need to poke
- ** it. To do so, wake the idle thread...
+ ** it. To do so, wake the idle thread...
*/
_PR_MD_WAKEUP_WAITER(NULL);
} else if (_PR_IS_NATIVE_THREAD(me)) {
@@ -1368,7 +1368,7 @@ PR_IMPLEMENT(PRThread*) PR_CreateThread(PRThreadType type,
PRThreadState state,
PRUint32 stackSize)
{
- return _PR_CreateThread(type, start, arg, priority, scope, state,
+ return _PR_CreateThread(type, start, arg, priority, scope, state,
stackSize, 0);
}
@@ -1483,7 +1483,7 @@ void _PRI_DetachThread(void)
_PR_MD_CLEAN_THREAD(me);
_PR_MD_SET_CURRENT_THREAD(NULL);
- if (!me->threadAllocatedOnStack)
+ if (!me->threadAllocatedOnStack)
PR_DELETE(me->stack);
_PR_MD_FREE_LOCK(&me->threadLock);
PR_DELETE(me);
@@ -1491,9 +1491,9 @@ void _PRI_DetachThread(void)
/*
** Wait for thread termination:
-** "thread" is the target thread
+** "thread" is the target thread
**
-** This can return PR_FAILURE if no joinable thread could be found
+** This can return PR_FAILURE if no joinable thread could be found
** corresponding to the specified target thread.
**
** The calling thread is suspended until the target thread completes.
@@ -1530,12 +1530,12 @@ PR_IMPLEMENT(PRStatus) PR_JoinThread(PRThread *thread)
(void) PR_WaitCondVar(term, PR_INTERVAL_NO_TIMEOUT);
}
(void) PR_Unlock (_pr_terminationCVLock);
-
- /*
+
+ /*
Remove target thread from global waiting to join Q; make it runnable
again and put it back on its run Q. When it gets scheduled later in
_PR_RunThread code, it will clean up its stack.
- */
+ */
if (!_PR_IS_NATIVE_THREAD(me))
_PR_INTSOFF(is);
thread->state = _PR_RUNNABLE;
@@ -1558,14 +1558,14 @@ PR_IMPLEMENT(PRStatus) PR_JoinThread(PRThread *thread)
ErrorExit:
if ( !_PR_IS_NATIVE_THREAD(me)) _PR_INTSON(is);
- return PR_FAILURE;
+ return PR_FAILURE;
}
PR_IMPLEMENT(void) PR_SetThreadPriority(PRThread *thread,
PRThreadPriority newPri)
{
- /*
+ /*
First, pin down the priority. Not all compilers catch passing out of
range enum here. If we let bad values thru, priority queues won't work.
*/
@@ -1574,7 +1574,7 @@ PR_IMPLEMENT(void) PR_SetThreadPriority(PRThread *thread,
} else if ((PRIntn)newPri < (PRIntn)PR_PRIORITY_FIRST) {
newPri = PR_PRIORITY_FIRST;
}
-
+
if ( _PR_IS_NATIVE_THREAD(thread) ) {
thread->priority = newPri;
_PR_MD_SET_PRIORITY(&(thread->md), newPri);
@@ -1614,7 +1614,7 @@ PR_IMPLEMENT(const char *) PR_GetThreadName(const PRThread *thread)
/*
-** This routine prevents all other threads from running. This call is needed by
+** This routine prevents all other threads from running. This call is needed by
** the garbage collector.
*/
PR_IMPLEMENT(void) PR_SuspendAll(void)
@@ -1631,7 +1631,7 @@ PR_IMPLEMENT(void) PR_SuspendAll(void)
_PR_MD_BEGIN_SUSPEND_ALL();
for (qp = _PR_ACTIVE_LOCAL_THREADQ().next;
qp != &_PR_ACTIVE_LOCAL_THREADQ(); qp = qp->next) {
- if ((me != _PR_ACTIVE_THREAD_PTR(qp)) &&
+ if ((me != _PR_ACTIVE_THREAD_PTR(qp)) &&
_PR_IS_GCABLE_THREAD(_PR_ACTIVE_THREAD_PTR(qp))) {
_PR_Suspend(_PR_ACTIVE_THREAD_PTR(qp));
PR_ASSERT((_PR_ACTIVE_THREAD_PTR(qp))->state != _PR_RUNNING);
@@ -1642,13 +1642,13 @@ PR_IMPLEMENT(void) PR_SuspendAll(void)
if ((me != _PR_ACTIVE_THREAD_PTR(qp)) &&
_PR_IS_GCABLE_THREAD(_PR_ACTIVE_THREAD_PTR(qp)))
/* PR_Suspend(_PR_ACTIVE_THREAD_PTR(qp)); */
- _PR_MD_SUSPEND_THREAD(_PR_ACTIVE_THREAD_PTR(qp));
+ _PR_MD_SUSPEND_THREAD(_PR_ACTIVE_THREAD_PTR(qp));
}
_PR_MD_END_SUSPEND_ALL();
}
/*
-** This routine unblocks all other threads that were suspended from running by
+** This routine unblocks all other threads that were suspended from running by
** PR_SuspendAll(). This call is needed by the garbage collector.
*/
PR_IMPLEMENT(void) PR_ResumeAll(void)
@@ -1662,7 +1662,7 @@ PR_IMPLEMENT(void) PR_ResumeAll(void)
_PR_MD_BEGIN_RESUME_ALL();
for (qp = _PR_ACTIVE_LOCAL_THREADQ().next;
qp != &_PR_ACTIVE_LOCAL_THREADQ(); qp = qp->next) {
- if ((me != _PR_ACTIVE_THREAD_PTR(qp)) &&
+ if ((me != _PR_ACTIVE_THREAD_PTR(qp)) &&
_PR_IS_GCABLE_THREAD(_PR_ACTIVE_THREAD_PTR(qp)))
_PR_Resume(_PR_ACTIVE_THREAD_PTR(qp));
}
@@ -1784,7 +1784,7 @@ _PR_AddSleepQ(PRThread *thread, PRIntervalTime timeout)
** must be one) so that they remain relative to us.
*/
PR_ASSERT (thread->links.next != &_PR_SLEEPQ(cpu));
-
+
t = _PR_THREAD_PTR(thread->links.next);
PR_ASSERT(_PR_THREAD_PTR(t->links.prev) == thread);
t->sleep -= sleep;
@@ -1818,11 +1818,11 @@ _PR_DelSleepQ(PRThread *thread, PRBool propogate_time)
if (propogate_time == PR_TRUE) {
PRThread *after = _PR_THREAD_PTR(q);
after->sleep += thread->sleep;
- } else
+ } else
_PR_SLEEPQMAX(cpu) -= thread->sleep;
} else {
/* Check if prev is the beggining of the list; if so,
- * we are the only element on the list.
+ * we are the only element on the list.
*/
if (thread->links.prev != &_PR_SLEEPQ(cpu))
_PR_SLEEPQMAX(cpu) -= thread->sleep;
@@ -1834,7 +1834,7 @@ _PR_DelSleepQ(PRThread *thread, PRBool propogate_time)
thread->flags &= ~_PR_ON_PAUSEQ;
}
PR_REMOVE_LINK(&thread->links);
- } else
+ } else
PR_ASSERT(0);
}
diff --git a/pr/src/threads/prcthr.c b/pr/src/threads/prcthr.c
index d271f312..78401b9d 100644
--- a/pr/src/threads/prcthr.c
+++ b/pr/src/threads/prcthr.c
@@ -7,17 +7,17 @@
#if defined(WIN95)
/*
-** Some local variables report warnings on Win95 because the code paths
+** Some local variables report warnings on Win95 because the code paths
** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
** The pragma suppresses the warning.
-**
+**
*/
#pragma warning(disable : 4101)
#endif
extern PRLock *_pr_sleeplock; /* allocated and initialized in prinit */
-/*
+/*
** Routines common to both native and user threads.
**
**
@@ -188,7 +188,7 @@ PR_IMPLEMENT(PRStatus) PR_Interrupt(PRThread *thread)
/*
* Need to hold the thread lock when calling
* _PR_Unblock_IO_Wait(). On return lock is
- * released.
+ * released.
*/
#if defined(XP_UNIX) || defined(WINNT) || defined(WIN16)
if (!(thread->flags & _PR_INTERRUPT_BLOCKED))
@@ -326,7 +326,7 @@ PR_IMPLEMENT(PRThread*) PR_CreateThreadGCAble(PRThreadType type,
PRThreadState state,
PRUint32 stackSize)
{
- return _PR_CreateThread(type, start, arg, priority, scope, state,
+ return _PR_CreateThread(type, start, arg, priority, scope, state,
stackSize, _PR_GCABLE_THREAD);
}
@@ -339,7 +339,7 @@ PR_IMPLEMENT(PRThread*) PR_CreateThreadBound(PRThreadType type,
PRThreadState state,
PRUint32 stackSize)
{
- return _PR_CreateThread(type, start, arg, priority, scope, state,
+ return _PR_CreateThread(type, start, arg, priority, scope, state,
stackSize, _PR_BOUND_THREAD);
}
#endif
@@ -358,7 +358,7 @@ PR_IMPLEMENT(void) PR_SetThreadGCAble()
if (!_pr_initialized) _PR_ImplicitInitialization();
PR_Lock(_pr_activeLock);
_PR_MD_CURRENT_THREAD()->flags |= _PR_GCABLE_THREAD;
- PR_Unlock(_pr_activeLock);
+ PR_Unlock(_pr_activeLock);
}
PR_IMPLEMENT(void) PR_ClearThreadGCAble()
diff --git a/pr/src/threads/prdump.c b/pr/src/threads/prdump.c
index b40bee30..6c74eeaf 100644
--- a/pr/src/threads/prdump.c
+++ b/pr/src/threads/prdump.c
@@ -7,10 +7,10 @@
#if defined(WIN95)
/*
-** Some local variables report warnings on Win95 because the code paths
+** Some local variables report warnings on Win95 because the code paths
** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
** The pragma suppresses the warning.
-**
+**
*/
#pragma warning(disable : 4101)
#endif
diff --git a/pr/src/threads/prrwlock.c b/pr/src/threads/prrwlock.c
index 1dd9e0a9..baa8cb21 100644
--- a/pr/src/threads/prrwlock.c
+++ b/pr/src/threads/prrwlock.c
@@ -90,7 +90,7 @@ static void _PR_RELEASE_LOCK_STACK(void *lock_stack);
/*
* PR_NewRWLock
* Create a reader-writer lock, with the given lock rank and lock name
- *
+ *
*/
PR_IMPLEMENT(PRRWLock *)
@@ -118,7 +118,7 @@ PR_NewRWLock(PRUint32 lock_rank, const char *lock_name)
} else {
rwlock->rw_name = NULL;
}
-
+
#if defined(HAVE_UNIX98_RWLOCK) || defined(HAVE_UI_RWLOCK)
err = RWLOCK_INIT(&rwlock->rw_lock);
if (err != 0) {
@@ -148,7 +148,7 @@ PR_NewRWLock(PRUint32 lock_rank, const char *lock_name)
failed:
if (rwlock->rw_reader_waitq != NULL) {
- PR_DestroyCondVar(rwlock->rw_reader_waitq);
+ PR_DestroyCondVar(rwlock->rw_reader_waitq);
}
if (rwlock->rw_lock != NULL) {
PR_DestroyLock(rwlock->rw_lock);
@@ -171,8 +171,8 @@ PR_DestroyRWLock(PRRWLock *rwlock)
PR_ASSERT(err == 0);
#else
PR_ASSERT(rwlock->rw_reader_cnt == 0);
- PR_DestroyCondVar(rwlock->rw_reader_waitq);
- PR_DestroyCondVar(rwlock->rw_writer_waitq);
+ PR_DestroyCondVar(rwlock->rw_reader_waitq);
+ PR_DestroyCondVar(rwlock->rw_writer_waitq);
PR_DestroyLock(rwlock->rw_lock);
#endif
if (rwlock->rw_name != NULL)
@@ -196,7 +196,7 @@ int err;
* be equal to or greater than the highest rank of all the locks held by
* the thread.
*/
- PR_ASSERT((rwlock->rw_rank == PR_RWLOCK_RANK_NONE) ||
+ PR_ASSERT((rwlock->rw_rank == PR_RWLOCK_RANK_NONE) ||
(rwlock->rw_rank >= _PR_GET_THREAD_RWLOCK_RANK()));
#endif
@@ -250,7 +250,7 @@ int err;
* be equal to or greater than the highest rank of all the locks held by
* the thread.
*/
- PR_ASSERT((rwlock->rw_rank == PR_RWLOCK_RANK_NONE) ||
+ PR_ASSERT((rwlock->rw_rank == PR_RWLOCK_RANK_NONE) ||
(rwlock->rw_rank >= _PR_GET_THREAD_RWLOCK_RANK()));
#endif
@@ -409,7 +409,7 @@ PRStatus rv;
*/
if (lock_stack) {
if (lock_stack->trs_index < _PR_RWLOCK_RANK_ORDER_LIMIT)
- lock_stack->trs_stack[lock_stack->trs_index++] = rwlock;
+ lock_stack->trs_stack[lock_stack->trs_index++] = rwlock;
}
}
@@ -426,7 +426,7 @@ _PR_RELEASE_LOCK_STACK(void *lock_stack)
* return thread's lock rank. If thread-private-data for the lock
* stack is not allocated, return PR_RWLOCK_RANK_NONE.
*/
-
+
static PRUint32
_PR_GET_THREAD_RWLOCK_RANK(void)
{
@@ -445,7 +445,7 @@ _PR_GET_THREAD_RWLOCK_RANK(void)
* remove the rwlock from the lock stack. Since locks may not be
* unlocked in a FIFO order, the entire lock stack is searched.
*/
-
+
static void
_PR_UNSET_THREAD_RWLOCK_RANK(PRRWLock *rwlock)
{
diff --git a/pr/src/threads/prsem.c b/pr/src/threads/prsem.c
index f5f261fe..4b1617ca 100644
--- a/pr/src/threads/prsem.c
+++ b/pr/src/threads/prsem.c
@@ -61,16 +61,16 @@ PR_IMPLEMENT(void) PR_DestroySem(PRSemaphore *sem)
/*
** Wait on a Semaphore.
-**
-** This routine allows a calling thread to wait or proceed depending upon the
-** state of the semahore sem. The thread can proceed only if the counter value
-** of the semaphore sem is currently greater than 0. If the value of semaphore
-** sem is positive, it is decremented by one and the routine returns immediately
-** allowing the calling thread to continue. If the value of semaphore sem is 0,
-** the calling thread blocks awaiting the semaphore to be released by another
+**
+** This routine allows a calling thread to wait or proceed depending upon the
+** state of the semahore sem. The thread can proceed only if the counter value
+** of the semaphore sem is currently greater than 0. If the value of semaphore
+** sem is positive, it is decremented by one and the routine returns immediately
+** allowing the calling thread to continue. If the value of semaphore sem is 0,
+** the calling thread blocks awaiting the semaphore to be released by another
** thread.
-**
-** This routine can return PR_PENDING_INTERRUPT if the waiting thread
+**
+** This routine can return PR_PENDING_INTERRUPT if the waiting thread
** has been interrupted.
*/
PR_IMPLEMENT(PRStatus) PR_WaitSem(PRSemaphore *sem)
@@ -92,13 +92,13 @@ PR_IMPLEMENT(PRStatus) PR_WaitSem(PRSemaphore *sem)
sem->count--;
PR_Unlock(sem->cvar->lock);
#endif
-
+
return (status);
}
/*
-** This routine increments the counter value of the semaphore. If other threads
-** are blocked for the semaphore, then the scheduler will determine which ONE
+** This routine increments the counter value of the semaphore. If other threads
+** are blocked for the semaphore, then the scheduler will determine which ONE
** thread will be unblocked.
*/
PR_IMPLEMENT(void) PR_PostSem(PRSemaphore *sem)
@@ -132,7 +132,7 @@ PR_IMPLEMENT(PRUintn) PR_GetValueSem(PRSemaphore *sem)
rv = sem->count;
PR_Unlock(sem->cvar->lock);
#endif
-
+
return rv;
}
#endif
diff --git a/pr/src/threads/prtpd.c b/pr/src/threads/prtpd.c
index 96ed0403..650da675 100644
--- a/pr/src/threads/prtpd.c
+++ b/pr/src/threads/prtpd.c
@@ -39,10 +39,10 @@
#if defined(WIN95)
/*
-** Some local variables report warnings on Win95 because the code paths
+** Some local variables report warnings on Win95 because the code paths
** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
** The pragma suppresses the warning.
-**
+**
*/
#pragma warning(disable : 4101)
#endif
@@ -74,22 +74,22 @@ void _PR_CleanupTPD(void)
} /* _PR_CleanupTPD */
/*
-** This routine returns a new index for per-thread-private data table.
-** The index is visible to all threads within a process. This index can
-** be used with the PR_SetThreadPrivate() and PR_GetThreadPrivate() routines
+** This routine returns a new index for per-thread-private data table.
+** The index is visible to all threads within a process. This index can
+** be used with the PR_SetThreadPrivate() and PR_GetThreadPrivate() routines
** to save and retrieve data associated with the index for a thread.
**
-** The index independently maintains specific values for each binding thread.
+** The index independently maintains specific values for each binding thread.
** A thread can only get access to its own thread-specific-data.
**
** Upon a new index return the value associated with the index for all threads
-** is NULL, and upon thread creation the value associated with all indices for
-** that thread is NULL.
+** is NULL, and upon thread creation the value associated with all indices for
+** that thread is NULL.
**
** "dtor" is the destructor function to invoke when the private
** data is set or destroyed
**
-** Returns PR_FAILURE if the total number of indices will exceed the maximun
+** Returns PR_FAILURE if the total number of indices will exceed the maximun
** allowed.
*/
@@ -123,7 +123,7 @@ PR_IMPLEMENT(PRStatus) PR_NewThreadPrivateIndex(
/*
** Define some per-thread-private data.
** "index" is an index into the per-thread private data table
-** "priv" is the per-thread-private data
+** "priv" is the per-thread-private data
**
** If the per-thread private data table has a previously registered
** destructor function and a non-NULL per-thread-private data value,
@@ -191,9 +191,9 @@ PR_IMPLEMENT(PRStatus) PR_SetThreadPrivate(PRUintn index, void *priv)
/*
** Recover the per-thread-private data for the current thread. "index" is
-** the index into the per-thread private data table.
+** the index into the per-thread private data table.
**
-** The returned value may be NULL which is indistinguishable from an error
+** The returned value may be NULL which is indistinguishable from an error
** condition.
**
*/