Document unsafe contracts and stop reusing poisoned state
This commit is contained in:
1 parent
a7fcd69897
commit
f2e728b503
46 files changed
+377
-45
No files matched your search
@@ -7,6 +7,7 @@ pub fn now_us() -> u64 {
|
||||
tv_nsec: 0,
|
||||
};
|
||||
// CLOCK_MONOTONIC shares one epoch between the compositor and shell.
|
||||
// SAFETY: clock_gettime writes only to the live, aligned timespec passed here.
|
||||
if unsafe { libc::clock_gettime(libc::CLOCK_MONOTONIC, &mut time) } != 0 {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user