Skip to content

Commit

Permalink
Add safety checks to semaphores, add importing and exporting (#2035)
Browse files Browse the repository at this point in the history
* Add safety checks to semaphores, add importing and exporting

* Small fix

* Limit test to unix only
  • Loading branch information
Rua authored Oct 13, 2022
1 parent bda4aaa commit 43223f5
Show file tree
Hide file tree
Showing 8 changed files with 1,371 additions and 194 deletions.
16 changes: 6 additions & 10 deletions examples/src/bin/gl-interop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,12 @@ mod linux {
.unwrap(),
);

let acquire_fd = unsafe {
acquire_sem
.export_fd(ExternalSemaphoreHandleType::OpaqueFd)
.unwrap()
};
let release_fd = unsafe {
release_sem
.export_fd(ExternalSemaphoreHandleType::OpaqueFd)
.unwrap()
};
let acquire_fd = acquire_sem
.export_fd(ExternalSemaphoreHandleType::OpaqueFd)
.unwrap();
let release_fd = release_sem
.export_fd(ExternalSemaphoreHandleType::OpaqueFd)
.unwrap();

let barrier_clone = barrier.clone();
let barrier_2_clone = barrier_2.clone();
Expand Down
Loading

0 comments on commit 43223f5

Please sign in to comment.