diff --git a/lec14/report14.md b/lec14/report14.md index 788516a9c0afb0281159047f2dc09d3492e39596..cc6b80a13e85b5e13c47a9cd64d38a0e01902aef 100644 --- a/lec14/report14.md +++ b/lec14/report14.md @@ -27,4 +27,10 @@ * block <br>  +### How to control static and global variable? +* static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZERS; + + pthread_mutex_lock(&mutex); + count++; + pthread_mutex_unlock(&mutex);