hlist_for_each_entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All ,
   Please correct me otherwise , if I am wrong here :


#define hlist_for_each_entry(tpos, pos, head, member) \
for (pos = (head)->first; \
    pos && ({ prefetch(pos->next); 1;}) && \ <------------------(1)
({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ <-------------(2)
    pos = pos->next)

In my understanding ({ prefetch(pos->next); 1;}) & ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;})
will always return 1 , and will do additional tasks ( which don't affect the final outcome of the _expression_ in the {})
of pre-fetching ( in (1) ) and casting the "current" pos into  the  typeof(*tpos) ( in (2) ).

Am I right ?

Regards,
Onkar

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux