| OLD | NEW |
| 1 /* ***** BEGIN LICENSE BLOCK ***** | 1 /* ***** BEGIN LICENSE BLOCK ***** |
| 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 3 * | 3 * |
| 4 * The contents of this file are subject to the Mozilla Public License Version | 4 * The contents of this file are subject to the Mozilla Public License Version |
| 5 * 1.1 (the "License"); you may not use this file except in compliance with | 5 * 1.1 (the "License"); you may not use this file except in compliance with |
| 6 * the License. You may obtain a copy of the License at | 6 * the License. You may obtain a copy of the License at |
| 7 * http://www.mozilla.org/MPL/ | 7 * http://www.mozilla.org/MPL/ |
| 8 * | 8 * |
| 9 * Software distributed under the License is distributed on an "AS IS" basis, | 9 * Software distributed under the License is distributed on an "AS IS" basis, |
| 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * in which case the provisions of the GPL or the LGPL are applicable instead | 26 * in which case the provisions of the GPL or the LGPL are applicable instead |
| 27 * of those above. If you wish to allow use of your version of this file only | 27 * of those above. If you wish to allow use of your version of this file only |
| 28 * under the terms of either the GPL or the LGPL, and not to allow others to | 28 * under the terms of either the GPL or the LGPL, and not to allow others to |
| 29 * use your version of this file under the terms of the MPL, indicate your | 29 * use your version of this file under the terms of the MPL, indicate your |
| 30 * decision by deleting the provisions above and replace them with the notice | 30 * decision by deleting the provisions above and replace them with the notice |
| 31 * and other provisions required by the GPL or the LGPL. If you do not delete | 31 * and other provisions required by the GPL or the LGPL. If you do not delete |
| 32 * the provisions above, a recipient may use your version of this file under | 32 * the provisions above, a recipient may use your version of this file under |
| 33 * the terms of any one of the MPL, the GPL or the LGPL. | 33 * the terms of any one of the MPL, the GPL or the LGPL. |
| 34 * | 34 * |
| 35 * ***** END LICENSE BLOCK ***** */ | 35 * ***** END LICENSE BLOCK ***** */ |
| 36 /* $Id: sslmutex.h,v 1.12 2009/06/05 02:34:15 nelson%bolyard.com Exp $ */ | 36 /* $Id: sslmutex.h,v 1.13 2011/09/30 23:27:08 rrelyea%redhat.com Exp $ */ |
| 37 #ifndef __SSLMUTEX_H_ | 37 #ifndef __SSLMUTEX_H_ |
| 38 #define __SSLMUTEX_H_ 1 | 38 #define __SSLMUTEX_H_ 1 |
| 39 | 39 |
| 40 /* What SSL really wants is portable process-shared unnamed mutexes in | 40 /* What SSL really wants is portable process-shared unnamed mutexes in |
| 41 * shared memory, that have the property that if the process that holds | 41 * shared memory, that have the property that if the process that holds |
| 42 * them dies, they are released automatically, and that (unlike fcntl | 42 * them dies, they are released automatically, and that (unlike fcntl |
| 43 * record locking) lock to the thread, not to the process. | 43 * record locking) lock to the thread, not to the process. |
| 44 * NSPR doesn't provide that. | 44 * NSPR doesn't provide that. |
| 45 * Windows has mutexes that meet that description, but they're not portable. | 45 * Windows has mutexes that meet that description, but they're not portable. |
| 46 * POSIX mutexes are not automatically released when the holder dies, | 46 * POSIX mutexes are not automatically released when the holder dies, |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 typedef int sslPID; | 131 typedef int sslPID; |
| 132 | 132 |
| 133 #endif | 133 #endif |
| 134 | 134 |
| 135 #include "seccomon.h" | 135 #include "seccomon.h" |
| 136 | 136 |
| 137 SEC_BEGIN_PROTOS | 137 SEC_BEGIN_PROTOS |
| 138 | 138 |
| 139 extern SECStatus sslMutex_Init(sslMutex *sem, int shared); | 139 extern SECStatus sslMutex_Init(sslMutex *sem, int shared); |
| 140 | 140 |
| 141 extern SECStatus sslMutex_Destroy(sslMutex *sem); | 141 /* If processLocal is set to true, then just free resources which are *only* ass
ociated |
| 142 * with the current process. Leave any shared resources (including the state of |
| 143 * shared memory) intact. */ |
| 144 extern SECStatus sslMutex_Destroy(sslMutex *sem, PRBool processLocal); |
| 142 | 145 |
| 143 extern SECStatus sslMutex_Unlock(sslMutex *sem); | 146 extern SECStatus sslMutex_Unlock(sslMutex *sem); |
| 144 | 147 |
| 145 extern SECStatus sslMutex_Lock(sslMutex *sem); | 148 extern SECStatus sslMutex_Lock(sslMutex *sem); |
| 146 | 149 |
| 147 #ifdef WINNT | 150 #ifdef WINNT |
| 148 | 151 |
| 149 extern SECStatus sslMutex_2LevelInit(sslMutex *sem); | 152 extern SECStatus sslMutex_2LevelInit(sslMutex *sem); |
| 150 | 153 |
| 151 #endif | 154 #endif |
| 152 | 155 |
| 153 SEC_END_PROTOS | 156 SEC_END_PROTOS |
| 154 | 157 |
| 155 #endif | 158 #endif |
| OLD | NEW |