We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 072b940 commit 9ef0e37Copy full SHA for 9ef0e37
src/libstd/sys/unix/freertos/thread.rs
@@ -31,6 +31,7 @@ impl Thread {
31
pub unsafe fn new(name: Option<&CStr>, stack: usize, p: Box<dyn FnOnce()>)
32
-> io::Result<Thread> {
33
let join_mutex = Arc::new(Mutex::new());
34
+ join_mutex.lock();
35
let state = Arc::new(AtomicUsize::new(RUNNING));
36
37
let arg = box (join_mutex.clone(), state.clone(), box p);
@@ -39,7 +40,6 @@ impl Thread {
39
40
41
let mut thread = Thread { id: ptr::null_mut(), join_mutex, state };
42
- join_mutex.lock();
43
44
let res = xTaskCreate(
45
thread_start,
0 commit comments