Re: [RFC, 2.6] a simple FIFO implementation

From: Andrea Arcangeli
Date: Fri Sep 17 2004 - 10:44:06 EST


On Fri, Sep 17, 2004 at 04:00:21PM +0200, Stelian Pop wrote:
> We could do that by having a 'spinlock_t internal_lock' and a
> 'spinlock_t * lock' fields, in struct kfifo: we always use 'lock' and
> we initialize lock to either &internal_lock or to the user lock.

the whole point was to save memory, this will actually waste another 4/8
(32bit/64bit) bytes...

note that you would still do the locking in your highlevel inlines, it's
just that the caller will have the responsability of allocating a lock.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/