Lines Matching refs:cv

31 static inline size_t posix_cond_to_offset(struct k_condvar *cv)  in posix_cond_to_offset()  argument
33 return cv - posix_cond_pool; in posix_cond_to_offset()
70 struct k_condvar *cv; in to_posix_cond() local
85 cv = &posix_cond_pool[bit]; in to_posix_cond()
87 return cv; in to_posix_cond()
94 struct k_condvar *cv; in cond_wait() local
97 cv = to_posix_cond(cond); in cond_wait()
98 if (cv == NULL || m == NULL) { in cond_wait()
102 LOG_DBG("Waiting on cond %p with timeout %llx", cv, timeout.ticks); in cond_wait()
103 ret = k_condvar_wait(cv, m, timeout); in cond_wait()
105 LOG_DBG("Timeout waiting on cond %p", cv); in cond_wait()
112 LOG_DBG("Cond %p received signal", cv); in cond_wait()
121 struct k_condvar *cv; in pthread_cond_signal() local
123 cv = to_posix_cond(cvar); in pthread_cond_signal()
124 if (cv == NULL) { in pthread_cond_signal()
128 LOG_DBG("Signaling cond %p", cv); in pthread_cond_signal()
129 ret = k_condvar_signal(cv); in pthread_cond_signal()
143 struct k_condvar *cv; in pthread_cond_broadcast() local
145 cv = get_posix_cond(*cvar); in pthread_cond_broadcast()
146 if (cv == NULL) { in pthread_cond_broadcast()
150 LOG_DBG("Broadcasting on cond %p", cv); in pthread_cond_broadcast()
151 ret = k_condvar_broadcast(cv); in pthread_cond_broadcast()
162 int pthread_cond_wait(pthread_cond_t *cv, pthread_mutex_t *mut) in pthread_cond_wait() argument
164 return cond_wait(cv, mut, K_FOREVER); in pthread_cond_wait()
167 int pthread_cond_timedwait(pthread_cond_t *cv, pthread_mutex_t *mut, const struct timespec *abstime) in pthread_cond_timedwait() argument
169 return cond_wait(cv, mut, K_MSEC((int32_t)timespec_to_timeoutms(abstime))); in pthread_cond_timedwait()
174 struct k_condvar *cv; in pthread_cond_init() local
180 cv = to_posix_cond(cvar); in pthread_cond_init()
181 if (cv == NULL) { in pthread_cond_init()
185 LOG_DBG("Initialized cond %p", cv); in pthread_cond_init()
194 struct k_condvar *cv; in pthread_cond_destroy() local
196 cv = get_posix_cond(*cvar); in pthread_cond_destroy()
197 if (cv == NULL) { in pthread_cond_destroy()
201 bit = posix_cond_to_offset(cv); in pthread_cond_destroy()
207 LOG_DBG("Destroyed cond %p", cv); in pthread_cond_destroy()