summaryrefslogtreecommitdiff
path: root/mutex.c
blob: 69841ee56e44528d854daef3a1a86d407e9b9bd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <pthread.h>
#include "mutex.h"

SharedData shared_data;

pthread_mutex_t mutex;
pthread_cond_t cond_synth;

void initialize_mutex() {
	pthread_mutex_init(&mutex, NULL);
	pthread_cond_init(&cond_synth, NULL);
}

void destroy_mutex() {
	pthread_mutex_destroy(&mutex);
	pthread_cond_destroy(&cond_synth);
}