Add music

This commit is contained in:
Michal Moskal
2017-07-07 11:44:34 +01:00
parent 43b167957b
commit 97b6c7dc4b
13 changed files with 166 additions and 5 deletions

View File

@ -9,8 +9,6 @@
#include <assert.h>
#include <unistd.h>
#define DEVICE_EVT_ANY 0
void *operator new(size_t size) {
return malloc(size);
}
@ -237,6 +235,14 @@ static void *evtDispatcher(void *dummy) {
}
}
int allocateNotifyEvent() {
static volatile int notifyId;
pthread_mutex_lock(&eventMutex);
int res = ++notifyId;
pthread_mutex_unlock(&eventMutex);
return res;
}
void raiseEvent(int id, int event) {
auto e = mkEvent(id, event);
pthread_mutex_lock(&eventMutex);
@ -293,5 +299,4 @@ void dmesg(const char *format, ...) {
fflush(dmesgFile);
fdatasync(fileno(dmesgFile));
}
}