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

Function syscall_thread_enter

freebsd/kern/kern_syscalls.c:82–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82int
83syscall_thread_enter(struct thread *td, struct sysent *se)
84{
85 u_int32_t cnt, oldcnt;
86
87 KASSERT((se->sy_thrcnt & SY_THR_STATIC) == 0,
88 ("%s: not a static syscall", __func__));
89
90 do {
91 oldcnt = se->sy_thrcnt;
92 if ((oldcnt & (SY_THR_DRAINING | SY_THR_ABSENT)) != 0)
93 return (ENOSYS);
94 cnt = oldcnt + SY_THR_INCR;
95 } while (atomic_cmpset_acq_32(&se->sy_thrcnt, oldcnt, cnt) == 0);
96 return (0);
97}
98
99void
100syscall_thread_exit(struct thread *td, struct sysent *se)

Callers 1

syscallenterFunction · 0.85

Calls 1

atomic_cmpset_acq_32Function · 0.85

Tested by

no test coverage detected