It is currently Sun, 09 Aug 2020 02:11:20 GMT



 
Author Message
 Help with kernel source (struct list_head)
Hi!
  I should miss the point... but I dont understand the
struct list_head {
      struct list_head *next, *prev;
from file /usr/src/linux/include/linux/list.h  :(

Dont understand where is the data nor how to access it. The
following macro of the same file seems to do the job, how?
#define list_entry(ptr, type, member) \
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))

It seem to play an important role in struct inode
/usr/src/linux/include/linux/fs.h, but I cannot
figure how it work.

Help will be appreciated. Thank you!
Bye.

--
[Sylvain Boivin]   [ http://www.**-**.com/ ~sboivin/]
[sboi...@uqac.uquebec.ca] Use Linux! [Yahoo: art...@yahoo.com]



 Sat, 06 Apr 2002 03:00:00 GMT   
 
   [ 1 post ] 

Similar Threads

1. struct source for FILE pointer

2. structs declared inside structs in /usr/include

3. [PATCH] struct kernel_stat -> struct cpu_stat[NR_CPUS]

4. Help - Re-Installing Kernel Source

5. HELP: Kernel source

6. AH2940 kernel sources HELP ! ;-)

7. Help:Kernel Panic while compiling source and rebooting

8. How to create adb macros for kernel data structs


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software