Samy Al Bahra 10 years ago
commit f9a127fffb

6
.gitignore vendored

@ -8,6 +8,8 @@ src/Makefile
doc/Makefile
build/Makefile
.DS_Store
LOG
*.log
*.html
*.gz
*.o
@ -35,10 +37,9 @@ regressions/ck_brlock/validate/validate
regressions/ck_bytelock/benchmark/latency
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.THROUGHPUT
regressions/ck_cohort/benchmark/ck_cohort.THROUGHPUT
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_synchronize
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/nbds_haz_test
regressions/ck_hp/validate/serial
regressions/ck_hs/benchmark/apply
regressions/ck_hs/benchmark/parallel_bytestring
regressions/ck_hs/benchmark/parallel_bytestring.delete
regressions/ck_hs/benchmark/serial

6
configure vendored

@ -34,7 +34,7 @@ WANT_PIC=yes
P_PWD=`pwd`
MAINTAINER='sbahra@repnop.org'
VERSION=${VERSION:-'0.4.5'}
VERSION=${VERSION:-'0.4.6'}
VERSION_MAJOR='0'
BUILD="$PWD/build/ck.build"
PREFIX=${PREFIX:-"/usr/local"}
@ -418,7 +418,7 @@ case $PLATFORM in
"i86pc")
RTM_ENABLE="CK_MD_RTM_DISABLE"
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
"amd64")
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"
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"
if test "$COMPILER" = "mingw64"; then
ENVIRONMENT=64

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

@ -1,5 +1,5 @@
/*
* Copyright 2009-2014 Samy Al Bahra.
* Copyright 2009-2015 Samy Al Bahra.
* All rights reserved.
*
* 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.
* 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 2014 Paul Khuong.
* All rights reserved.

@ -1,5 +1,5 @@
/*
* Copyright 2011-2014 Samy Al Bahra.
* Copyright 2011-2015 Samy Al Bahra.
* All rights reserved.
*
* 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.
*
* 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.
* All rights reserved.
*
@ -40,7 +40,7 @@
CK_CC_INLINE static T * \
N(F *p) \
{ \
const F *n = p; \
F *n = p; \
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.
* All rights reserved.
*

@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 Samy Al Bahra.
* Copyright 2013-2015 Samy Al Bahra.
* All rights reserved.
*
* 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.
*
* 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.
* All rights reserved.
*

@ -1,5 +1,5 @@
/*
* Copyright 2010-2014 Samy Al Bahra.
* Copyright 2010-2015 Samy Al Bahra.
* All rights reserved.
*
* 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.
* All rights reserved.
*

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

@ -1,6 +1,6 @@
/*
* Copyright 2013 John Wittrock.
* Copyright 2013-2014 Samy Al Bahra.
* Copyright 2013-2015 Samy Al Bahra.
* All rights reserved.
*
* 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.
* All rights reserved.
*

@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 Samy Al Bahra.
* Copyright 2012-2015 Samy Al Bahra.
* All rights reserved.
*
* 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.
*
* 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.
*
* 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.
* All rights reserved.
*

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

@ -1,6 +1,6 @@
/*
* Copyright 2009-2014 Samy Al Bahra.
* Copyright 2013-2014 Olivier Houchard.
* Copyright 2009-2015 Samy Al Bahra.
* Copyright 2013-2015 Olivier Houchard.
* All rights reserved.
*
* 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.
* All rights reserved.
*

@ -1,5 +1,5 @@
/*
* Copyright 2009-2014 Samy Al Bahra.
* Copyright 2009-2015 Samy Al Bahra.
* Copyright 2012 João Fernandes.
* All rights reserved.
*
@ -89,7 +89,7 @@ CK_PR_FENCE(release, "lwsync")
T r; \
__asm__ __volatile__(I "%U1%X1 %0, %1" \
: "=r" (r) \
: "m" (*(C *)target) \
: "m" (*(const C *)target) \
: "memory"); \
return (r); \
}

@ -1,5 +1,5 @@
/*
* Copyright 2009-2014 Samy Al Bahra.
* Copyright 2009-2015 Samy Al Bahra.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -92,7 +92,7 @@ CK_PR_FENCE(release, "lwsync")
T r; \
__asm__ __volatile__(I "%U1%X1 %0, %1" \
: "=r" (r) \
: "m" (*(C *)target) \
: "m" (*(const C *)target) \
: "memory"); \
return (r); \
}

@ -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>
* All rights reserved.
*
@ -121,7 +121,7 @@ CK_PR_FAS_S(8, uint8_t, "xchgb")
T r; \
__asm__ __volatile__(I " %1, %0" \
: "=q" (r) \
: "m" (*(C *)target) \
: "m" (*(const C *)target) \
: "memory"); \
return (r); \
}

@ -1,5 +1,5 @@
/*
* Copyright 2009-2014 Samy Al Bahra.
* Copyright 2009-2015 Samy Al Bahra.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -132,7 +132,7 @@ CK_PR_FAS_S(8, uint8_t, "xchgb")
T r; \
__asm__ __volatile__(I " %1, %0" \
: "=q" (r) \
: "m" (*(C *)target) \
: "m" (*(const C *)target) \
: "memory"); \
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_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);
return;

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

@ -1,6 +1,6 @@
/*
* Copyright 2013-2014 Olivier Houchard
* Copyright 2010-2014 Samy Al Bahra.
* Copyright 2013-2015 Olivier Houchard
* Copyright 2010-2015 Samy Al Bahra.
* All rights reserved.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
* All rights reserved.
*

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

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

@ -1,5 +1,5 @@
/*
* Copyright 2011-2014 Samy Al Bahra.
* Copyright 2011-2015 Samy Al Bahra.
* Copyright 2011 David Joseph.
* 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 Shreyas Prasad.
* Copyright 2014 Paul Khuong.

@ -1,5 +1,5 @@
/*
* Copyright 2011-2014 Samy Al Bahra.
* Copyright 2011-2015 Samy Al Bahra.
* All rights reserved.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
* All rights reserved.
*

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

@ -1,5 +1,5 @@
/*
* Copyright 2010-2014 Samy Al Bahra.
* Copyright 2010-2015 Samy Al Bahra.
* All rights reserved.
*
* 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;
ck_epoch_record_t record CK_CC_CACHELINE;
ck_stack_entry_t *cursor;
/*
* 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_stack_entry_t *cursor, *n;
ck_epoch_register(&stack_epoch, &record);
@ -121,9 +114,7 @@ read_thread(void *unused CK_CC_UNUSED)
continue;
n = CK_STACK_NEXT(cursor);
/* Force n use. */
j += ((uintptr_t)(void *)n & 0) + 1;
j += ck_pr_load_ptr(&n) != NULL;
}
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.
*
* 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;
ck_epoch_record_t record CK_CC_CACHELINE;
ck_stack_entry_t *cursor;
/*
* 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_stack_entry_t *n;
ck_epoch_register(&stack_epoch, &record);
@ -121,9 +115,7 @@ read_thread(void *unused CK_CC_UNUSED)
continue;
n = CK_STACK_NEXT(cursor);
/* Force n use. */
j += ((uintptr_t)(void *)n & 0) + 1;
j += ck_pr_load_ptr(&n) != NULL;
}
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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* Redistribution and use in source and binary forms, with or without

@ -1,6 +1,6 @@
/*
* Copyright 2012 Hendrik Donner
* Copyright 2012-2014 Samy Al Bahra.
* Copyright 2012-2015 Samy Al Bahra.
* All rights reserved.
*
* 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.
*
* 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.
*
* 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.
*
* 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 (ck_hs_put_unique(&hs[j], h, test[i]) == false)
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");
}
@ -161,7 +161,7 @@ run_test(unsigned int is, unsigned int ad)
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");
break;
@ -272,7 +272,7 @@ run_test(unsigned int is, unsigned int ad)
}
/* 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]);
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.
*
* 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.
*
* 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.
*
* 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.
*
* Redistribution and use in source and binary forms, with or without
@ -83,7 +83,7 @@ main(void)
mode |= CK_HT_WORKLOAD_DELETE;
#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");
exit(EXIT_FAILURE);
}

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

@ -1,5 +1,5 @@
/*
* Copyright 2011-2014 Samy Al Bahra.
* Copyright 2011-2015 Samy Al Bahra.
* Copyright 2013 John Wittrock.
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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 (ck_rhs_put_unique(&hs[j], h, test[i]) == false)
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");
}
@ -161,7 +162,8 @@ run_test(unsigned int is, unsigned int ad)
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");
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);
}
/* 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]);
}
d = ck_rhs_get(&hs[j], h, test[i]) != NULL;
if (d == false)

@ -1,5 +1,5 @@
/*
* Copyright 2011-2014 Samy Al Bahra.
* Copyright 2011-2015 Samy Al Bahra.
* All rights reserved.
*
* 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.
*
* 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.
*
* 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.
* All rights reserved.
*

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

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

@ -1,5 +1,5 @@
/*
* Copyright 2011-2014 Samy Al Bahra.
* Copyright 2011-2015 Samy Al Bahra.
* All rights reserved.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
* All rights reserved.
*

@ -1,5 +1,5 @@
/*
* Copyright 2011-2014 Samy Al Bahra.
* Copyright 2011-2015 Samy Al Bahra.
* All rights reserved.
*
* 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.
*
* 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.
*
* 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