We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b393596 commit 633aff2Copy full SHA for 633aff2
adapter/thread_metric/src/lib.rs
@@ -126,7 +126,10 @@ pub extern "C" fn tm_semaphore_create(sema_id: c_int) -> c_int {
126
#[no_mangle]
127
pub extern "C" fn tm_semaphore_get(sema_id: c_int) -> c_int {
128
let sema = unsafe { TM_SEMAS[sema_id as usize].assume_init_ref() };
129
- sema.acquire_notimeout::<InsertToEnd>() as c_int
+ if sema.acquire_notimeout::<InsertToEnd>() {
130
+ return TM_SUCCESS;
131
+ }
132
+ TM_ERROR
133
}
134
135
0 commit comments