Add multithreading to rust code.
This commit is contained in:
parent
19144f7be9
commit
d5a5041c4b
5 changed files with 76 additions and 6 deletions
|
|
@ -9,6 +9,7 @@ use mammoth::debug;
|
|||
use mammoth::define_entry;
|
||||
use mammoth::syscall::debug;
|
||||
use mammoth::syscall::z_err_t;
|
||||
use mammoth::thread;
|
||||
use yellowstone::GetEndpointRequest;
|
||||
use yellowstone::YellowstoneClient;
|
||||
|
||||
|
|
@ -41,5 +42,12 @@ pub extern "C" fn main() -> z_err_t {
|
|||
|
||||
debug!("Got endpoint w/ cap: {:#x}", endpoint.endpoint);
|
||||
|
||||
let e: thread::ThreadEntry = |_| {
|
||||
debug!("Testing 1 2 3");
|
||||
};
|
||||
let t = thread::Thread::spawn(&e, core::ptr::null());
|
||||
|
||||
t.join().expect("Failed to wait.");
|
||||
|
||||
0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue