From: "Mike Frysinger" <vap...@gentoo.org>
> > You could create a server process that accesses the database, and
> > smaller
> > client processes that talk
> > to it (via sockets, files, pipes, or one of the standard shared memory
> > interfaces).
>
> I think I can use the pipes (with their atomic writes) to get rid of any
> use of mutexes in this case. But it will be otherwise a little more
> complicated than just calling the exposed functions.

umm, why do you think writes are atomic ?  POSIX states that read/write
functions need not be atomic.  if you want threading synchronization
mechanisms, then use the things designed for exactly that.
-mike

I just googled for "linux pipe write" or something like that.
Many different docs describe behavior of "write" as atomic when writing less
than or equal to PIPE_BUF bytes  into FIFO pipe. That is when more processes
write to the same pipe. Here is one:
http://manpages.courier-mta.org/htmlman7/pipe.7.html

---
Jan Ringoš, j...@ringos.cz
www.ringos.cz, tringi.mx-3.cz

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to