Commit 07a1466
mca/threads: fix tsd management
To suppress Valgrind warnings, opal_tsd_keys_destruct() needs to explicitly
release TSD values of the main thread. However, they were not freed if keys are
created by non-main threads. This patch fixes it.
This patch also optimizes allocation of opal_tsd_key_values by doubling its size
when count >= length instead of increasing the size by one.
Signed-off-by: Shintaro Iwasaki <[email protected]>1 parent 2be1de7 commit 07a1466
File tree
2 files changed
+30
-13
lines changed- opal/mca/threads
- argobots
- pthreads
2 files changed
+30
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | | - | |
99 | | - | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
| |||
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
132 | 134 | | |
| 135 | + | |
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
| 139 | + | |
136 | 140 | | |
137 | 141 | | |
138 | 142 | | |
| |||
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| 148 | + | |
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
| |||
152 | 157 | | |
153 | 158 | | |
154 | 159 | | |
| 160 | + | |
155 | 161 | | |
| 162 | + | |
156 | 163 | | |
| 164 | + | |
157 | 165 | | |
158 | 166 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
| 40 | + | |
42 | 41 | | |
43 | 42 | | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
98 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
99 | 103 | | |
| 104 | + | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| 108 | + | |
103 | 109 | | |
104 | 110 | | |
105 | 111 | | |
| |||
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
| 117 | + | |
111 | 118 | | |
112 | 119 | | |
113 | 120 | | |
| |||
119 | 126 | | |
120 | 127 | | |
121 | 128 | | |
| 129 | + | |
122 | 130 | | |
| 131 | + | |
123 | 132 | | |
| 133 | + | |
124 | 134 | | |
125 | 135 | | |
126 | 136 | | |
127 | 137 | | |
128 | 138 | | |
129 | | - | |
130 | 139 | | |
131 | 140 | | |
132 | 141 | | |
| |||
0 commit comments