| 245 | } while (0) |
| 246 | |
| 247 | static __inline void |
| 248 | getthmember(void *out, size_t out_size, u_int off) |
| 249 | { |
| 250 | struct timehands *th; |
| 251 | u_int gen; |
| 252 | |
| 253 | do { |
| 254 | th = timehands; |
| 255 | gen = atomic_load_acq_int(&th->th_generation); |
| 256 | memcpy(out, (char *)th + off, out_size); |
| 257 | atomic_thread_fence_acq(); |
| 258 | } while (gen == 0 || gen != th->th_generation); |
| 259 | } |
| 260 | #define GETTHMEMBER(dst, member) \ |
| 261 | do { \ |
| 262 | getthmember(dst, sizeof(*dst), __offsetof(struct timehands, \ |
nothing calls this directly
no test coverage detected