Attempt to fix CI · model-checking/verify-rust-std@5e9d445 (original) (raw)

`@@ -19,6 +19,7 @@ cfg_if::cfg_if! {

`

19

19

`/// * If it is called again on the same thread as the first call, it will abort.

`

20

20

`/// * If it is called again on a different thread, it will wait in a loop

`

21

21

`/// (waiting for the process to exit).

`

``

22

`+

#[cfg_attr(any(test, doctest), allow(dead_code))]

`

22

23

`pub(crate) fn unique_thread_exit() {

`

23

24

`let this_thread_id = unsafe { libc::pthread_self() };

`

24

25

`use crate::sync::{Mutex, PoisonError};

`

`@@ -54,6 +55,7 @@ cfg_if::cfg_if! {

`

54

55

`///

`

55

56

`/// Mitigation is NOT implemented on this platform, either because this platform

`

56

57

`/// is not affected, or because mitigation is not yet implemented for this platform.

`

``

58

`+

#[cfg_attr(any(test, doctest), allow(dead_code))]

`

57

59

`pub(crate) fn unique_thread_exit() {

`

58

60

`` // Mitigation not required on platforms where exit is thread-safe.

``

59

61

`}

`