Add atomic types for ssize_t

This commit is contained in:
David Goldblatt 2017-03-06 11:40:58 -08:00 committed by David Goldblatt
parent 424e3428b1
commit 438efede78
2 changed files with 11 additions and 0 deletions

View File

@ -98,6 +98,9 @@ JEMALLOC_GENERATE_COMPATABILITY_INT_ATOMICS(unsigned, u)
JEMALLOC_GENERATE_INT_ATOMICS(size_t, zu, LG_SIZEOF_PTR) JEMALLOC_GENERATE_INT_ATOMICS(size_t, zu, LG_SIZEOF_PTR)
JEMALLOC_GENERATE_COMPATABILITY_INT_ATOMICS(size_t, zu) JEMALLOC_GENERATE_COMPATABILITY_INT_ATOMICS(size_t, zu)
JEMALLOC_GENERATE_INT_ATOMICS(ssize_t, zd, LG_SIZEOF_PTR)
JEMALLOC_GENERATE_COMPATABILITY_INT_ATOMICS(ssize_t, zd)
JEMALLOC_GENERATE_INT_ATOMICS(uint32_t, u32, 2) JEMALLOC_GENERATE_INT_ATOMICS(uint32_t, u32, 2)
JEMALLOC_GENERATE_COMPATABILITY_INT_ATOMICS(uint32_t, u32) JEMALLOC_GENERATE_COMPATABILITY_INT_ATOMICS(uint32_t, u32)

View File

@ -249,6 +249,13 @@ TEST_BEGIN(test_atomic_zu) {
} }
TEST_END TEST_END
TEST_STRUCT(ssize_t, zd);
TEST_BEGIN(test_atomic_zd) {
INTEGER_TEST_BODY(ssize_t, zd);
}
TEST_END
TEST_STRUCT(unsigned, u); TEST_STRUCT(unsigned, u);
TEST_BEGIN(test_atomic_u) { TEST_BEGIN(test_atomic_u) {
INTEGER_TEST_BODY(unsigned, u); INTEGER_TEST_BODY(unsigned, u);
@ -262,5 +269,6 @@ main(void) {
test_atomic_u32, test_atomic_u32,
test_atomic_p, test_atomic_p,
test_atomic_zu, test_atomic_zu,
test_atomic_zd,
test_atomic_u); test_atomic_u);
} }