Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1475)

Side by Side Diff: nspr/pr/src/threads/combined/pruthr.c

Issue 68173008: Update to NSPR 4.10.2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Update README.chromium Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « nspr/pr/src/pthreads/ptthread.c ('k') | scripts/nspr-checkout.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public 2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 5
6 #include "primpl.h" 6 #include "primpl.h"
7 #include <signal.h> 7 #include <signal.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #if defined(WIN95) 10 #if defined(WIN95)
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 static void _PR_InitializeNativeStack(PRThreadStack *ts); 58 static void _PR_InitializeNativeStack(PRThreadStack *ts);
59 static void _PR_InitializeRecycledThread(PRThread *thread); 59 static void _PR_InitializeRecycledThread(PRThread *thread);
60 static void _PR_UserRunThread(void); 60 static void _PR_UserRunThread(void);
61 61
62 void _PR_InitThreads(PRThreadType type, PRThreadPriority priority, 62 void _PR_InitThreads(PRThreadType type, PRThreadPriority priority,
63 PRUintn maxPTDs) 63 PRUintn maxPTDs)
64 { 64 {
65 PRThread *thread; 65 PRThread *thread;
66 PRThreadStack *stack; 66 PRThreadStack *stack;
67 67
68 PR_ASSERT(priority == PR_PRIORITY_NORMAL);
69
68 _pr_terminationCVLock = PR_NewLock(); 70 _pr_terminationCVLock = PR_NewLock();
69 _pr_activeLock = PR_NewLock(); 71 _pr_activeLock = PR_NewLock();
70 72
71 #ifndef HAVE_CUSTOM_USER_THREADS 73 #ifndef HAVE_CUSTOM_USER_THREADS
72 stack = PR_NEWZAP(PRThreadStack); 74 stack = PR_NEWZAP(PRThreadStack);
73 #ifdef HAVE_STACK_GROWING_UP 75 #ifdef HAVE_STACK_GROWING_UP
74 stack->stackTop = (char*) ((((long)&type) >> _pr_pageShift) 76 stack->stackTop = (char*) ((((long)&type) >> _pr_pageShift)
75 << _pr_pageShift); 77 << _pr_pageShift);
76 #else 78 #else
77 #if defined(SOLARIS) || defined (UNIXWARE) && defined (USR_SVR4_THREADS) 79 #if defined(SOLARIS) || defined (UNIXWARE) && defined (USR_SVR4_THREADS)
(...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 _PR_RUNQ_LOCK(cpu); 1880 _PR_RUNQ_LOCK(cpu);
1879 _PR_ADD_RUNQ(thread, cpu, pri); 1881 _PR_ADD_RUNQ(thread, cpu, pri);
1880 _PR_RUNQ_UNLOCK(cpu); 1882 _PR_RUNQ_UNLOCK(cpu);
1881 if (!_PR_IS_NATIVE_THREAD(me) && (cpu == me->cpu)) { 1883 if (!_PR_IS_NATIVE_THREAD(me) && (cpu == me->cpu)) {
1882 if (pri > me->priority) { 1884 if (pri > me->priority) {
1883 _PR_SET_RESCHED_FLAG(); 1885 _PR_SET_RESCHED_FLAG();
1884 } 1886 }
1885 } 1887 }
1886 #endif 1888 #endif
1887 } 1889 }
OLDNEW
« no previous file with comments | « nspr/pr/src/pthreads/ptthread.c ('k') | scripts/nspr-checkout.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698