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

Function alloc_sv_tk_compat32

freebsd/kern/kern_sharedpage.c:248–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246
247#ifdef COMPAT_FREEBSD32
248struct vdso_sv_tk *
249alloc_sv_tk_compat32(void)
250{
251 struct vdso_sv_tk *svtk;
252 int tk_base;
253 uint32_t tk_ver;
254
255 svtk = malloc(sizeof(struct vdso_sv_tk), M_TEMP, M_WAITOK | M_ZERO);
256 tk_ver = VDSO_TK_VER_CURR;
257 tk_base = shared_page_alloc(sizeof(struct vdso_timekeep32) +
258 sizeof(struct vdso_timehands32) * VDSO_TH_NUM, 16);
259 KASSERT(tk_base != -1, ("tk_base -1 for 32bit"));
260 shared_page_write(tk_base + offsetof(struct vdso_timekeep32,
261 tk_ver), sizeof(uint32_t), &tk_ver);
262 svtk->sv_timekeep_off = tk_base;
263 timekeep_push_vdso();
264 return (svtk);
265}
266#endif
267
268#ifdef RANDOM_FENESTRASX

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