Allocate the correct number of mailboxes for the number of threads
parent
0b21e8be9a
commit
4cc75e59cf
3
main.c
3
main.c
|
@ -122,7 +122,8 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
free(inputs);
|
||||
|
||||
int init_result = init_mailboxes(num_threads);
|
||||
// Init one mailbox for each thread, and an additional one for the main thread.
|
||||
int init_result = init_mailboxes(num_threads + 1);
|
||||
if (init_result != 0) {
|
||||
printf("Failed to setup mailboxes.\n");
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue