Changeset 36d62b40229738ff1bcc1ced472cc06a2e25c686
- Timestamp:
- 21/01/08 17:15:41
(11 months ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1200932141 +0000
- git-parent:
[d8cfcc7785b36b3dd93f01a2693ffc7bd9da8669]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1200932141 +0000
- Message:
Remove useless mutex (pthread_once is enough)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2a0e2bd |
r36d62b4 |
|
| 107 | 107 | int retval; |
|---|
| 108 | 108 | #ifndef WIN32 |
|---|
| 109 | | static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; |
|---|
| 110 | 109 | static pthread_once_t once = PTHREAD_ONCE_INIT; |
|---|
| 111 | 110 | |
|---|
| 112 | | pthread_mutex_lock (&mutex); |
|---|
| 113 | 111 | pthread_once (&once, initonce_libgcrypt); |
|---|
| 114 | 112 | #else |
|---|
| … | … | |
| 119 | 117 | |
|---|
| 120 | 118 | retval = libgcrypt_usable ? 0 : -1; |
|---|
| 121 | | |
|---|
| 122 | | #ifndef WIN32 |
|---|
| 123 | | pthread_mutex_unlock (&mutex); |
|---|
| 124 | | #endif |
|---|
| 125 | 119 | |
|---|
| 126 | 120 | return retval; |
|---|