From 7a088559fde6f90557fc4c28c20c35ba766ba278 Mon Sep 17 00:00:00 2001 From: schulz Date: Fri, 1 May 2015 12:44:51 +0000 Subject: [PATCH] add default initializers for spinlocks git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@50548 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- compiler/include/aros/types/spinlock_s.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/include/aros/types/spinlock_s.h b/compiler/include/aros/types/spinlock_s.h index 487787e423..940892961c 100644 --- a/compiler/include/aros/types/spinlock_s.h +++ b/compiler/include/aros/types/spinlock_s.h @@ -7,6 +7,10 @@ typedef struct { volatile unsigned long lock; } spinlock_t; +#define SPINLOCK_INIT_UNLOCKED { 0 } +#define SPINLOCK_INIT_WRITE_LOCKED { 0x80000000 } +#define SPINLOCK_INIT_READ_LOCKED(n) { n } + #define SPINLOCK_MODE_READ 0 #define SPINLOCK_MODE_WRITE 1 -- 2.11.4.GIT