コード例 #1
0
int
syscall_deregister(int *offset, struct sysent *old_sysent)
{

	if (*offset) {
		syscall_thread_drain(&sysent[*offset]);
		sysent[*offset] = *old_sysent;
	}
	return (0);
}
コード例 #2
0
ファイル: kern_syscalls.c プロジェクト: Lxg1582/freebsd
int
syscall_deregister(int *offset, struct sysent *old_sysent)
{
	struct sysent *se;

	if (*offset == 0)
		return (0); /* XXX? */

	se = &sysent[*offset];
	if ((se->sy_thrcnt & SY_THR_STATIC) != 0)
		return (EINVAL);
	syscall_thread_drain(se);
	sysent[*offset] = *old_sysent;
	return (0);
}