• Home
  • Raw
  • Download

Lines Matching refs:notifier

34 void chppPlatformNotifierInit(struct ChppNotifier *notifier) {  in chppPlatformNotifierInit()  argument
35 chppMutexInit(&notifier->mutex); in chppPlatformNotifierInit()
36 pthread_cond_init(&notifier->cond, NULL); in chppPlatformNotifierInit()
39 void chppPlatformNotifierDeinit(struct ChppNotifier *notifier) { in chppPlatformNotifierDeinit() argument
40 pthread_cond_destroy(&notifier->cond); in chppPlatformNotifierDeinit()
41 chppMutexDeinit(&notifier->mutex); in chppPlatformNotifierDeinit()
44 uint32_t chppPlatformNotifierGetSignal(struct ChppNotifier *notifier) { in chppPlatformNotifierGetSignal() argument
45 chppMutexLock(&notifier->mutex); in chppPlatformNotifierGetSignal()
47 uint32_t signal = notifier->signal; in chppPlatformNotifierGetSignal()
48 notifier->signal = 0; in chppPlatformNotifierGetSignal()
50 chppMutexUnlock(&notifier->mutex); in chppPlatformNotifierGetSignal()
54 uint32_t chppPlatformNotifierWait(struct ChppNotifier *notifier) { in chppPlatformNotifierWait() argument
55 chppMutexLock(&notifier->mutex); in chppPlatformNotifierWait()
57 while (notifier->signal == 0) { in chppPlatformNotifierWait()
58 pthread_cond_wait(&notifier->cond, &notifier->mutex.lock); in chppPlatformNotifierWait()
60 uint32_t signal = notifier->signal; in chppPlatformNotifierWait()
61 notifier->signal = 0; in chppPlatformNotifierWait()
63 chppMutexUnlock(&notifier->mutex); in chppPlatformNotifierWait()
66 uint32_t chppPlatformNotifierTimedWait(struct ChppNotifier *notifier, in chppPlatformNotifierTimedWait() argument
69 return chppPlatformNotifierWait(notifier); in chppPlatformNotifierTimedWait()
77 chppMutexLock(&notifier->mutex); in chppPlatformNotifierTimedWait()
84 while ((notifier->signal == 0) && in chppPlatformNotifierTimedWait()
86 pthread_cond_timedwait(&notifier->cond, &notifier->mutex.lock, &absTime); in chppPlatformNotifierTimedWait()
89 uint32_t signal = notifier->signal; in chppPlatformNotifierTimedWait()
90 notifier->signal = 0; in chppPlatformNotifierTimedWait()
92 chppMutexUnlock(&notifier->mutex); in chppPlatformNotifierTimedWait()
97 void chppPlatformNotifierSignal(struct ChppNotifier *notifier, in chppPlatformNotifierSignal() argument
99 chppMutexLock(&notifier->mutex); in chppPlatformNotifierSignal()
101 notifier->signal |= signal; in chppPlatformNotifierSignal()
102 pthread_cond_signal(&notifier->cond); in chppPlatformNotifierSignal()
104 chppMutexUnlock(&notifier->mutex); in chppPlatformNotifierSignal()