Samy Al Bahra 10 years ago
commit f9a127fffb

6
.gitignore vendored

@ -8,6 +8,8 @@ src/Makefile
doc/Makefile doc/Makefile
build/Makefile build/Makefile
.DS_Store .DS_Store
LOG
*.log
*.html *.html
*.gz *.gz
*.o *.o
@ -35,10 +37,9 @@ regressions/ck_brlock/validate/validate
regressions/ck_bytelock/benchmark/latency regressions/ck_bytelock/benchmark/latency
regressions/ck_bytelock/validate/validate regressions/ck_bytelock/validate/validate
regressions/ck_cohort/benchmark/ck_cohort.LATENCY regressions/ck_cohort/benchmark/ck_cohort.LATENCY
regressions/ck_cohort/benchmark/ck_cohort.LATENCY
regressions/ck_cohort/benchmark/ck_cohort.THROUGHPUT
regressions/ck_cohort/benchmark/ck_cohort.THROUGHPUT regressions/ck_cohort/benchmark/ck_cohort.THROUGHPUT
regressions/ck_cohort/validate/validate regressions/ck_cohort/validate/validate
regressions/ck_epoch/validate/ck_epoch_call
regressions/ck_epoch/validate/ck_epoch_poll regressions/ck_epoch/validate/ck_epoch_poll
regressions/ck_epoch/validate/ck_epoch_synchronize regressions/ck_epoch/validate/ck_epoch_synchronize
regressions/ck_epoch/validate/ck_stack regressions/ck_epoch/validate/ck_stack
@ -55,6 +56,7 @@ regressions/ck_hp/validate/ck_hp_fifo_donner
regressions/ck_hp/validate/ck_hp_stack regressions/ck_hp/validate/ck_hp_stack
regressions/ck_hp/validate/nbds_haz_test regressions/ck_hp/validate/nbds_haz_test
regressions/ck_hp/validate/serial regressions/ck_hp/validate/serial
regressions/ck_hs/benchmark/apply
regressions/ck_hs/benchmark/parallel_bytestring regressions/ck_hs/benchmark/parallel_bytestring
regressions/ck_hs/benchmark/parallel_bytestring.delete regressions/ck_hs/benchmark/parallel_bytestring.delete
regressions/ck_hs/benchmark/serial regressions/ck_hs/benchmark/serial

6
configure vendored

@ -34,7 +34,7 @@ WANT_PIC=yes
P_PWD=`pwd` P_PWD=`pwd`
MAINTAINER='sbahra@repnop.org' MAINTAINER='sbahra@repnop.org'
VERSION=${VERSION:-'0.4.5'} VERSION=${VERSION:-'0.4.6'}
VERSION_MAJOR='0' VERSION_MAJOR='0'
BUILD="$PWD/build/ck.build" BUILD="$PWD/build/ck.build"
PREFIX=${PREFIX:-"/usr/local"} PREFIX=${PREFIX:-"/usr/local"}
@ -418,7 +418,7 @@ case $PLATFORM in
"i86pc") "i86pc")
RTM_ENABLE="CK_MD_RTM_DISABLE" RTM_ENABLE="CK_MD_RTM_DISABLE"
MM="${MM:-"CK_MD_TSO"}" MM="${MM:-"CK_MD_TSO"}"
ISA=`isainfo -n 2> /dev/null || echo i386` if test -z "$ISA"; then ISA=`isainfo -n 2> /dev/null || echo i386` ; fi
case "$ISA" in case "$ISA" in
"amd64") "amd64")
RTM_ENABLE=${RTM_ENABLE_SET:-"CK_MD_RTM_DISABLE"} RTM_ENABLE=${RTM_ENABLE_SET:-"CK_MD_RTM_DISABLE"}
@ -599,7 +599,7 @@ elif test "$COMPILER" = "gcc" || test "$COMPILER" = "clang" || test "$COMPILER"
INSTALL_LIBS="install-lib" INSTALL_LIBS="install-lib"
fi fi
CFLAGS="-D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -std=gnu99 -pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -fstrict-aliasing -O2 -pipe -Wno-parentheses $CFLAGS" CFLAGS="-D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -std=gnu99 -pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -fstrict-aliasing -O2 -pipe -Wno-parentheses $CFLAGS"
PTHREAD_CFLAGS="-pthread" PTHREAD_CFLAGS="-pthread"
if test "$COMPILER" = "mingw64"; then if test "$COMPILER" = "mingw64"; then
ENVIRONMENT=64 ENVIRONMENT=64

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 Samy Al Bahra * Copyright 2013-2015 Samy Al Bahra
* Copyright 2013-2014 AppNexus, Inc. * Copyright 2013-2014 AppNexus, Inc.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2009-2014 Samy Al Bahra. * Copyright 2009-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* Copyright 2011 David Joseph. * Copyright 2011 David Joseph.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* Copyright 2012-2014 AppNexus, Inc. * Copyright 2012-2014 AppNexus, Inc.
* Copyright 2014 Paul Khuong. * Copyright 2014 Paul Khuong.
* All rights reserved. * All rights reserved.

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2009-2014 Samy Al Bahra. * Copyright 2009-2015 Samy Al Bahra.
* Copyright 2014 Paul Khuong. * Copyright 2014 Paul Khuong.
* All rights reserved. * All rights reserved.
* *
@ -40,7 +40,7 @@
CK_CC_INLINE static T * \ CK_CC_INLINE static T * \
N(F *p) \ N(F *p) \
{ \ { \
const F *n = p; \ F *n = p; \
return (T *)(void *)(((char *)n) - ((size_t)&((T *)0)->M)); \ return (T *)(void *)(((char *)n) - ((size_t)&((T *)0)->M)); \
} }

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 Samy Al Bahra. * Copyright 2013-2015 Samy Al Bahra.
* Copyright 2013 Brendon Scheinman. * Copyright 2013 Brendon Scheinman.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 Samy Al Bahra. * Copyright 2013-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* Copyright 2011 David Joseph. * Copyright 2011 David Joseph.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* Copyright 2011 David Joseph. * Copyright 2011 David Joseph.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,6 +1,6 @@
/* /*
* Copyright 2013 John Wittrock. * Copyright 2013 John Wittrock.
* Copyright 2013-2014 Samy Al Bahra. * Copyright 2013-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2009-2014 Samy Al Bahra. * Copyright 2009-2015 Samy Al Bahra.
* Copyright 2011 David Joseph. * Copyright 2011 David Joseph.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2009-2014 Samy Al Bahra. * Copyright 2009-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 Samy Al Bahra. * Copyright 2013-2015 Samy Al Bahra.
* Copyright 2013 Brendon Scheinman. * Copyright 2013 Brendon Scheinman.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2009-2014 Samy Al Bahra. * Copyright 2009-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,6 +1,6 @@
/* /*
* Copyright 2009-2014 Samy Al Bahra. * Copyright 2009-2015 Samy Al Bahra.
* Copyright 2013-2014 Olivier Houchard. * Copyright 2013-2015 Olivier Houchard.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2009-2014 Samy Al Bahra. * Copyright 2009-2015 Samy Al Bahra.
* Copyright 2014 Paul Khuong. * Copyright 2014 Paul Khuong.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2009-2014 Samy Al Bahra. * Copyright 2009-2015 Samy Al Bahra.
* Copyright 2012 João Fernandes. * Copyright 2012 João Fernandes.
* All rights reserved. * All rights reserved.
* *
@ -82,16 +82,16 @@ CK_PR_FENCE(release, "lwsync")
#undef CK_PR_FENCE #undef CK_PR_FENCE
#define CK_PR_LOAD(S, M, T, C, I) \ #define CK_PR_LOAD(S, M, T, C, I) \
CK_CC_INLINE static T \ CK_CC_INLINE static T \
ck_pr_load_##S(const M *target) \ ck_pr_load_##S(const M *target) \
{ \ { \
T r; \ T r; \
__asm__ __volatile__(I "%U1%X1 %0, %1" \ __asm__ __volatile__(I "%U1%X1 %0, %1" \
: "=r" (r) \ : "=r" (r) \
: "m" (*(C *)target) \ : "m" (*(const C *)target) \
: "memory"); \ : "memory"); \
return (r); \ return (r); \
} }
CK_PR_LOAD(ptr, void, void *, uint32_t, "lwz") CK_PR_LOAD(ptr, void, void *, uint32_t, "lwz")

@ -1,5 +1,5 @@
/* /*
* Copyright 2009-2014 Samy Al Bahra. * Copyright 2009-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -85,16 +85,16 @@ CK_PR_FENCE(release, "lwsync")
#undef CK_PR_FENCE #undef CK_PR_FENCE
#define CK_PR_LOAD(S, M, T, C, I) \ #define CK_PR_LOAD(S, M, T, C, I) \
CK_CC_INLINE static T \ CK_CC_INLINE static T \
ck_pr_load_##S(const M *target) \ ck_pr_load_##S(const M *target) \
{ \ { \
T r; \ T r; \
__asm__ __volatile__(I "%U1%X1 %0, %1" \ __asm__ __volatile__(I "%U1%X1 %0, %1" \
: "=r" (r) \ : "=r" (r) \
: "m" (*(C *)target) \ : "m" (*(const C *)target) \
: "memory"); \ : "memory"); \
return (r); \ return (r); \
} }
CK_PR_LOAD(ptr, void, void *, uint64_t, "ld") CK_PR_LOAD(ptr, void, void *, uint64_t, "ld")

@ -1,5 +1,5 @@
/* /*
* Copyright 2009-2014 Samy Al Bahra. * Copyright 2009-2015 Samy Al Bahra.
* Copyright 2011 Devon H. O'Dell <devon.odell@gmail.com> * Copyright 2011 Devon H. O'Dell <devon.odell@gmail.com>
* All rights reserved. * All rights reserved.
* *
@ -114,16 +114,16 @@ CK_PR_FAS_S(8, uint8_t, "xchgb")
#undef CK_PR_FAS_S #undef CK_PR_FAS_S
#undef CK_PR_FAS #undef CK_PR_FAS
#define CK_PR_LOAD(S, M, T, C, I) \ #define CK_PR_LOAD(S, M, T, C, I) \
CK_CC_INLINE static T \ CK_CC_INLINE static T \
ck_pr_load_##S(const M *target) \ ck_pr_load_##S(const M *target) \
{ \ { \
T r; \ T r; \
__asm__ __volatile__(I " %1, %0" \ __asm__ __volatile__(I " %1, %0" \
: "=q" (r) \ : "=q" (r) \
: "m" (*(C *)target) \ : "m" (*(const C *)target) \
: "memory"); \ : "memory"); \
return (r); \ return (r); \
} }
CK_PR_LOAD(ptr, void, void *, char, "movl") CK_PR_LOAD(ptr, void, void *, char, "movl")

@ -1,5 +1,5 @@
/* /*
* Copyright 2009-2014 Samy Al Bahra. * Copyright 2009-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -131,9 +131,9 @@ CK_PR_FAS_S(8, uint8_t, "xchgb")
{ \ { \
T r; \ T r; \
__asm__ __volatile__(I " %1, %0" \ __asm__ __volatile__(I " %1, %0" \
: "=q" (r) \ : "=q" (r) \
: "m" (*(C *)target) \ : "m" (*(const C *)target) \
: "memory"); \ : "memory"); \
return (r); \ return (r); \
} }
@ -167,7 +167,7 @@ ck_pr_load_64_2(const uint64_t target[2], uint64_t v[2])
} }
CK_CC_INLINE static void CK_CC_INLINE static void
ck_pr_load_ptr_2(void *t, void *v) ck_pr_load_ptr_2(const void *t, void *v)
{ {
ck_pr_load_64_2(t, v); ck_pr_load_64_2(t, v);
return; return;

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 Samy Al Bahra. * Copyright 2013-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,6 +1,6 @@
/* /*
* Copyright 2013-2014 Olivier Houchard * Copyright 2013-2015 Olivier Houchard
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* Copyright 2011 David Joseph. * Copyright 2011 David Joseph.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* Copyright 2011 David Joseph. * Copyright 2011 David Joseph.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* Copyright 2011 David Joseph. * Copyright 2011 David Joseph.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* Copyright 2011 David Joseph. * Copyright 2011 David Joseph.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* Copyright 2012-2014 AppNexus, Inc. * Copyright 2012-2014 AppNexus, Inc.
* Copyright 2012 Shreyas Prasad. * Copyright 2012 Shreyas Prasad.
* Copyright 2014 Paul Khuong. * Copyright 2014 Paul Khuong.

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 Samy Al Bahra. * Copyright 2013-2015 Samy Al Bahra.
* Copyright 2013 Brendon Scheinman. * Copyright 2013 Brendon Scheinman.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 Samy Al Bahra. * Copyright 2013-2015 Samy Al Bahra.
* Copyright 2013 Brendon Scheinman. * Copyright 2013 Brendon Scheinman.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -87,14 +87,7 @@ read_thread(void *unused CK_CC_UNUSED)
{ {
unsigned int j; unsigned int j;
ck_epoch_record_t record CK_CC_CACHELINE; ck_epoch_record_t record CK_CC_CACHELINE;
ck_stack_entry_t *cursor; ck_stack_entry_t *cursor, *n;
/*
* This is redundant post-incremented in order to silence some
* irrelevant GCC warnings. It is volatile in order to prevent
* elimination.
*/
volatile ck_stack_entry_t *n;
ck_epoch_register(&stack_epoch, &record); ck_epoch_register(&stack_epoch, &record);
@ -121,9 +114,7 @@ read_thread(void *unused CK_CC_UNUSED)
continue; continue;
n = CK_STACK_NEXT(cursor); n = CK_STACK_NEXT(cursor);
j += ck_pr_load_ptr(&n) != NULL;
/* Force n use. */
j += ((uintptr_t)(void *)n & 0) + 1;
} }
ck_epoch_end(&stack_epoch, &record); ck_epoch_end(&stack_epoch, &record);

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -88,13 +88,7 @@ read_thread(void *unused CK_CC_UNUSED)
unsigned int j; unsigned int j;
ck_epoch_record_t record CK_CC_CACHELINE; ck_epoch_record_t record CK_CC_CACHELINE;
ck_stack_entry_t *cursor; ck_stack_entry_t *cursor;
ck_stack_entry_t *n;
/*
* This is redundant post-incremented in order to silence some
* irrelevant GCC warnings. It is volatile in order to prevent
* elimination.
*/
volatile ck_stack_entry_t *n;
ck_epoch_register(&stack_epoch, &record); ck_epoch_register(&stack_epoch, &record);
@ -121,9 +115,7 @@ read_thread(void *unused CK_CC_UNUSED)
continue; continue;
n = CK_STACK_NEXT(cursor); n = CK_STACK_NEXT(cursor);
j += ck_pr_load_ptr(&n) != NULL;
/* Force n use. */
j += ((uintptr_t)(void *)n & 0) + 1;
} }
ck_epoch_end(&stack_epoch, &record); ck_epoch_end(&stack_epoch, &record);

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,6 +1,6 @@
/* /*
* Copyright 2012 Hendrik Donner * Copyright 2012 Hendrik Donner
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2014 Samy Al Bahra. * Copyright 2010-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -150,7 +150,7 @@ run_test(unsigned int is, unsigned int ad)
if (i & 1) { if (i & 1) {
if (ck_hs_put_unique(&hs[j], h, test[i]) == false) if (ck_hs_put_unique(&hs[j], h, test[i]) == false)
ck_error("ERROR [%zu]: Failed to insert unique (%s)\n", j, test[i]); ck_error("ERROR [%zu]: Failed to insert unique (%s)\n", j, test[i]);
} else if (ck_hs_apply(&hs[j], h, test[i], test_unique, (char *)test[i]) == false) { } else if (ck_hs_apply(&hs[j], h, test[i], test_unique, (void *)(uintptr_t)test[i]) == false) {
ck_error("ERROR: Failed to apply for insertion.\n"); ck_error("ERROR: Failed to apply for insertion.\n");
} }
@ -161,7 +161,7 @@ run_test(unsigned int is, unsigned int ad)
ck_error("ERROR: Failed to remove apply.\n"); ck_error("ERROR: Failed to remove apply.\n");
} }
if (ck_hs_apply(&hs[j], h, test[i], test_negative, (char *)test[i]) == false) if (ck_hs_apply(&hs[j], h, test[i], test_negative, (char *)(uintptr_t)test[i]) == false)
ck_error("ERROR: Failed to apply.\n"); ck_error("ERROR: Failed to apply.\n");
break; break;
@ -272,7 +272,7 @@ run_test(unsigned int is, unsigned int ad)
} }
/* Attempt in-place mutation. */ /* Attempt in-place mutation. */
if (ck_hs_apply(&hs[j], h, test[i], test_ip, (void *)test[i]) == false) if (ck_hs_apply(&hs[j], h, test[i], test_ip, (void *)(uintptr_t)test[i]) == false)
ck_error("ERROR [%u]: Failed to apply: %s != %s\n", is, (char *)r, test[i]); ck_error("ERROR [%u]: Failed to apply: %s != %s\n", is, (char *)r, test[i]);
d = ck_hs_get(&hs[j], h, test[i]) != NULL; d = ck_hs_get(&hs[j], h, test[i]) != NULL;

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -83,7 +83,7 @@ main(void)
mode |= CK_HT_WORKLOAD_DELETE; mode |= CK_HT_WORKLOAD_DELETE;
#endif #endif
if (ck_ht_init(&ht, mode, NULL, &my_allocator, 16, 6602834) == false) { if (ck_ht_init(&ht, mode, NULL, &my_allocator, 2, 6602834) == false) {
perror("ck_ht_init"); perror("ck_ht_init");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* Copyright 2013 John Wittrock. * Copyright 2013 John Wittrock.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* Copyright 2013 John Wittrock. * Copyright 2013 John Wittrock.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra, John Wittrock. * Copyright 2011-2015 Samy Al Bahra, John Wittrock.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2014 Samy Al Bahra. * Copyright 2012-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -150,7 +150,8 @@ run_test(unsigned int is, unsigned int ad)
if (i & 1) { if (i & 1) {
if (ck_rhs_put_unique(&hs[j], h, test[i]) == false) if (ck_rhs_put_unique(&hs[j], h, test[i]) == false)
ck_error("ERROR [%zu]: Failed to insert unique (%s)\n", j, test[i]); ck_error("ERROR [%zu]: Failed to insert unique (%s)\n", j, test[i]);
} else if (ck_rhs_apply(&hs[j], h, test[i], test_unique, (char *)test[i]) == false) { } else if (ck_rhs_apply(&hs[j], h, test[i], test_unique,
(void *)(uintptr_t)test[i]) == false) {
ck_error("ERROR: Failed to apply for insertion.\n"); ck_error("ERROR: Failed to apply for insertion.\n");
} }
@ -161,7 +162,8 @@ run_test(unsigned int is, unsigned int ad)
ck_error("ERROR: Failed to remove apply.\n"); ck_error("ERROR: Failed to remove apply.\n");
} }
if (ck_rhs_apply(&hs[j], h, test[i], test_negative, (char *)test[i]) == false) if (ck_rhs_apply(&hs[j], h, test[i], test_negative,
(void *)(uintptr_t)test[i]) == false)
ck_error("ERROR: Failed to apply.\n"); ck_error("ERROR: Failed to apply.\n");
break; break;
@ -268,8 +270,10 @@ run_test(unsigned int is, unsigned int ad)
ck_error("ERROR [%u]: Invalid &hs[j]: %s != %s\n", (char *)r, test[i], is); ck_error("ERROR [%u]: Invalid &hs[j]: %s != %s\n", (char *)r, test[i], is);
} }
/* Attempt in-place mutation. */ /* Attempt in-place mutation. */
if (ck_rhs_apply(&hs[j], h, test[i], test_ip, (void *)test[i]) == false) if (ck_rhs_apply(&hs[j], h, test[i], test_ip,
(void *)(uintptr_t)test[i]) == false) {
ck_error("ERROR [%u]: Failed to apply: %s != %s\n", is, (char *)r, test[i]); ck_error("ERROR [%u]: Failed to apply: %s != %s\n", is, (char *)r, test[i]);
}
d = ck_rhs_get(&hs[j], h, test[i]) != NULL; d = ck_rhs_get(&hs[j], h, test[i]) != NULL;
if (d == false) if (d == false)

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 Samy Al Bahra. * Copyright 2013-2015 Samy Al Bahra.
* Copyright 2013 Brendon Scheinman. * Copyright 2013 Brendon Scheinman.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 Samy Al Bahra. * Copyright 2013-2015 Samy Al Bahra.
* Copyright 2013 Brendon Scheinman. * Copyright 2013 Brendon Scheinman.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 Samy Al Bahra. * Copyright 2013-2015 Samy Al Bahra.
* Copything 2013 Brendon Scheinman. * Copything 2013 Brendon Scheinman.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2014 Samy Al Bahra. * Copyright 2013-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* Copyright 2011 David Joseph. * Copyright 2011 David Joseph.
* All rights reserved. * All rights reserved.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2014 Samy Al Bahra. * Copyright 2011-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

@ -1,5 +1,5 @@
/* /*
* Copyright 2009-2014 Samy Al Bahra. * Copyright 2009-2015 Samy Al Bahra.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save