aboutsummaryrefslogtreecommitdiff
path: root/hw/ipmi
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-11-29 15:36:56 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-12-03 22:08:53 -0600
commit1486a08de557b8f237a066a57cc2c74961ba36e0 (patch)
tree493986a01191b9d5449fb43dc421a8ea7a1e1dc5 /hw/ipmi
parent1e85912b921028bafa3a68fa286682a5d21a1223 (diff)
downloadskiboot-1486a08de557b8f237a066a57cc2c74961ba36e0.zip
skiboot-1486a08de557b8f237a066a57cc2c74961ba36e0.tar.gz
skiboot-1486a08de557b8f237a066a57cc2c74961ba36e0.tar.bz2
core/lock: Introduce atomic cmpxchg and implement try_lock with it
cmpxchg will be used in a subsequent change, and this reduces the amount of asm code. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [stewart: fix some ifdef __TEST__ foo to ensure unittests work] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/ipmi')
-rw-r--r--hw/ipmi/test/run-fru.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/ipmi/test/run-fru.c b/hw/ipmi/test/run-fru.c
index f548311..9f65ed4 100644
--- a/hw/ipmi/test/run-fru.c
+++ b/hw/ipmi/test/run-fru.c
@@ -17,6 +17,8 @@
#include <sys/stat.h>
#include <fcntl.h>
+#define __TEST__
+
#include "../ipmi-fru.c"
int error = 0;