mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
[PATCH] severing module.h->sched.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
2b5f6dcce5
commit
f6a570333e
16 changed files with 29 additions and 14 deletions
|
@ -34,10 +34,10 @@
|
|||
#include <linux/err.h>
|
||||
#include <linux/vermagic.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/stop_machine.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/unwind.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
@ -790,6 +790,19 @@ static struct module_attribute refcnt = {
|
|||
.show = show_refcnt,
|
||||
};
|
||||
|
||||
void module_put(struct module *module)
|
||||
{
|
||||
if (module) {
|
||||
unsigned int cpu = get_cpu();
|
||||
local_dec(&module->ref[cpu].count);
|
||||
/* Maybe they're waiting for us to drop reference? */
|
||||
if (unlikely(!module_is_live(module)))
|
||||
wake_up_process(module->waiter);
|
||||
put_cpu();
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(module_put);
|
||||
|
||||
#else /* !CONFIG_MODULE_UNLOAD */
|
||||
static void print_unload_info(struct seq_file *m, struct module *mod)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue