Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_syscall.c
Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | #ifdef KDTRACE_HOOKS | ||||
/* Give the syscall:::entry DTrace probe a chance to fire. */ | /* Give the syscall:::entry DTrace probe a chance to fire. */ | ||||
if (__predict_false(systrace_enabled && sa->callp->sy_entry != 0)) | if (__predict_false(systrace_enabled && sa->callp->sy_entry != 0)) | ||||
(*systrace_probe_func)(sa, SYSTRACE_ENTRY, 0); | (*systrace_probe_func)(sa, SYSTRACE_ENTRY, 0); | ||||
#endif | #endif | ||||
/* Let system calls set td_errno directly. */ | /* Let system calls set td_errno directly. */ | ||||
td->td_pflags &= ~TDP_NERRNO; | td->td_pflags &= ~TDP_NERRNO; | ||||
/* | |||||
* Fetch fast sigblock value at the time of syscall | |||||
* entry because sleepqueue primitives might call | |||||
* cursig(). | |||||
*/ | |||||
fetch_fast_sigblock(td); | |||||
AUDIT_SYSCALL_ENTER(sa->code, td); | AUDIT_SYSCALL_ENTER(sa->code, td); | ||||
error = (sa->callp->sy_call)(td, sa->args); | error = (sa->callp->sy_call)(td, sa->args); | ||||
AUDIT_SYSCALL_EXIT(error, td); | AUDIT_SYSCALL_EXIT(error, td); | ||||
/* Save the latest error return value. */ | /* Save the latest error return value. */ | ||||
if ((td->td_pflags & TDP_NERRNO) == 0) | if ((td->td_pflags & TDP_NERRNO) == 0) | ||||
td->td_errno = error; | td->td_errno = error; | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |