Home | History | Annotate | Download | only in linux

Lines Matching defs:module

22 #include <asm/module.h>
46 struct module;
50 ssize_t (*show)(struct module_attribute *, struct module *, char *);
51 ssize_t (*store)(struct module_attribute *, struct module *,
53 void (*setup)(struct module *, const char *);
54 int (*test)(struct module *);
55 void (*free)(struct module *);
61 struct module *mod;
64 /* These are either module local, or the kernel's dummy ones. */
81 #ifdef MODULE
86 extern struct module __this_module;
88 #else /* !MODULE */
90 #define THIS_MODULE ((struct module *)0)
132 /* What your module does. */
246 struct module
253 /* Unique handle for this module */
309 /* Arch-specific module values */
352 (IDE & SCSI) require entry into the module during init.*/
353 static inline int module_is_live(struct module *mod)
358 /* Is this address in a module? (second is with no locks, for oops) */
359 struct module *module_text_address(unsigned long addr);
360 struct module *__module_text_address(unsigned long addr);
363 /* Returns module and fills in value, defined and namebuf, or NULL if
365 struct module *module_get_kallsym(unsigned int symnum, unsigned long *value,
368 /* Look for this name: can be of form module:name. */
371 int is_exported(const char *name, const struct module *mod);
373 extern void __module_put_and_exit(struct module *mod, long code)
378 unsigned int module_refcount(struct module *mod);
385 static inline void __module_get(struct module *module)
387 if (module) {
388 BUG_ON(module_refcount(module) == 0);
389 local_inc(&module->ref[get_cpu()].count);
394 static inline int try_module_get(struct module *module)
398 if (module) {
400 if (likely(module_is_live(module)))
401 local_inc(&module->ref[cpu].count);
409 static inline void module_put(struct module *module)
411 if (module) {
413 local_dec(&module->ref[cpu].count);
415 if (unlikely(!module_is_live(module)))
416 wake_up_process(module->waiter);
422 static inline int try_module_get(struct module *module)
424 return !module || module_is_live(module);
426 static inline void module_put(struct module *module)
429 static inline void __module_get(struct module *module)
440 struct module *__mod = (mod); \
448 "Module %s cannot be unloaded due to unsafe usage in" \
469 void module_add_driver(struct module *, struct device_driver *);
486 /* Is this address in a module? */
487 static inline struct module *module_text_address(unsigned long addr)
492 /* Is this address in a module? (don't take a lock, we're oopsing) */
493 static inline struct module *__module_text_address(unsigned long addr)
508 static inline void __module_get(struct module *module)
512 static inline int try_module_get(struct module *module)
517 static inline void module_put(struct module *module)
534 static inline struct module *module_get_kallsym(unsigned int symnum,
547 static inline int is_exported(const char *name, const struct module *mod)
570 struct module;
572 static inline void module_add_driver(struct module *module, struct device_driver *driver)