File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
src/shims/native_lib/trace Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
use rustc_const_eval:: interpret:: InterpResult ;
2
2
3
+ static SUPERVISOR : std:: sync:: Mutex < ( ) > = std:: sync:: Mutex :: new ( ( ) ) ;
4
+
3
5
pub struct Supervisor ;
4
6
5
- static SUPERVISOR : std:: sync:: Mutex < Option < Supervisor > > = std:: sync:: Mutex :: new ( None ) ;
7
+ #[ derive( Debug ) ]
8
+ pub struct SvInitError ;
6
9
7
10
impl Supervisor {
8
11
#[ inline( always) ]
@@ -20,13 +23,10 @@ impl Supervisor {
20
23
}
21
24
}
22
25
26
+ #[ inline( always) ]
23
27
#[ allow( dead_code, clippy:: missing_safety_doc) ]
24
- pub unsafe fn init_sv ( ) -> Result < ( ) , !> {
25
- let mut sv_guard = SUPERVISOR . lock ( ) . unwrap ( ) ;
26
- if sv_guard. is_none ( ) {
27
- * sv_guard = Some ( Supervisor ) ;
28
- }
29
- Ok ( ( ) )
28
+ pub unsafe fn init_sv ( ) -> Result < !, SvInitError > {
29
+ Err ( SvInitError )
30
30
}
31
31
32
32
#[ inline( always) ]
You can’t perform that action at this time.
0 commit comments