1 #[cfg(all(loom, test))] 2 macro_rules! tokio_thread_local { 3 ($(#[$attrs:meta])* $vis:vis static $name:ident: $ty:ty = const { $expr:expr } $(;)?) => { 4 loom::thread_local! { 5 $(#[$attrs])* 6 $vis static $name: $ty = $expr; 7 } 8 }; 9 10 ($($tts:tt)+) => { loom::thread_local!{ $($tts)+ } } 11 } 12 13 #[cfg(not(all(loom, test)))] 14 macro_rules! tokio_thread_local { 15 ($($tts:tt)+) => { 16 ::std::thread_local!{ $($tts)+ } 17 } 18 } 19