@@ -16,10 +16,10 @@ use core::sync::atomic::{AtomicBool, AtomicU64, Ordering};
1616use core:: time:: Duration ;
1717
1818use kernel:: {
19+ c_str,
1920 delay:: coarse_sleep,
2021 error:: code:: * ,
2122 macros:: versions,
22- new_mutex,
2323 prelude:: * ,
2424 soc:: apple:: rtkit,
2525 sync:: {
@@ -589,17 +589,17 @@ impl GpuManager::ver {
589589 } ;
590590
591591 for _i in 0 ..=NUM_PIPES - 1 {
592- pipes. vtx . try_push ( Box :: pin_init ( new_mutex ! (
592+ pipes. vtx . try_push ( Box :: pin_init ( Mutex :: new_named (
593593 channel:: PipeChannel :: ver:: new ( dev, & mut alloc) ?,
594- "pipe_vtx" ,
594+ c_str ! ( "pipe_vtx" ) ,
595595 ) ) ?) ?;
596- pipes. frag . try_push ( Box :: pin_init ( new_mutex ! (
596+ pipes. frag . try_push ( Box :: pin_init ( Mutex :: new_named (
597597 channel:: PipeChannel :: ver:: new ( dev, & mut alloc) ?,
598- "pipe_frag" ,
598+ c_str ! ( "pipe_frag" ) ,
599599 ) ) ?) ?;
600- pipes. comp . try_push ( Box :: pin_init ( new_mutex ! (
600+ pipes. comp . try_push ( Box :: pin_init ( Mutex :: new_named (
601601 channel:: PipeChannel :: ver:: new ( dev, & mut alloc) ?,
602- "pipe_comp" ,
602+ c_str ! ( "pipe_comp" ) ,
603603 ) ) ?) ?;
604604 }
605605
@@ -626,18 +626,18 @@ impl GpuManager::ver {
626626 initdata: * initdata,
627627 uat: * uat,
628628 io_mappings: Vec :: new( ) ,
629- rtkit <- new_mutex! ( None , "rtkit" ) ,
629+ rtkit <- Mutex :: new_named ( None , c_str! ( "rtkit" ) ) ,
630630 crashed: AtomicBool :: new( false ) ,
631631 event_manager,
632- alloc <- new_mutex! ( alloc, "alloc" ) ,
633- fwctl_channel <- new_mutex! ( fwctl_channel, "fwctl_channel" ) ,
634- rx_channels <- new_mutex! ( * rx_channels, "rx_channels" ) ,
635- tx_channels <- new_mutex! ( * tx_channels, "tx_channels" ) ,
632+ alloc <- Mutex :: new_named ( alloc, c_str! ( "alloc" ) ) ,
633+ fwctl_channel <- Mutex :: new_named ( fwctl_channel, c_str! ( "fwctl_channel" ) ) ,
634+ rx_channels <- Mutex :: new_named ( * rx_channels, c_str! ( "rx_channels" ) ) ,
635+ tx_channels <- Mutex :: new_named ( * tx_channels, c_str! ( "tx_channels" ) ) ,
636636 pipes,
637637 buffer_mgr: buffer:: BufferManager :: new( ) ?,
638638 ids: Default :: default ( ) ,
639- garbage_work <- new_mutex! ( Vec :: new( ) , "garbage_work" ) ,
640- garbage_contexts <- new_mutex! ( Vec :: new( ) , "garbage_contexts" ) ,
639+ garbage_work <- Mutex :: new_named ( Vec :: new( ) , c_str! ( "garbage_work" ) ) ,
640+ garbage_contexts <- Mutex :: new_named ( Vec :: new( ) , c_str! ( "garbage_contexts" ) ) ,
641641 } ) ) ?;
642642
643643 Ok ( x)
0 commit comments