forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf4c5e06
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 not> initialized, then the spinlock is acquired, if the pthread_mutex_t is> initialized if it's not yet initialized and then the spinlock is dropped.Manfred Spraul1 parenta29d26a commitf4c5e06
2 files changed
+22
-10
lines changedLines changed: 11 additions & 5 deletions
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 |
| |
|
Lines changed: 11 additions & 5 deletions
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)