genode/base
Alexander Boettcher ca37f26a01 base: add memory barrier before releasing lock
When releasing a lock we must take care that all state is written back to
memory and is not cached in registers. The volatile flag of the lock variable
only means to the compiler that this value must be written immediately.
Other values changed before may be kept by the compiler in registers, which we
don't want here.

Additionally the compiler is free to reorder the code in order to optimize.
That means the code we intend to be executed inside the critical section can
get be reordered and can be executed after we reset the lock variable in the
unlock implementation. The volatile statement of the lock variable doesn't
prevent reordering of instructions which are independent.

By adding a explicit memory barrier, we force the compiler to generate code
that writes back all the register content to memory/cache (and avoid a
bunch of hard to find bugs ...)
2013-01-09 15:34:29 +01:00
..
etc Imported Genode release 11.11 2011-12-22 16:19:25 +01:00
include base: avoid shift warning in register array 2013-01-08 11:36:52 +01:00
lib Move 'Child' API implementation to library 2012-10-09 13:45:33 +02:00
mk base-hw & imx31: userland timer driver 2013-01-08 11:36:52 +01:00
run Simplify run scripts 2012-07-27 17:00:44 +02:00
src base: add memory barrier before releasing lock 2013-01-09 15:34:29 +01:00
README Imported Genode release 11.11 2011-12-22 16:19:25 +01:00

This is generic part of the Genode implementation. It consists of two parts:

:_Core_: is the ultimate root of the Genode application tree
  and provides abstractions for the lowest-level hardware resources
  such as RAM, ROM, CPU, and generic device access. All generic parts of Core
  can be found here - for system-specific implementations refer to the
  appropriate 'base-<system>' directory.

:_Base libraries and protocols_: that are used by each Genode component
  to interact with other components. This is the glue that holds everything
  together.