[PATCH 1/4] Add null-terminated list interface.

Alan Coopersmith alan.coopersmith at oracle.com
Thu Aug 11 07:13:56 PDT 2011


On 08/11/11 03:52, walter harms wrote:
> 
> 
> Am 11.08.2011 05:20, schrieb Peter Hutterer:
>> This is a set of macros to provide a struct list-alike interface for classic
>> linked lists such as the XF86OptionRec or the DeviceIntRec. The typical
>> format for these is to have a "struct foo *next" pointer in each struct foo
>> and walk through those. These macros provide a few basic functions to add to,
>> remove from and iterate through these lists.
>>
>> While struct list is in some ways more flexible, switching legacy code to
>> use struct list is not alway viable. These macros at least reduce the amount
>> of open-coded lists.
>>
> 
> hello,
> 
> did you take a look at "man queue" ? glibc and BSD* provide a sys/queue.h
> that has a set of macro to support linked lists.

For the core server code it would also have to be available on MacOS X,
Cygwin & Solaris.   Solaris 11 does include the BSD version, but Solaris
10 (which we still support for now) does not.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list