> hm, can someone shed some light whether this is due to a conscious
> decision or a lack of initiative?
Probably because you would still need an external lock most of the
times, example:
while (!fifo.isFull())
fifo.push(data);
is a potential race condition even if the individual methods are
thread safe, you need to protect it
with a mutex:
fibril_mutex_lock();
while (!fifo.isFull())
fifo.push(data);
fibril_mutex_unlock();
> There are similar structures in fifo.h and dynamic_fifo.h (they are
> ugly, and only used in kernel). I think it would be ok to just provide
> thread +overflow/underflow safe wrappers on top these implementations.
mmm, you are right, no need to move the i8042 circular buffer to libc...
It could be built on top of fifo.h maybe
--
--------------------
Maurizio Lombardi
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel