MCPcopy Create free account
hub / github.com/F-Stack/f-stack / getthmember

Function getthmember

freebsd/kern/kern_tc.c:247–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245} while (0)
246
247static __inline void
248getthmember(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) \
261do { \
262 getthmember(dst, sizeof(*dst), __offsetof(struct timehands, \

Callers

nothing calls this directly

Calls 2

memcpyFunction · 0.50
atomic_thread_fence_acqFunction · 0.50

Tested by

no test coverage detected