Lines Matching refs:result

24   kern_return_t result = semaphore_create(  in Semaphore()  local
26 DCHECK_EQ(KERN_SUCCESS, result); in Semaphore()
27 USE(result); in Semaphore()
32 kern_return_t result = semaphore_destroy(mach_task_self(), native_handle_); in ~Semaphore() local
33 DCHECK_EQ(KERN_SUCCESS, result); in ~Semaphore()
34 USE(result); in ~Semaphore()
39 kern_return_t result = semaphore_signal(native_handle_); in Signal() local
40 DCHECK_EQ(KERN_SUCCESS, result); in Signal()
41 USE(result); in Signal()
47 kern_return_t result = semaphore_wait(native_handle_); in Wait() local
48 if (result == KERN_SUCCESS) return; // Semaphore was signalled. in Wait()
49 DCHECK_EQ(KERN_ABORTED, result); in Wait()
66 kern_return_t result = semaphore_timedwait(native_handle_, ts); in WaitFor() local
67 if (result == KERN_SUCCESS) return true; // Semaphore was signalled. in WaitFor()
68 if (result == KERN_OPERATION_TIMED_OUT) return false; // Timeout. in WaitFor()
69 DCHECK_EQ(KERN_ABORTED, result); in WaitFor()
82 int result = sem_init(&native_handle_, 0, count);
83 DCHECK_EQ(0, result);
84 USE(result);
89 int result = sem_destroy(&native_handle_);
90 DCHECK_EQ(0, result);
91 USE(result);
96 int result = sem_post(&native_handle_);
97 DCHECK_EQ(0, result);
98 USE(result);
104 int result = sem_wait(&native_handle_);
105 if (result == 0) return; // Semaphore was signalled.
107 DCHECK_EQ(-1, result);
119 int result = sem_trywait(&native_handle_);
120 if (result == 0) return true;
131 int result = sem_timedwait(&native_handle_, &ts);
132 if (result == 0) return true; // Semaphore was signalled.
134 if (result > 0) {
136 errno = result;
137 result = -1;
140 if (result == -1 && errno == ETIMEDOUT) {
145 DCHECK_EQ(-1, result);
161 BOOL result = CloseHandle(native_handle_);
162 DCHECK(result);
163 USE(result);
169 BOOL result = ReleaseSemaphore(native_handle_, 1, &dummy);
170 DCHECK(result);
171 USE(result);
176 DWORD result = WaitForSingleObject(native_handle_, INFINITE);
177 DCHECK(result == WAIT_OBJECT_0);
178 USE(result);
188 DWORD result = WaitForSingleObject(native_handle_, INFINITE - 1);
189 if (result == WAIT_OBJECT_0) {
192 DCHECK(result == WAIT_TIMEOUT);
195 DWORD result = WaitForSingleObject(
197 if (result == WAIT_TIMEOUT) {
200 DCHECK(result == WAIT_OBJECT_0);