mirror of
https://git.freebsd.org/src.git
synced 2026-01-12 06:54:03 +00:00
kern_syscall_deregister: document syscall 0 no-op logic
Document syscall #0 being handled specially in `kern_syscall_deregister(..)`: it's a reserved syscall and not dynamically registered, and hence does not need to be deregistered in the function. Co-authored-by: ngie@ MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D54326
This commit is contained in:
parent
4028504b48
commit
f384784289
1 changed files with 8 additions and 2 deletions
|
|
@ -161,8 +161,14 @@ kern_syscall_deregister(struct sysent *sysents, int offset,
|
|||
{
|
||||
struct sysent *se;
|
||||
|
||||
if (offset == 0)
|
||||
return (0); /* XXX? */
|
||||
if (offset == 0) {
|
||||
/*
|
||||
* Syscall #0 is reserved and is not dynamically registered.
|
||||
* Treat deregistration as a no-op to simplify module unload
|
||||
* paths.
|
||||
*/
|
||||
return (0);
|
||||
}
|
||||
|
||||
se = &sysents[offset];
|
||||
if ((se->sy_thrcnt & SY_THR_STATIC) != 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue