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()
78 int result = sem_init(&native_handle_, 0, count);
79 DCHECK_EQ(0, result);
80 USE(result);
85 int result = sem_destroy(&native_handle_);
86 DCHECK_EQ(0, result);
87 USE(result);
92 int result = sem_post(&native_handle_);
93 DCHECK_EQ(0, result);
94 USE(result);
100 int result = sem_wait(&native_handle_);
101 if (result == 0) return; // Semaphore was signalled.
103 DCHECK_EQ(-1, result);
115 int result = sem_trywait(&native_handle_);
116 if (result == 0) return true;
127 int result = sem_timedwait(&native_handle_, &ts);
128 if (result == 0) return true; // Semaphore was signalled.
130 if (result > 0) {
132 errno = result;
133 result = -1;
136 if (result == -1 && errno == ETIMEDOUT) {
141 DCHECK_EQ(-1, result);
157 BOOL result = CloseHandle(native_handle_);
158 DCHECK(result);
159 USE(result);
165 BOOL result = ReleaseSemaphore(native_handle_, 1, &dummy);
166 DCHECK(result);
167 USE(result);
172 DWORD result = WaitForSingleObject(native_handle_, INFINITE);
173 DCHECK(result == WAIT_OBJECT_0);
174 USE(result);
184 DWORD result = WaitForSingleObject(native_handle_, INFINITE - 1);
185 if (result == WAIT_OBJECT_0) {
188 DCHECK(result == WAIT_TIMEOUT);
191 DWORD result = WaitForSingleObject(
193 if (result == WAIT_TIMEOUT) {
196 DCHECK(result == WAIT_OBJECT_0);