regressions/ck_fifo: Require non-NULL stub node.

ck_pring
Samy Al Bahra 11 years ago
parent 68d5206a03
commit edd12edbcc

@ -141,6 +141,8 @@ main(int argc, char *argv[])
ck_fifo_mpmc_init(&fifo, malloc(sizeof(ck_fifo_mpmc_entry_t))); ck_fifo_mpmc_init(&fifo, malloc(sizeof(ck_fifo_mpmc_entry_t)));
ck_fifo_mpmc_deinit(&fifo, &garbage); ck_fifo_mpmc_deinit(&fifo, &garbage);
if (garbage == NULL)
ck_error("ERROR: Expected non-NULL stub node on deinit.\n");
free(garbage); free(garbage);
ck_fifo_mpmc_init(&fifo, malloc(sizeof(ck_fifo_mpmc_entry_t))); ck_fifo_mpmc_init(&fifo, malloc(sizeof(ck_fifo_mpmc_entry_t)));

@ -160,6 +160,9 @@ main(int argc, char *argv[])
ck_fifo_spsc_init(fifo + i, malloc(sizeof(ck_fifo_spsc_entry_t))); ck_fifo_spsc_init(fifo + i, malloc(sizeof(ck_fifo_spsc_entry_t)));
ck_fifo_spsc_deinit(fifo + i, &garbage); ck_fifo_spsc_deinit(fifo + i, &garbage);
if (garbage == NULL)
ck_error("ERROR: Expected non-NULL stub node on deinit.\n");
free(garbage); free(garbage);
ck_fifo_spsc_init(fifo + i, malloc(sizeof(ck_fifo_spsc_entry_t))); ck_fifo_spsc_init(fifo + i, malloc(sizeof(ck_fifo_spsc_entry_t)));
r = pthread_create(thread + i, NULL, test, context + i); r = pthread_create(thread + i, NULL, test, context + i);

Loading…
Cancel
Save