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

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

Issue 1019063003: Update to NSPR 4.10.8 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@master
Patch Set: README bump Created 5 years, 8 months 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
« no previous file with comments | « nspr/pr/src/pthreads/ptthread.c ('k') | nspr/pr/src/threads/combined/pruthr.c » ('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 7
8 _PRCPU *_pr_primordialCPU = NULL; 8 _PRCPU *_pr_primordialCPU = NULL;
9 9
10 PRInt32 _pr_md_idle_cpus; /* number of idle cpus */ 10 PRInt32 _pr_md_idle_cpus; /* number of idle cpus */
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 static _PRCPUQueue *_PR_CreateCPUQueue(void) 117 static _PRCPUQueue *_PR_CreateCPUQueue(void)
118 { 118 {
119 PRInt32 index; 119 PRInt32 index;
120 _PRCPUQueue *cpuQueue; 120 _PRCPUQueue *cpuQueue;
121 cpuQueue = PR_NEWZAP(_PRCPUQueue); 121 cpuQueue = PR_NEWZAP(_PRCPUQueue);
122 122
123 _MD_NEW_LOCK( &cpuQueue->runQLock ); 123 _MD_NEW_LOCK( &cpuQueue->runQLock );
124 _MD_NEW_LOCK( &cpuQueue->sleepQLock ); 124 _MD_NEW_LOCK( &cpuQueue->sleepQLock );
125 _MD_NEW_LOCK( &cpuQueue->miscQLock ); 125 _MD_NEW_LOCK( &cpuQueue->miscQLock );
126 126
127 for (index = 0; index < PR_PRIORITY_LAST + 1; index++) 127 for (index = 0; index < PR_ARRAY_SIZE(cpuQueue->runQ); index++)
128 PR_INIT_CLIST( &(cpuQueue->runQ[index]) ); 128 PR_INIT_CLIST( &(cpuQueue->runQ[index]) );
129 PR_INIT_CLIST( &(cpuQueue->sleepQ) ); 129 PR_INIT_CLIST( &(cpuQueue->sleepQ) );
130 PR_INIT_CLIST( &(cpuQueue->pauseQ) ); 130 PR_INIT_CLIST( &(cpuQueue->pauseQ) );
131 PR_INIT_CLIST( &(cpuQueue->suspendQ) ); 131 PR_INIT_CLIST( &(cpuQueue->suspendQ) );
132 PR_INIT_CLIST( &(cpuQueue->waitingToJoinQ) ); 132 PR_INIT_CLIST( &(cpuQueue->waitingToJoinQ) );
133 133
134 cpuQueue->numCPUs = 1; 134 cpuQueue->numCPUs = 1;
135 135
136 return cpuQueue; 136 return cpuQueue;
137 } 137 }
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 #endif 396 #endif
397 } 397 }
398 398
399 PR_IMPLEMENT(_PRCPU *) _PR_GetPrimordialCPU(void) 399 PR_IMPLEMENT(_PRCPU *) _PR_GetPrimordialCPU(void)
400 { 400 {
401 if (_pr_primordialCPU) 401 if (_pr_primordialCPU)
402 return _pr_primordialCPU; 402 return _pr_primordialCPU;
403 else 403 else
404 return _PR_MD_CURRENT_CPU(); 404 return _PR_MD_CURRENT_CPU();
405 } 405 }
OLDNEW
« no previous file with comments | « nspr/pr/src/pthreads/ptthread.c ('k') | nspr/pr/src/threads/combined/pruthr.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698