summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_rctl.c
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2011-09-16 13:58:51 +0000
committerkmacy <kmacy@FreeBSD.org>2011-09-16 13:58:51 +0000
commit99851f359e6f006b3223bb37dbc49e751ca8c13a (patch)
tree2ed8c1cfa9e408c1c66c2cde0823123897e0306e /sys/kern/kern_rctl.c
parentbf8fedabcd023c90bb2ee4ce0e5d6d8c2b927714 (diff)
downloadFreeBSD-src-99851f359e6f006b3223bb37dbc49e751ca8c13a.zip
FreeBSD-src-99851f359e6f006b3223bb37dbc49e751ca8c13a.tar.gz
In order to maximize the re-usability of kernel code in user space this
patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz)
Diffstat (limited to 'sys/kern/kern_rctl.c')
-rw-r--r--sys/kern/kern_rctl.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/kern/kern_rctl.c b/sys/kern/kern_rctl.c
index d60cae4..d5bd010 100644
--- a/sys/kern/kern_rctl.c
+++ b/sys/kern/kern_rctl.c
@@ -377,7 +377,7 @@ rctl_enforce(struct proc *p, int resource, uint64_t amount)
* We're using the fact that RCTL_ACTION_SIG* values
* are equal to their counterparts from sys/signal.h.
*/
- psignal(p, rule->rr_action);
+ kern_psignal(p, rule->rr_action);
link->rrl_exceeded = 1;
continue;
}
@@ -1242,7 +1242,7 @@ rctl_racct_to_sbuf(struct racct *racct, int sloppy)
}
int
-rctl_get_racct(struct thread *td, struct rctl_get_racct_args *uap)
+sys_rctl_get_racct(struct thread *td, struct rctl_get_racct_args *uap)
{
int error;
char *inputstr;
@@ -1338,7 +1338,7 @@ rctl_get_rules_callback(struct racct *racct, void *arg2, void *arg3)
}
int
-rctl_get_rules(struct thread *td, struct rctl_get_rules_args *uap)
+sys_rctl_get_rules(struct thread *td, struct rctl_get_rules_args *uap)
{
int error;
size_t bufsize = RCTL_DEFAULT_BUFSIZE;
@@ -1413,7 +1413,7 @@ again:
}
int
-rctl_get_limits(struct thread *td, struct rctl_get_limits_args *uap)
+sys_rctl_get_limits(struct thread *td, struct rctl_get_limits_args *uap)
{
int error;
size_t bufsize = RCTL_DEFAULT_BUFSIZE;
@@ -1487,7 +1487,7 @@ again:
}
int
-rctl_add_rule(struct thread *td, struct rctl_add_rule_args *uap)
+sys_rctl_add_rule(struct thread *td, struct rctl_add_rule_args *uap)
{
int error;
struct rctl_rule *rule;
@@ -1529,7 +1529,7 @@ out:
}
int
-rctl_remove_rule(struct thread *td, struct rctl_remove_rule_args *uap)
+sys_rctl_remove_rule(struct thread *td, struct rctl_remove_rule_args *uap)
{
int error;
struct rctl_rule *filter;
@@ -1801,35 +1801,35 @@ rctl_init(void)
#else /* !RCTL */
int
-rctl_get_racct(struct thread *td, struct rctl_get_racct_args *uap)
+sys_rctl_get_racct(struct thread *td, struct rctl_get_racct_args *uap)
{
return (ENOSYS);
}
int
-rctl_get_rules(struct thread *td, struct rctl_get_rules_args *uap)
+sys_rctl_get_rules(struct thread *td, struct rctl_get_rules_args *uap)
{
return (ENOSYS);
}
int
-rctl_get_limits(struct thread *td, struct rctl_get_limits_args *uap)
+sys_rctl_get_limits(struct thread *td, struct rctl_get_limits_args *uap)
{
return (ENOSYS);
}
int
-rctl_add_rule(struct thread *td, struct rctl_add_rule_args *uap)
+sys_rctl_add_rule(struct thread *td, struct rctl_add_rule_args *uap)
{
return (ENOSYS);
}
int
-rctl_remove_rule(struct thread *td, struct rctl_remove_rule_args *uap)
+sys_rctl_remove_rule(struct thread *td, struct rctl_remove_rule_args *uap)
{
return (ENOSYS);
OpenPOWER on IntegriCloud