Hacker News new | past | comments | ask | show | jobs | submit login

POSIX has had barriers since around 2000 or so: pthread_barrier_wait and friends.

Memory barriers and POSIX-style barriers are semantically related; both mechanisms ensure that certain events are not re-ordered between adjacent phases; they stay on their side of the barrier.




Yes; the C++ multithreading support owes a lot (among many influences) to pthreads and one reason that low level memory barriers were called fences was to reserve the barrier name to a possible pthread-like construct.


Memory barriers also being called fences ("fence instruction") long precedes C++ multithreading.

(That conflicts with "fence register"; a concept in non-virtualized memory management whereby each running process is confined to accessing range of memory delimited by values held in fence registers.)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: