diff --git a/sys/kern_thread.pas b/sys/kern_thread.pas index c8043257..9c2f3554 100644 --- a/sys/kern_thread.pas +++ b/sys/kern_thread.pas @@ -170,7 +170,6 @@ function create_thread(td :p_kthread; //calling thread tls_base :Pointer; child_tid :PQWORD; parent_tid:PQWORD; - flags :Integer; rtp :p_rtprio; name :PChar ):Integer; @@ -459,7 +458,6 @@ function create_thread(td :p_kthread; //calling thread tls_base :Pointer; child_tid :PQWORD; parent_tid:PQWORD; - flags :Integer; rtp :p_rtprio; name :PChar ):Integer; @@ -603,11 +601,7 @@ begin end; end; - if ((flags and THR_SUSPENDED)=0) then - begin - NtResumeThread(newtd^.td_handle,nil); - end; - + NtResumeThread(newtd^.td_handle,nil); end; function kern_thr_new(td:p_kthread;param:p_thr_param):Integer; @@ -643,7 +637,6 @@ begin param^.tls_base, param^.child_tid, param^.parent_tid, - param^.flags, rtpp, @name); end; diff --git a/sys/test/project1.lpr b/sys/test/project1.lpr index 574d7cc4..b9c0fd2f 100644 --- a/sys/test/project1.lpr +++ b/sys/test/project1.lpr @@ -556,7 +556,6 @@ begin mem, @tid, nil, - 0, @prio, nil ); diff --git a/sys/ucontext.pas b/sys/ucontext.pas index 7c60b38e..ff48362d 100644 --- a/sys/ucontext.pas +++ b/sys/ucontext.pas @@ -66,6 +66,42 @@ type sc_spare:array[0..5] of QWORD; //6(qword) 12(int) end; + p_trapframe=^trapframe; + trapframe=packed record + tf_rdi:QWORD; + tf_rsi:QWORD; + tf_rdx:QWORD; + tf_rcx:QWORD; + tf_r8 :QWORD; + tf_r9 :QWORD; + tf_rax:QWORD; + tf_rbx:QWORD; + tf_rbp:QWORD; + tf_r10:QWORD; + tf_r11:QWORD; + tf_r12:QWORD; + tf_r13:QWORD; + tf_r14:QWORD; + tf_r15:QWORD; + + tf_trapno:Integer; + tf_fs:Word; + tf_gs:Word; + + tf_addr:QWORD; + + tf_flags:Integer; + tf_es:Word; + tf_ds:Word; + + tf_err :QWORD; //errno + tf_rip :QWORD; + tf_cs :QWORD; + tf_rflags:QWORD; //EFlags + tf_rsp :QWORD; + tf_ss :QWORD; + end; + p_mcontext_t=^mcontext_t; mcontext_t=packed record //0x480(1152) mc_onstack:QWORD; //sigstack state to restore =1 if (SS_ONSTACK)