LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Closed Thread
 
Search this Thread
Old 05-31-2009, 01:35 AM   #1
ao.yuan.young
LQ Newbie
 
Registered: May 2009
Posts: 12

Rep: Reputation: 0
Question Some questions about struct dentry involved with list


In kernel-2.4.20, the attribute d_hash in struct dentry is type of list_head. So you can use function list_empty defined in list.h to check whether the hash list is empty.

But in kernel-2.6.27, the type of the attribute d_hash has been changed to hlist_node, then if you want to check whether the hash list is empty, the function list_empty will not work any more.

What should I do to solve the problem??

Another question is that there are two function concerned with hlist defined in list.h: hlist_unhash and hlist_empty. What are the differences between the two functions?
 
Old 05-31-2009, 02:52 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,140
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
Please post your thread once and in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be closed because it is a duplicate of http://www.linuxquestions.org/questi...h-list-729605/.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some questions about struct dentry involved with list ao.yuan.young Linux - Kernel 1 05-31-2009 08:08 PM
GCC compile problem:struct A have a member variable which is just a struct type name? leon.zcom Programming 3 04-18-2008 04:40 PM
c linked list wiht struct true_atlantis Programming 7 04-24-2006 06:21 PM
g++ and wrong struct member addresses / struct size misreporting sonajiso Linux - General 5 05-22-2004 10:16 PM
switch statement converting struct char to struct int oceaneyes2 Programming 2 12-10-2003 04:30 PM


All times are GMT -5. The time now is 03:30 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration