> Then what is return value if my module tries to 'get' a module which does not
> exist (and is a module, not in-built)? . Is it '1' ?
> Or am I imagining a hypothetical scenario which would not exist?
That is not supposed to happen. After a module got unloaded there shouldn't
be any objects
Thanks for you reply, please see inline.
Heiko Carstens de.ibm.com> writes:
>
[snip]
> > static inline int try_module_get(struct module *module){
> > int ret = 1; <--- error case when !module
> > if (module) {
> > unsigned int cpu = get_cpu();
> > if
On Thu, 27 Sep 2007 05:19:06 -, Shreyansh Jain said:
> -
> static inline int try_module_get(struct module *module){
> int ret = 1; <--- error case when !module
> if (module) {
> unsigned int cpu = get_cpu();
> if (likely(module_is_live(module)))
>
> I was going through try_module_get function in include/linux/module.h file
> (2.6.22 stock kernel) - which is like:
>
> -
> static inline int try_module_get(struct module *module){
> int ret = 1; <--- error case when !module
> if (module) {
> unsigned int cpu = get_cpu();
>
I was going through try_module_get function in include/linux/module.h file
(2.6.22 stock kernel) - which is like:
-
static inline int try_module_get(struct module *module){
int ret = 1; --- error case when !module
if (module) {
unsigned int cpu = get_cpu();
On Thu, 27 Sep 2007 05:19:06 -, Shreyansh Jain said:
-
static inline int try_module_get(struct module *module){
int ret = 1; --- error case when !module
if (module) {
unsigned int cpu = get_cpu();
if (likely(module_is_live(module)))
Thanks for you reply, please see inline.
Heiko Carstens heiko.carstens at de.ibm.com writes:
[snip]
static inline int try_module_get(struct module *module){
int ret = 1; --- error case when !module
if (module) {
unsigned int cpu = get_cpu();
if
Then what is return value if my module tries to 'get' a module which does not
exist (and is a module, not in-built)? . Is it '1' ?
Or am I imagining a hypothetical scenario which would not exist?
That is not supposed to happen. After a module got unloaded there shouldn't
be any objects around
Dear List,
I agree that this issue certainly doesn't require to be in this list (rightful
place being kernewbies) but I tried that and got no response - so trying my luck
here.
I was going through try_module_get function in include/linux/module.h file
(2.6.22 stock kernel) - which is like:
Dear List,
I agree that this issue certainly doesn't require to be in this list (rightful
place being kernewbies) but I tried that and got no response - so trying my luck
here.
I was going through try_module_get function in include/linux/module.h file
(2.6.22 stock kernel) - which is like:
10 matches
Mail list logo