Update following changes to sys_membarrier ABI
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 29 Aug 2015 03:15:33 +0000 (23:15 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 29 Aug 2015 03:21:59 +0000 (23:21 -0400)
commit64f469e628fe45059f091f2808188fb52fa109c9
tree799c101acbd81288090442a2df06057eef6c56ed
parent2917c006f87be3f55bd7ba2119d7fbc79f7677d7
Update following changes to sys_membarrier ABI

sys_membarrier underwent changes between its original implementation and
its upcoming inclusion into the Linux kernel. Update its use to follow
those changes.

Should the prior user-space code be built against a kernel header that
defines SYS_membarrier, and executed against that kernel, the following
scenarios may happen:

- -1 will be returned with EINVAL errno if the 2nd argument (flags) is
  non-zero (the previous ABI expected a single argument),
- (MEMBARRIER_EXPEDITED | MEMBARRIER_QUERY) defined as
  (1 << 0) | (1 << 16) will return -1 with EINVAL errno, because valid
  commands are now one-hot.

Therefore, should an incompatible user-space code try to use
sys_membarrier, it will simply think that the system does not have
membarrier support due to the negative return value upon query.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu.c
This page took 0.027611 seconds and 4 git commands to generate.