Re: trying to access a non exported symbol (tasklist_lock)

Davide Libenzi (davidel@maticad.it)
Wed, 28 Jun 2000 18:28:25 +0200


> I want to access tasklist_lock (defined in kernel/sched.c) from a kernel
module

Think twice before doing task list manipulation outside sched.c.

If You can't proceed without doing it in that way, You have two solutions :

A)
If the functions You're implementing can be classified as general purpose,
put the code inside sched.c
and export the functions in sched.h. This will bloat sched.c but minimize
code maintenance
if in a future we need to change task list locking.

B)
Export tasklist_lock in sched.h. This leave sched.c unchanged but if We need
to change the task list
locking method, Your driver / module will fail in compiling.

Even if implemented in these ways, I think You'll have a bunch of problems
to obtain the patch merged.

C)
Don't do it ;)

Davide

--
Feel free, feel Debian !

- 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/