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

Side by Side Diff: nss/lib/dev/devslot.c

Issue 1504923011: Update NSS to 3.21 RTM and NSPR to 4.11 RTM (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Created 5 years 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
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 #include "pkcs11.h" 5 #include "pkcs11.h"
6 6
7 #ifndef DEVM_H 7 #ifndef DEVM_H
8 #include "devm.h" 8 #include "devm.h"
9 #endif /* DEVM_H */ 9 #endif /* DEVM_H */
10 10
11 #ifndef CKHELPER_H 11 #ifndef CKHELPER_H
12 #include "ckhelper.h" 12 #include "ckhelper.h"
13 #endif /* CKHELPER_H */ 13 #endif /* CKHELPER_H */
14 14
15 #include "pk11pub.h" 15 #include "pk11pub.h"
16 16
17 /* measured in seconds */ 17 /* measured in seconds */
18 #define NSSSLOT_TOKEN_DELAY_TIME 1 18 #define NSSSLOT_TOKEN_DELAY_TIME 1
19 19
20 /* this should track global and per-transaction login information */ 20 /* this should track global and per-transaction login information */
21 21
22 #define NSSSLOT_IS_FRIENDLY(slot) \ 22 #define NSSSLOT_IS_FRIENDLY(slot) \
23 (slot->base.flags & NSSSLOT_FLAGS_FRIENDLY) 23 (slot->base.flags & NSSSLOT_FLAGS_FRIENDLY)
24 24
25 /* measured as interval */ 25 /* measured as interval */
26 static PRIntervalTime s_token_delay_time = 0; 26 static PRIntervalTime s_token_delay_time = 0;
27 27
28 /* The flags needed to open a read-only session. */
29 static const CK_FLAGS s_ck_readonly_flags = CKF_SERIAL_SESSION;
30
31 NSS_IMPLEMENT PRStatus 28 NSS_IMPLEMENT PRStatus
32 nssSlot_Destroy ( 29 nssSlot_Destroy (
33 NSSSlot *slot 30 NSSSlot *slot
34 ) 31 )
35 { 32 {
36 if (slot) { 33 if (slot) {
37 if (PR_ATOMIC_DECREMENT(&slot->base.refCount) == 0) { 34 if (PR_ATOMIC_DECREMENT(&slot->base.refCount) == 0) {
38 PZ_DestroyLock(slot->base.lock); 35 PZ_DestroyLock(slot->base.lock);
39 return nssArena_Destroy(slot->base.arena); 36 return nssArena_Destroy(slot->base.arena);
40 } 37 }
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 248 }
252 249
253 NSS_EXTERN PRBool 250 NSS_EXTERN PRBool
254 nssSession_IsReadWrite ( 251 nssSession_IsReadWrite (
255 nssSession *s 252 nssSession *s
256 ) 253 )
257 { 254 {
258 return s->isRW; 255 return s->isRW;
259 } 256 }
260 257
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698