summaryrefslogtreecommitdiffstats
path: root/sys/sys/sysproto.h
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2002-04-17 13:06:36 +0000
committermux <mux@FreeBSD.org>2002-04-17 13:06:36 +0000
commita207e41bef089b8849a230f44088a562d0b5d19f (patch)
treecb447f9f2a04a764ece9fcefc6fa6b52d19870b8 /sys/sys/sysproto.h
parentc79270302c4767b589a4fe70da3ba9866936358f (diff)
downloadFreeBSD-src-a207e41bef089b8849a230f44088a562d0b5d19f.zip
FreeBSD-src-a207e41bef089b8849a230f44088a562d0b5d19f.tar.gz
Rework the kernel environment subsystem. We now convert the static
environment needed at boot time to a dynamic subsystem when VM is up. The dynamic kernel environment is protected by an sx lock. This adds some new functions to manipulate the kernel environment : freeenv(), setenv(), unsetenv() and testenv(). freeenv() has to be called after every getenv() when you have finished using the string. testenv() only tests if an environment variable is present, and doesn't require a freeenv() call. setenv() and unsetenv() are self explanatory. The kenv(2) syscall exports these new functionalities to userland, mainly for kenv(1). Reviewed by: peter
Diffstat (limited to 'sys/sys/sysproto.h')
-rw-r--r--sys/sys/sysproto.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h
index 1f4b987..80385c0 100644
--- a/sys/sys/sysproto.h
+++ b/sys/sys/sysproto.h
@@ -1105,6 +1105,12 @@ struct thread_wakeup_args {
struct kse_yield_args {
register_t dummy;
};
+struct kenv_args {
+ char what_l_[PADL_(int)]; int what; char what_r_[PADR_(int)];
+ char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)];
+ char value_l_[PADL_(char *)]; char * value; char value_r_[PADR_(char *)];
+ char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)];
+};
int nosys(struct thread *, struct nosys_args *);
void sys_exit(struct thread *, struct sys_exit_args *);
int fork(struct thread *, struct fork_args *);
@@ -1354,6 +1360,7 @@ int kse_wakeup(struct thread *, struct kse_wakeup_args *);
int kse_new(struct thread *, struct kse_new_args *);
int thread_wakeup(struct thread *, struct thread_wakeup_args *);
int kse_yield(struct thread *, struct kse_yield_args *);
+int kenv(struct thread *, struct kenv_args *);
#ifdef COMPAT_43
OpenPOWER on IntegriCloud