regressions/ck_ring: Allow for buffers of size 4 or more.

ck_pring
Samy Al Bahra 12 years ago
parent 1201e09577
commit 16e8b1c672

@ -241,7 +241,7 @@ main(int argc, char *argv[])
assert(nthr >= 1); assert(nthr >= 1);
size = atoi(argv[3]); size = atoi(argv[3]);
assert(size > 4 && (size & size - 1) == 0); assert(size >= 4 && (size & size - 1) == 0);
size -= 1; size -= 1;
ring = malloc(sizeof(ck_ring_t) * nthr); ring = malloc(sizeof(ck_ring_t) * nthr);

@ -214,7 +214,7 @@ main(int argc, char *argv[])
assert(nthr >= 1); assert(nthr >= 1);
size = atoi(argv[3]); size = atoi(argv[3]);
assert(size > 4 && (size & size - 1) == 0); assert(size >= 4 && (size & size - 1) == 0);
size -= 1; size -= 1;
ring = malloc(sizeof(ck_ring_t) * nthr); ring = malloc(sizeof(ck_ring_t) * nthr);

@ -166,7 +166,7 @@ main(int argc, char *argv[])
assert(nthr >= 1); assert(nthr >= 1);
size = atoi(argv[3]); size = atoi(argv[3]);
assert(size > 4 && (size & size - 1) == 0); assert(size >= 4 && (size & size - 1) == 0);
size -= 1; size -= 1;
ring = malloc(sizeof(ck_ring_t) * nthr); ring = malloc(sizeof(ck_ring_t) * nthr);

@ -167,7 +167,7 @@ main(int argc, char *argv[])
assert(nthr >= 1); assert(nthr >= 1);
size = atoi(argv[3]); size = atoi(argv[3]);
assert(size > 4 && (size & size - 1) == 0); assert(size >= 4 && (size & size - 1) == 0);
size -= 1; size -= 1;
ring = malloc(sizeof(CK_RING_INSTANCE(entry_ring)) * nthr); ring = malloc(sizeof(CK_RING_INSTANCE(entry_ring)) * nthr);

Loading…
Cancel
Save