On Thu, Jul 17, 2014 at 4:04 PM, Johnny Billquist <b...@update.uu.se> wrote: > Also, VAX did not use CAS as the general paradigm for atomic writes and so > on, but have other explicit instructions that are guaranteed to be atomic. > NetBSD/vax don't use the VAX specific instructions, but emulates CAS in the > kernel instead. But I don't remember how that extends to userland. It's > obviously easiest if userland programs use the pthread library functions, > which are guaranteed to work right even in multiprocessor environment.
pthread functions may work by accident in shared memory but there's no way to be sure they won't depend on some pthread threading data structures. In short, if you don't use pthreads you can't really count on pthread functions to work. We did experiment a while back with using futexes on Linux instead of our spinlocks but the experiments didn't seem to work out. -- greg -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers