Commit 74b6d9c
committed
Address thread-safety in lcms helpers
Add clarifying comments about concurrency and ThreadSanitizer findings in two lcms sources. In cmsplugin.c note that gmtime()'s shared static result is copied while holding the LCMS mutex to avoid TSan-reported races when creating ICC profiles concurrently. In cmswtpnt.c document that the D50 XYZ constant is safe for concurrent readers and that the xyY value is computed in a thread-confined way to avoid writing to a shared static on each call.1 parent 2520dc1 commit 74b6d9c
2 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1060 | 1063 | | |
1061 | 1064 | | |
1062 | 1065 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| |||
351 | 356 | | |
352 | 357 | | |
353 | 358 | | |
354 | | - | |
| |||
0 commit comments