On 8/15/06, Dinesh Ahuja <mdlinux7@xxxxxxxxxxx> wrote:
> The tasklist_lock is a rw spinlock. It is again a > macro defined in <linux/spinlock.h> I donot think it is a macro as I could see it in fork.c rwlock_t tasklist_lock __cacheline_aligned = RW_LOCK_UNLOCKED;
sorry i didn't mean that. i meant to say the tasklist_lock is a rw spinlock. All spinlock functions/macros are is defined in <linux/spinlock.h>. And it is already included by <linux/sched.h>.
This is a different thing from the error which I encountered: But getting following error: unresolved symbol __read_lock_failed I can see that tasklist_lock is exported. Pls see below output ksyms -a | grep tasklist c0370a80 tasklist_lock_R999c80a2 c011f8e0 check_tasklist_locked_R15bb5893 The cause of problem is something else. On further study, I found that read_lock invokes __read_lock_failed if it fails in acquiring lock and the __read_lock_failed is invoked which again tries to achieve lock. As __read_lock_failed is a function in assembly and not exported, therefore it gives unresolved error. For temporary fix, I defined this function in my module which is as below: void __read_lock_failed(void) { printk("<1> LOCKING FAILED"); }
I dont think you should be doing this. Is your kernel compiled for SMP? If it is not SMP then the spinlocks are just empty loops. If yes then it is exported see (for i386) http://lxr.linux.no/source/arch/i386/kernel/i386_ksyms.c. but as Anand said tasklist_lock is not exported in newer kernel (i dont know from which version). You should not be using this because the driver will break in newer kernels. -- --------------------------------------------------------------- regards Manish Regmi --------------------------------------------------------------- UNIX without a C Compiler is like eating Spaghetti with your mouth sewn shut. It just doesn't make sense. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/