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

Re: does SIMPLEQ_REMOVE_HEAD() work ?



On Wed, Jul 19, 2000 at 11:22:03PM +1200, Chris, the Young One wrote:
! On Tue, Jul 18, 2000 at 07:41:55PM +0000, Peter Galbavy wrote:
! ! #define SIMPLEQ_REMOVE_HEAD(head, elm, field) do {              \
! !         if (((head)->sqh_first = (elm)->field.sqe_next) == NULL)\
! !                 (head)->sqh_last = &(head)->sqh_first;          \
! ! } while (0)
! 
! I think this function removes all elements, from the head of the list,
! up to and including elm.

While (for the moment) I still stand by my interpretation, the man
page seems to give a conflicting description: ``removes the first
element from the queue''. If that were true, why would it need elm?

	---Chris K.
-- 
 Chris, the Young One |_ If you can't afford a backup system, you can't 
  Auckland, New Zealand |_ afford to have important data on your computer. 
http://cloud9.hedgee.com/ |_ ---Tracy R. Reed  
 PGP: 0xCCC6114E/0x706A6AAD |_ 




Visit your host, monkey.org