X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3e170ce000f1506b7b5d2c5c7faec85ceabb573d..7e41aa883dd258f888d0470250eead40a53ef1f5:/bsd/kern/kern_xxx.c diff --git a/bsd/kern/kern_xxx.c b/bsd/kern/kern_xxx.c index dde94f5a2..0fe1cfa30 100644 --- a/bsd/kern/kern_xxx.c +++ b/bsd/kern/kern_xxx.c @@ -85,6 +85,9 @@ #include #endif +int pshm_cache_purge_all(proc_t p); +int psem_cache_purge_all(proc_t p); + int reboot(struct proc *p, register struct reboot_args *uap, __unused int32_t *retval) { @@ -127,3 +130,19 @@ reboot(struct proc *p, register struct reboot_args *uap, __unused int32_t *retva } return(error); } + +int +usrctl(struct proc *p, __unused register struct usrctl_args *uap, __unused int32_t *retval) +{ + if (p != initproc) { + return EPERM; + } + + int error = 0; + error = pshm_cache_purge_all(p); + if (error) + return error; + + error = psem_cache_purge_all(p); + return error; +}