File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ For fully static linking, there are two options:
7676
7777 - Build with ` RUSTFLAGS=-C target-feature=+crt-static ` and enable Origin's
7878 ` experimental-relocate ` feature. This allows PIE mode to work, however it
79- does so by enabling some experimental code in origin for performing
79+ does so by enabling some experimental code in Origin for performing
8080 relocations.
8181
8282[ basic example ] : https://github.com/sunfishcode/origin/blob/main/example-crates/basic/README.md
Original file line number Diff line number Diff line change @@ -142,8 +142,8 @@ pub(super) unsafe fn clone(
142142 flags : u32 ,
143143 child_stack : * mut c_void ,
144144 parent_tid : * mut RawPid ,
145- newtls : * mut c_void ,
146145 child_tid : * mut RawPid ,
146+ newtls : * mut c_void ,
147147 fn_ : * mut Box < dyn FnOnce ( ) -> Option < Box < dyn Any > > + Send > ,
148148) -> isize {
149149 let r0;
Original file line number Diff line number Diff line change @@ -142,8 +142,8 @@ pub(super) unsafe fn clone(
142142 flags : u32 ,
143143 child_stack : * mut c_void ,
144144 parent_tid : * mut RawPid ,
145- newtls : * mut c_void ,
146145 child_tid : * mut RawPid ,
146+ newtls : * mut c_void ,
147147 fn_ : * mut Box < dyn FnOnce ( ) -> Option < Box < dyn Any > > + Send > ,
148148) -> isize {
149149 let r0;
Original file line number Diff line number Diff line change @@ -142,8 +142,8 @@ pub(super) unsafe fn clone(
142142 flags : u32 ,
143143 child_stack : * mut c_void ,
144144 parent_tid : * mut RawPid ,
145- newtls : * mut c_void ,
146145 child_tid : * mut RawPid ,
146+ newtls : * mut c_void ,
147147 fn_ : * mut Box < dyn FnOnce ( ) -> Option < Box < dyn Any > > + Send > ,
148148) -> isize {
149149 let r0;
Original file line number Diff line number Diff line change @@ -147,8 +147,8 @@ pub(super) unsafe fn clone(
147147 flags : u32 ,
148148 child_stack : * mut c_void ,
149149 parent_tid : * mut RawPid ,
150- newtls : * mut c_void ,
151150 child_tid : * mut RawPid ,
151+ newtls : * mut c_void ,
152152 fn_ : * mut Box < dyn FnOnce ( ) -> Option < Box < dyn Any > > + Send > ,
153153) -> isize {
154154 let mut gs: u32 = 0 ;
Original file line number Diff line number Diff line change @@ -514,7 +514,6 @@ pub fn create_thread(
514514 | CloneFlags :: CHILD_SETTID
515515 | CloneFlags :: PARENT_SETTID ;
516516 let thread_id_ptr = ( * metadata) . thread . thread_id . as_ptr ( ) ;
517- #[ cfg( target_arch = "x86_64" ) ]
518517 let clone_res = clone (
519518 flags. bits ( ) ,
520519 stack. cast ( ) ,
@@ -523,20 +522,6 @@ pub fn create_thread(
523522 newtls. cast :: < u8 > ( ) . cast ( ) ,
524523 Box :: into_raw ( Box :: new ( fn_) ) ,
525524 ) ;
526- #[ cfg( any(
527- target_arch = "x86" ,
528- target_arch = "aarch64" ,
529- target_arch = "arm" ,
530- target_arch = "riscv64"
531- ) ) ]
532- let clone_res = clone (
533- flags. bits ( ) ,
534- stack. cast ( ) ,
535- thread_id_ptr,
536- newtls. cast :: < u8 > ( ) . cast ( ) ,
537- thread_id_ptr,
538- Box :: into_raw ( Box :: new ( fn_) ) ,
539- ) ;
540525 if clone_res >= 0 {
541526 #[ cfg( feature = "log" ) ]
542527 log:: trace!(
You can’t perform that action at this time.
0 commit comments