vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

commit 9a5cac608776a5424ad0f8487e7de1223085ef1a
parent 4493abdf56ae497d8a3c79c136f7f56f0dd818b1
Author: rminnich@gmail.com <none@none>
Date:   Wed, 19 Jan 2011 19:07:43 -0800

hack for gcc hack

Diffstat:
src/9vx/Makefrag | 4++++
src/9vx/gccmagic/cmpswap.c | 5+++++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/9vx/Makefrag b/src/9vx/Makefrag @@ -100,6 +100,10 @@ ifeq ($(OS),darwin) PLAN9_OBJS := $(PLAN9_OBJS) 9vx/osx/signal.o 9vx/osx/cmpswap.o endif +ifeq ($(OS),linux) +PLAN9_OBJS := $(PLAN9_OBJS) 9vx/gccmagic/cmpswap.o +endif + PLAN9_A_OBJS = \ $(addprefix 9vx/a/, \ allocb.o \ diff --git a/src/9vx/gccmagic/cmpswap.c b/src/9vx/gccmagic/cmpswap.c @@ -0,0 +1,5 @@ +int oscmpswap(long* addr, long oldval, long newval) +{ + return __sync_bool_compare_and_swap(addr, oldval, newval); +} +