- Notifications
You must be signed in to change notification settings - Fork5
Commita41463e
committed
win32 doesn't support a static initializer for mutexes, thus the first
user must initialize the lock. The problem are concurrent "first" users- the pthread_mutex_t initialization must be synchronized.The current implementation is broken, the attached patches fixes that:mutex_initlock is a spinlock. If the pthread_mutex_t mutex is notinitialized, then the spinlock is acquired, if the pthread_mutex_t isinitialized if it's not yet initialized and then the spinlock isdropped.Manfred Spraul1 parentc14a43f commita41463e
2 files changed
+22
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
3193 | 3193 | | |
3194 | 3194 | | |
3195 | 3195 | | |
3196 | | - | |
3197 | | - | |
3198 | | - | |
3199 | | - | |
| 3196 | + | |
| 3197 | + | |
| 3198 | + | |
| 3199 | + | |
| 3200 | + | |
| 3201 | + | |
| 3202 | + | |
| 3203 | + | |
| 3204 | + | |
| 3205 | + | |
3200 | 3206 | | |
3201 | 3207 | | |
3202 | 3208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | | - | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
874 | 880 | | |
875 | 881 | | |
876 | 882 | | |
| |||
0 commit comments
Comments
(0)