File tree Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Original file line number Diff line number Diff line change 1- pub mod alloc;
21#[ path = "../unsupported/args.rs" ]
32pub mod args;
43pub mod env;
@@ -19,7 +18,6 @@ pub mod thread;
1918pub mod time;
2019
2120use crate :: arch:: global_asm;
22- use crate :: hash:: { DefaultHasher , Hasher } ;
2321use crate :: ptr:: { self , addr_of_mut} ;
2422use crate :: time:: { Duration , Instant } ;
2523
@@ -55,11 +53,6 @@ pub unsafe extern "C" fn _start() -> ! {
5553
5654 main ( ) ;
5755
58- unsafe {
59- crate :: sys:: thread_local:: destructors:: run ( ) ;
60- }
61- crate :: rt:: thread_cleanup ( ) ;
62-
6356 abort_internal ( )
6457}
6558
@@ -127,17 +120,3 @@ pub fn abort_internal() -> ! {
127120 crate :: hint:: spin_loop ( )
128121 }
129122}
130-
131- fn hash_time ( ) -> u64 {
132- let mut hasher = DefaultHasher :: new ( ) ;
133- // The closest we can get to a random number is the time since program start
134- let time = unsafe { vex_sdk:: vexSystemHighResTimeGet ( ) } ;
135- hasher. write_u64 ( time) ;
136- hasher. finish ( )
137- }
138-
139- pub fn hashmap_random_keys ( ) -> ( u64 , u64 ) {
140- let key1 = hash_time ( ) ;
141- let key2 = hash_time ( ) ;
142- ( key1, key2)
143- }
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ cfg_if::cfg_if! {
7373 } else if #[ cfg( any(
7474 all( target_family = "wasm" , target_os = "unknown" ) ,
7575 target_os = "xous" ,
76+ target_os = "vexos" ,
7677 ) ) ] {
7778 // FIXME: finally remove std support for wasm32-unknown-unknown
7879 // FIXME: add random data generation to xous
@@ -86,6 +87,7 @@ cfg_if::cfg_if! {
8687 target_os = "android" ,
8788 all( target_family = "wasm" , target_os = "unknown" ) ,
8889 target_os = "xous" ,
90+ target_os = "vexos" ,
8991) ) ) ]
9092pub fn hashmap_random_keys ( ) -> ( u64 , u64 ) {
9193 let mut buf = [ 0 ; 16 ] ;
You can’t perform that action at this time.
0 commit comments