Commit a50195c
libtcb: Use thread-local storage for tcb_drop_priv and tcb_gain_priv.
tcb_drop_priv and tcb_gain_priv now use per-thread storage areas for
their operations, allocated upon the first call in each thread that
uses them. This makes it safe to call these functions from multiple
threads simultaneously.
The introduction of this feature is a safety net against sloppy coding.
Programs are still strongly encouraged to use the reentrant functions
tcb_drop_priv_r and tcb_gain_priv_r instead.
Signed-off-by: Björn Esser <[email protected]>1 parent 557818c commit a50195c
2 files changed
+28
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
14 | 29 | | |
15 | 30 | | |
16 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 142 | | |
146 | 143 | | |
147 | 144 | | |
| |||
247 | 244 | | |
248 | 245 | | |
249 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
250 | 256 | | |
251 | 257 | | |
252 | | - | |
253 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
254 | 261 | | |
255 | 262 | | |
256 | 263 | | |
257 | 264 | | |
258 | | - | |
| 265 | + | |
259 | 266 | | |
260 | 267 | | |
261 | 268 | | |
| |||
0 commit comments