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

SharedData shared_data;

pthread_mutex_t mutex;
pthread_cond_t cond_midi;
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);
}