| 176 | |
| 177 | #ifdef COMPAT_FREEBSD32 |
| 178 | static void |
| 179 | timehands_update32(struct vdso_sv_tk *svtk) |
| 180 | { |
| 181 | struct vdso_timehands32 th; |
| 182 | struct vdso_timekeep32 *tk; |
| 183 | uint32_t enabled, idx; |
| 184 | |
| 185 | enabled = tc_fill_vdso_timehands32(&th); |
| 186 | th.th_gen = 0; |
| 187 | idx = svtk->sv_timekeep_curr; |
| 188 | if (++idx >= VDSO_TH_NUM) |
| 189 | idx = 0; |
| 190 | svtk->sv_timekeep_curr = idx; |
| 191 | if (++svtk->sv_timekeep_gen == 0) |
| 192 | svtk->sv_timekeep_gen = 1; |
| 193 | |
| 194 | tk = (struct vdso_timekeep32 *)(shared_page_mapping + |
| 195 | svtk->sv_timekeep_off); |
| 196 | tk->tk_th[idx].th_gen = 0; |
| 197 | atomic_thread_fence_rel(); |
| 198 | if (enabled) |
| 199 | tk->tk_th[idx] = th; |
| 200 | atomic_store_rel_32(&tk->tk_th[idx].th_gen, svtk->sv_timekeep_gen); |
| 201 | atomic_store_rel_32(&tk->tk_current, idx); |
| 202 | tk->tk_enabled = enabled; |
| 203 | } |
| 204 | #endif |
| 205 | |
| 206 | /* |
no test coverage detected