- Notifications
You must be signed in to change notification settings - Fork5
Commit4039c73
committed
Adjust spin.c's spinlock emulation so that 0 is not a valid spinlock value.
We've had repeated troubles over the years with failures to initializespinlocks correctly; see6b93fcd for a recent example. Most of the time,on most platforms, such oversights can escape notice because all-zeroes isthe expected initial content of an slock_t variable. The only platformwe have where the initialized state of an slock_t isn't zeroes is HPPA,and that's practically gone in the wild. To make it easier to catch sucherrors without needing one of those, adjust the --disable-spinlocks codeso that zero is not a valid value for an slock_t for it.In passing, remove a bunch of unnecessary #include's from spin.c;commitdaa7527 removed all the intermodule coupling thatmade them necessary.1 parent5fdda1c commit4039c73
1 file changed
+22
-8
lines changedLines changed: 22 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
26 |
| - | |
27 |
| - | |
28 |
| - | |
29 | 25 |
| |
30 | 26 |
| |
31 | 27 |
| |
| |||
85 | 81 |
| |
86 | 82 |
| |
87 | 83 |
| |
88 |
| - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
89 | 95 |
| |
90 | 96 |
| |
91 | 97 |
| |
92 | 98 |
| |
93 | 99 |
| |
94 | 100 |
| |
95 | 101 |
| |
96 |
| - | |
| 102 | + | |
97 | 103 |
| |
98 | 104 |
| |
99 | 105 |
| |
100 | 106 |
| |
101 | 107 |
| |
102 |
| - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
103 | 113 |
| |
104 | 114 |
| |
105 | 115 |
| |
| |||
113 | 123 |
| |
114 | 124 |
| |
115 | 125 |
| |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
116 | 130 |
| |
117 |
| - | |
| 131 | + | |
118 | 132 |
| |
119 | 133 |
| |
120 | 134 |
|
0 commit comments
Comments
(0)