Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 May 2007 11:52:25 +0200
From:      Fredrik Lindberg <fli@shapeshifter.se>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        Roman Divacky <rdivacky@FreeBSD.org>, Perforce Change Reviews <perforce@FreeBSD.org>, Fredrik Lindberg <fli@FreeBSD.org>
Subject:   Re: PERFORCE change 119527 for review
Message-ID:  <464199D9.7020908@shapeshifter.se>
In-Reply-To: <20070509103404.D71759@fledge.watson.org>
References:  <200705082229.l48MTrbh069129@repoman.freebsd.org> <20070509070626.GA41419@freebsd.org> <4641818B.4030507@FreeBSD.org> <20070509103404.D71759@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson wrote:
> 
> On Wed, 9 May 2007, Fredrik Lindberg wrote:
> 
>> Roman Divacky wrote:
>>> On Tue, May 08, 2007 at 10:29:53PM +0000, Fredrik Lindberg wrote:
>>>> http://perforce.freebsd.org/chv.cgi?CH=119527
>>>>
>>>> Change 119527 by fli@fli_genesis on 2007/05/08 22:29:14
>>>>
>>>>     Add data structures needed by the stack.
>>>>     A Double-linked list and a hash table.
>>>
>>> what about sys/queue.h ? it provides various abstract data types 
>>> including double-linked list
>>
>> Yes, I know it does provide that, and I've used it a lot in the past. 
>> A while ago I needed a linked list for another project where I needed 
>> to be independent of FreeBSD. So I rolled my own (with a similar api) 
>> and I've used it ever since. (It can be used both as a stack and queue).
>>
>> It's not exactly rocket-science and it does increase portability since 
>> this is a userland application. If there aren't any major objections 
>> or other selling points in favor for sys/queue.h (in a userland 
>> application!) I'm just going to leave it as it is.
> 
> FYI, slightly stale versions of queue.h are shipped with both Linux and 
> Mac OS X, so they are actually relatively portable.  Some of the more 
> recent TAILQ macros, etc, aren't available there, so I recently changed 
> from using the OS-native queue.h in OpenBSM to a FreeBSD version I ship 
> to use on those platforms.
> 

Ok, I'll take a look at the various queue.h shipped with the major BSDs,
and see if I can find a common subset that suits my needs (without too
many compromises) and based on the findings I'll reconsider my choice.

Fredrik Lindberg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?464199D9.7020908>