Add mailbox setup and teardown

master
Nick Krichevsky 2019-09-22 14:48:05 -04:00
parent 52bb13efd6
commit a5af246855
1 changed files with 8 additions and 0 deletions

8
main.c
View File

@ -93,4 +93,12 @@ int main(int argc, char *argv[]) {
printf("#%d recipient=%d value=%d\n", i, inputs[i].recipient, inputs[i].value);
}
free(inputs);
int init_result = init_mailboxes(num_threads);
if (init_result != 0) {
printf("Failed to setup mailboxes.\n");
return 1;
}
free_mailboxes();
}