Add READ_ONCE and WRITE_ONCE (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 24 Aug 2017 15:28:31 +0000 (11:28 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 25 Aug 2017 18:41:49 +0000 (14:41 -0400)
commit4ab381061e7891df8bfe6e0a19ff0c35eecc4ee3
tree11812a86613483ae34f41db866a0ba590069b95c
parente6c980a37b064bdddbb4758187fee813aeb4ff16
Add READ_ONCE and WRITE_ONCE (XCC)

These aren't quite the same as Linux's, in that they don't handle
structs.  Currently we don't need that, especially in a kernel header.
The thing we do need is the atomicity of writes of size up to uintptr_t.

There are places on both the user and kernel sides where we expect
writes to be done atomically, and not torn or otherwise mucked with by
the compiler.

Reinstall your kernel headers.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/rbtree.h
kern/include/ros/common.h