From 35eb8c5aa20878f727b0143405166e9b463ee24a Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 26 Mar 2003 18:29:44 +0000 Subject: Add a cleanup function to destroy the osname_lock and call it on module unload. Submitted by: gallatin Reported by: Martin Karlsson --- sys/compat/linux/linux_mib.c | 7 +++++++ sys/compat/linux/linux_mib.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'sys/compat') diff --git a/sys/compat/linux/linux_mib.c b/sys/compat/linux/linux_mib.c index 53fee72d54fe7..9d908745888e9 100644 --- a/sys/compat/linux/linux_mib.c +++ b/sys/compat/linux/linux_mib.c @@ -148,6 +148,13 @@ linux_get_prison(struct thread *td) return (pr); } +void +linux_mib_destroy(void) +{ + + mtx_destroy(&osname_lock); +} + void linux_get_osname(struct thread *td, char *dst) { diff --git a/sys/compat/linux/linux_mib.h b/sys/compat/linux/linux_mib.h index 42d9d899266b8..b68e57fd32388 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); -- cgit v1.3