We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5600bd1 commit 49e6275Copy full SHA for 49e6275
src/sem.rs
@@ -1,3 +1,5 @@
1
+use std::os::raw::c_long;
2
+
3
use ffi::*;
4
use {IntoTimeout, WaitTimeout};
5
@@ -18,7 +20,7 @@ impl Semaphore {
18
20
/// Passing a value greater than zero is useful for managing a finite pool of resources,
19
21
/// where the pool size is equal to the value.
22
pub fn new(n: u64) -> Self {
- let ptr = unsafe { dispatch_semaphore_create(n as i64) };
23
+ let ptr = unsafe { dispatch_semaphore_create(n as c_long) };
24
25
Semaphore { ptr }
26
}
0 commit comments