summaryrefslogtreecommitdiff
path: root/mutex.h
blob: 2894b4145e544c4e11ef7d655df3287327c687b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef MUTEX_H_
#define MUTEX_H_

#include <pthread.h>

typedef struct {
	int note;
	int state;
	int velocity;
	int action;
} SharedData;

extern SharedData shared_data;

extern pthread_mutex_t mutex;
extern pthread_cond_t cond_midi;
extern pthread_cond_t cond_synth;

void initialize_mutex();
void destroy_mutex();

#endif // MUTEX_H_