Hi ! I am new to bsd internals and was looking at the implementation of syscall in sys/i386/i386/trap.c here its seems we get the handler for the syscall by if (p->p_sysent->sv_mask) code &= p->p_sysent->sv_mask;
if (code >= p->p_sysent->sv_size) callp = &p->p_sysent->sv_table[0]; else callp = &p->p_sysent->sv_table[code]; and call using if (error == 0) { td->td_retval[0] = 0; td->td_retval[1] = frame.tf_edx; STOPEVENT(p, S_SCE, narg); PTRACESTOP_SC(p, td, S_PT_SCE); error = (*callp->sy_call)(td, args); } My question is why we store the p->p_sysent->sv_table for each process. What is the reason for keeping this per process? Are there some situations where two processes can have different system calls available? Regards, Ravi _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"