Note: this is a use inside the compilation unit. The storage space allocated
for two pointers to function are initialized.
>struct bla *alloc_bla(void)
>{
> struct bla *b = kmalloc(sizeof(struct bla), GFP_KERNEL);
> ...
> b->b_ops = &my_bla_ops;
> return b;
>}
And this is returning a pointer to the storage space.
>
>funca and funcb can be called from outside the module. They are still
>declared static. If you trust static to mean ``cannot be called from outside''
>you'll quickly fall flat onto your face.
>Overall you want a flat name space anyways, to make tools like cscope or
>[ce]tags work, so it is a good idea to use explicit bla_* prefixes anyways.
>With that static is rather useless for most cases (except special
>hacks like putting local symbols via macros into ELF segments etc.)
This is not a symbolic "called from outside". sorry. does not correspond.
Static symbols cannot be connected over compilation units at link time.
Static symbols don't get modified at runtime. Pointers to functions can
be modified at runtime.
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@cats-chateau.net
Any opinions expressed are solely my own.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/