Beispiel #1
0
static int
sendTuneRequest (TuneRequest *req) {
#ifdef GOT_PTHREADS
  if (startTuneThread()) {
    return asyncSignalEvent(tuneRequestEvent, req);
  }
#endif /* GOT_PTHREADS */

  handleTuneRequest(req);
  return 1;
}
Beispiel #2
0
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 */
}
Beispiel #3
0
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;
}
Beispiel #4
0
static int
sendTuneMessage (TuneMessage *msg) {
  return asyncSignalEvent(tuneMessageEvent, msg);
}