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

Function alloc_sv_tk

freebsd/kern/kern_sharedpage.c:228–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228struct vdso_sv_tk *
229alloc_sv_tk(void)
230{
231 struct vdso_sv_tk *svtk;
232 int tk_base;
233 uint32_t tk_ver;
234
235 tk_ver = VDSO_TK_VER_CURR;
236 svtk = malloc(sizeof(struct vdso_sv_tk), M_TEMP, M_WAITOK | M_ZERO);
237 tk_base = shared_page_alloc(sizeof(struct vdso_timekeep) +
238 sizeof(struct vdso_timehands) * VDSO_TH_NUM, 16);
239 KASSERT(tk_base != -1, ("tk_base -1 for native"));
240 shared_page_write(tk_base + offsetof(struct vdso_timekeep, tk_ver),
241 sizeof(uint32_t), &tk_ver);
242 svtk->sv_timekeep_off = tk_base;
243 timekeep_push_vdso();
244 return (svtk);
245}
246
247#ifdef COMPAT_FREEBSD32
248struct vdso_sv_tk *

Callers 1

exec_sysvec_initFunction · 0.85

Calls 4

mallocFunction · 0.85
shared_page_allocFunction · 0.85
shared_page_writeFunction · 0.85
timekeep_push_vdsoFunction · 0.70

Tested by

no test coverage detected