diff options
author | jhb <jhb@FreeBSD.org> | 2003-03-26 18:29:44 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-03-26 18:29:44 +0000 |
commit | 72a1a2619caba266ac8c65f94a7a2a271537ccfe (patch) | |
tree | 8df222945b41b84d620040663b2014b3df286910 /sys/compat | |
parent | ea2de33c6b4550c7150502ddb8a80e975c5e09ab (diff) | |
download | FreeBSD-src-72a1a2619caba266ac8c65f94a7a2a271537ccfe.zip FreeBSD-src-72a1a2619caba266ac8c65f94a7a2a271537ccfe.tar.gz |
Add a cleanup function to destroy the osname_lock and call it on module
unload.
Submitted by: gallatin
Reported by: Martin Karlsson <mk-freebsd@bredband.net>
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_mib.c | 7 | ||||
-rw-r--r-- | sys/compat/linux/linux_mib.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_mib.c b/sys/compat/linux/linux_mib.c index 53fee72..9d90874 100644 --- a/sys/compat/linux/linux_mib.c +++ b/sys/compat/linux/linux_mib.c @@ -149,6 +149,13 @@ linux_get_prison(struct thread *td) } void +linux_mib_destroy(void) +{ + + mtx_destroy(&osname_lock); +} + +void linux_get_osname(struct thread *td, char *dst) { register struct prison *pr; diff --git a/sys/compat/linux/linux_mib.h b/sys/compat/linux/linux_mib.h index 42d9d89..b68e57f 100644 --- a/sys/compat/linux/linux_mib.h +++ b/sys/compat/linux/linux_mib.h @@ -31,6 +31,8 @@ #ifndef _LINUX_MIB_H_ #define _LINUX_MIB_H_ +void linux_mib_destroy(void); + void linux_get_osname(struct thread *td, char *dst); int linux_set_osname(struct thread *td, char *osname); |