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

Side by Side Diff: nspr/pr/src/pthreads/ptsynch.c

Issue 407383002: Update to NSPR 4.10.7 Beta 3. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « nspr/pr/src/pthreads/ptio.c ('k') | nspr/pr/src/threads/prtpd.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 /* 6 /*
7 ** File: ptsynch.c 7 ** File: ptsynch.c
8 ** Descritpion: Implemenation for thread synchronization using pthreads 8 ** Descritpion: Implemenation for thread synchronization using pthreads
9 ** Exports: prlock.h, prcvar.h, prmon.h, prcmon.h 9 ** Exports: prlock.h, prcvar.h, prmon.h, prcmon.h
10 */ 10 */
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 mon->refCount = 1; 507 mon->refCount = 1;
508 mon->name = NULL; 508 mon->name = NULL;
509 return mon; 509 return mon;
510 510
511 error3: 511 error3:
512 pthread_cond_destroy(&mon->entryCV); 512 pthread_cond_destroy(&mon->entryCV);
513 error2: 513 error2:
514 pthread_mutex_destroy(&mon->lock); 514 pthread_mutex_destroy(&mon->lock);
515 error1: 515 error1:
516 PR_Free(mon); 516 PR_Free(mon);
517 PR_SetError(PR_OPERATION_NOT_SUPPORTED_ERROR, 0); 517 _PR_MD_MAP_DEFAULT_ERROR(rv);
518 return NULL; 518 return NULL;
519 } /* PR_NewMonitor */ 519 } /* PR_NewMonitor */
520 520
521 PR_IMPLEMENT(PRMonitor*) PR_NewNamedMonitor(const char* name) 521 PR_IMPLEMENT(PRMonitor*) PR_NewNamedMonitor(const char* name)
522 { 522 {
523 PRMonitor* mon = PR_NewMonitor(); 523 PRMonitor* mon = PR_NewMonitor();
524 if (mon) 524 if (mon)
525 mon->name = name; 525 mon->name = name;
526 return mon; 526 return mon;
527 } 527 }
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 int rv; 1231 int rv;
1232 PR_ASSERT(cvar != NULL); 1232 PR_ASSERT(cvar != NULL);
1233 rv = pthread_cond_broadcast(&cvar->cv); 1233 rv = pthread_cond_broadcast(&cvar->cv);
1234 PR_ASSERT(0 == rv); 1234 PR_ASSERT(0 == rv);
1235 return PR_SUCCESS; 1235 return PR_SUCCESS;
1236 } /* PRP_NakedBroadcast */ 1236 } /* PRP_NakedBroadcast */
1237 1237
1238 #endif /* defined(_PR_PTHREADS) */ 1238 #endif /* defined(_PR_PTHREADS) */
1239 1239
1240 /* ptsynch.c */ 1240 /* ptsynch.c */
OLDNEW
« no previous file with comments | « nspr/pr/src/pthreads/ptio.c ('k') | nspr/pr/src/threads/prtpd.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698