News for hackers. Stuff that matters.
Re:It's "locking" if it's blocking by tdrd on Friday December 28, 2012 @11:42PM (#4981155)
Obviously there's no avoiding this, but the author writes in the context of high-level code where OS-provided locking mechanisms are available. Why are we discussing this in a low-level (or embedded, where every ounce of performance matters) context?
Re:It's "locking" if it's blocking by psobot on Friday December 28, 2012 @11:58PM (#4981190)
You don't need to be embedded to have performance matter - even if your OS gives you concurrency primitives, there are many situations where jumping into kernel code is still "too expensive."
Re:It's "locking" if it's blocking by justincormack on Saturday December 29, 2012 @05:04AM (#4981665)
That's why Linux has the futex which is userspace only if not contended only jumps to kernel code for the contended case.
Re:It's "locking" if it's blocking by pcwalton on Saturday December 29, 2012 @12:34AM (#4981252)
There are many situations in which OS-level primitives such as blocking semaphores are available but userland primitives are not. When implementing libc, for example. Or when implementing a language runtime, or TBB, or boost::thread_pool, or what have you.
Re:It's "locking" if it's blocking by ucee054 on Saturday December 29, 2012 @05:45AM (#4981732)
Because the author works in embedded