From 08be876fa662e26aabad5b0294662c35928c67d2 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sun, 23 Feb 2014 18:16:39 -0500 Subject: [PATCH] ck_bytelock: Correctly compute byte sequence length for readers. Thanks to Albi Kavo for spotting this. --- include/ck_bytelock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ck_bytelock.h b/include/ck_bytelock.h index cf12d58..acdba5e 100644 --- a/include/ck_bytelock.h +++ b/include/ck_bytelock.h @@ -67,11 +67,11 @@ ck_bytelock_init(struct ck_bytelock *bytelock) } #ifdef CK_F_PR_LOAD_64 -#define CK_BYTELOCK_LENGTH 8 +#define CK_BYTELOCK_LENGTH sizeof(uint64_t) #define CK_BYTELOCK_LOAD ck_pr_load_64 #define CK_BYTELOCK_TYPE uint64_t #elif defined(CK_F_PR_LOAD_32) -#define CK_BYTELOCK_LENGTH 16 +#define CK_BYTELOCK_LENGTH sizeof(uint32_t) #define CK_BYTELOCK_LOAD ck_pr_load_32 #define CK_BYTELOCK_TYPE uint32_t #else