OLD | NEW |
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 #ifdef DEBUG | |
6 static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$"; | |
7 #endif /* DEBUG */ | |
8 | |
9 /* | 5 /* |
10 * hash.c | 6 * hash.c |
11 * | 7 * |
12 * This is merely a couple wrappers around NSPR's PLHashTable, using | 8 * This is merely a couple wrappers around NSPR's PLHashTable, using |
13 * the identity hash and arena-aware allocators. The reason I did | 9 * the identity hash and arena-aware allocators. The reason I did |
14 * this is that hash tables are used in a few places throughout the | 10 * this is that hash tables are used in a few places throughout the |
15 * NSS Cryptoki Framework in a fairly stereotyped way, and this allows | 11 * NSS Cryptoki Framework in a fairly stereotyped way, and this allows |
16 * me to pull the commonalities into one place. Should we ever want | 12 * me to pull the commonalities into one place. Should we ever want |
17 * to change the implementation, it's all right here. | 13 * to change the implementation, it's all right here. |
18 */ | 14 */ |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 if( CKR_OK != nssCKFWMutex_Lock(hash->mutex) ) { | 293 if( CKR_OK != nssCKFWMutex_Lock(hash->mutex) ) { |
298 return; | 294 return; |
299 } | 295 } |
300 | 296 |
301 PL_HashTableEnumerateEntries(hash->plHashTable, nss_ckfwhash_enumerator, &as); | 297 PL_HashTableEnumerateEntries(hash->plHashTable, nss_ckfwhash_enumerator, &as); |
302 | 298 |
303 (void)nssCKFWMutex_Unlock(hash->mutex); | 299 (void)nssCKFWMutex_Unlock(hash->mutex); |
304 | 300 |
305 return; | 301 return; |
306 } | 302 } |
OLD | NEW |