beejjorgensen/bgc

39.7 Mutexes: use of static keyword

Closed this issue · 1 comments

The first time you define a mutex you use

#include <stdio.h>
#include <threads.h>

static mtx_t serial_mtx;     // <-- MUTEX VARIABLE

no need for the static here right?
Maybe i'm missing something

It just makes it local to that file (opposite of extern), so it's basically harmless in that regard. But I think it might just be confusing because we use static in its other sense elsewhere in the chapter. I'll remove it.