On Tue, Dec 31, 2013 at 04:26:01PM +0100, Richard Braun wrote: > On Sun, Dec 29, 2013 at 09:44:51PM +0100, Marin Ramesa wrote: > > + simple_lock(&futex->futex_wait_lock); > > + > > + /* If the value is still the same. */ > > + if (*address == value) {
In addition, such an access should go through some userspace memory accessor (something like copyin at least, although passing it through a message would be far cleaner), and it must be atomic. To finish with, the more I think about it, the less I understand why there is a need for futex objects in the first place. Instead of dynamically allocating such structures, it probably makes more sense to use the addresses of the physical page descriptors instead. -- Richard Braun