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

Side by Side Diff: nspr/pr/include/prpdce.h

Issue 2078763002: Delete bundled copy of NSS and replace with README. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss@master
Patch Set: Delete bundled copy of NSS and replace with README. Created 4 years, 6 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/include/prolock.h ('k') | nspr/pr/include/prprf.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
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/. */
5
6 /*
7 * File: prpdce.h
8 * Description: This file is the API defined to allow for DCE (aka POSIX)
9 * thread emulation in an NSPR environment. It is n ot the
10 * intent that this be a fully supported API.
11 */
12
13 #if !defined(PRPDCE_H)
14 #define PRPDCE_H
15
16 #include "prlock.h"
17 #include "prcvar.h"
18 #include "prtypes.h"
19 #include "prinrval.h"
20
21 PR_BEGIN_EXTERN_C
22
23 #define _PR_NAKED_CV_LOCK (PRLock*)0xdce1dce1
24
25 /*
26 ** Test and acquire a lock.
27 **
28 ** If the lock is acquired by the calling thread, the
29 ** return value will be PR_SUCCESS. If the lock is
30 ** already held, by another thread or this thread, the
31 ** result will be PR_FAILURE.
32 */
33 NSPR_API(PRStatus) PRP_TryLock(PRLock *lock);
34
35 /*
36 ** Create a naked condition variable
37 **
38 ** A "naked" condition variable is one that is not created bound
39 ** to a lock. The CV created with this function is the only type
40 ** that may be used in the subsequent "naked" condition variable
41 ** operations (see PRP_NakedWait, PRP_NakedNotify, PRP_NakedBroadcast);
42 */
43 NSPR_API(PRCondVar*) PRP_NewNakedCondVar(void);
44
45 /*
46 ** Destroy a naked condition variable
47 **
48 ** Destroy the condition variable created by PR_NewNakedCondVar.
49 */
50 NSPR_API(void) PRP_DestroyNakedCondVar(PRCondVar *cvar);
51
52 /*
53 ** Wait on a condition
54 **
55 ** Wait on the condition variable 'cvar'. It is asserted that
56 ** the lock protecting the condition 'lock' is held by the
57 ** calling thread. If more time expires than that declared in
58 ** 'timeout' the condition will be notified. Waits can be
59 ** interrupted by another thread.
60 **
61 ** NB: The CV ('cvar') must be one created using PR_NewNakedCondVar.
62 */
63 NSPR_API(PRStatus) PRP_NakedWait(
64 PRCondVar *cvar, PRLock *lock, PRIntervalTime timeout);
65
66 /*
67 ** Notify a thread waiting on a condition
68 **
69 ** Notify the condition specified 'cvar'.
70 **
71 ** NB: The CV ('cvar') must be one created using PR_NewNakedCondVar.
72 */
73 NSPR_API(PRStatus) PRP_NakedNotify(PRCondVar *cvar);
74
75 /*
76 ** Notify all threads waiting on a condition
77 **
78 ** Notify the condition specified 'cvar'.
79 **
80 ** NB: The CV ('cvar') must be one created using PR_NewNakedCondVar.
81 */
82 NSPR_API(PRStatus) PRP_NakedBroadcast(PRCondVar *cvar);
83
84 PR_END_EXTERN_C
85
86 #endif /* PRPDCE_H */
OLDNEW
« no previous file with comments | « nspr/pr/include/prolock.h ('k') | nspr/pr/include/prprf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698