static int sendTuneRequest (TuneRequest *req) { #ifdef GOT_PTHREADS if (startTuneThread()) { return asyncSignalEvent(tuneRequestEvent, req); } #endif /* GOT_PTHREADS */ handleTuneRequest(req); return 1; }
static int sendSpeechMessage (volatile SpeechDriverThread *sdt, SpeechMessage *msg) { logSpeechMessage(msg, "sending"); #ifdef GOT_PTHREADS return asyncSignalEvent(sdt->messageEvent, msg); #else /* GOT_PTHREADS */ handleSpeechMessage(sdt, msg); return 1; #endif /* GOT_PTHREADS */ }
int brlttyInterrupt (WaitResult waitResult) { if (interruptEvent) { InterruptEventParameters *iep; if ((iep = malloc(sizeof(*iep)))) { memset(iep, 0, sizeof(*iep)); iep->waitResult = waitResult; if (asyncSignalEvent(interruptEvent, iep)) { return 1; } free(iep); } else { logMallocError(); } } return 0; }
static int sendTuneMessage (TuneMessage *msg) { return asyncSignalEvent(tuneMessageEvent, msg); }