Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jan 1997 08:44:54 -0500 (EST)
From:      Peter Dufault <dufault@hda.com>
To:        phk@freebsd.org
Cc:        smp@freebsd.org
Subject:   Re: atomic locking and <sys/queue.h>
Message-ID:  <199701051344.IAA28862@hda.hda.com>
In-Reply-To: <12453.852121399@critter.dk.tfs.com> from Poul-Henning Kamp at "Jan 1, 97 01:23:19 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> Would it make sense to make a version of the various queues that had
> built in locking ?

Yes, but I think you should also package them up as functions with
opaque structures.  In addition to locking there is the issue of
illegal access even with locking - consider naively traversing a
circular queue and having the node you started with vanish off the
queue even if each individual step is "properly" locked.

Strict access to the queue structures will force a visit to each
place they are used when moving over to the new interface.  I also
bet that these will grow more complicated anyway with items like
object IDs for lock hierarchy and locker priority for priority boosting.

-- 
Peter Dufault (dufault@hda.com)   Realtime Machine Control and Simulation
HD Associates, Inc.               Voice: 508 433 6936



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