releasing the runq lock after loading page tables but before the actual
context switch can leave execution in an inconsistent if the current
process is descheduled from an IRQ between these two steps.
this patch holds the runq lock with IRQs disabled and makes the context
switch a single atomic operation.
- moved migration code into idle() process and updated schedule() to detect
when a thread has moved to another CPU in order to avoid doing housekeeping
on behalf of the original one
- start CPU head from core 0
- keeps track of nested interrupts
Introduction of VR_WRITE_COMBINED, PTATTR_WRITE_COMBINED and modification
to the memobj's get_page() interface so that Linux communicates back mapping
flags (such as write-combined).
- change its argument from 'struct process *'
to 'struct process_vm *'.
- change its name from 'page_fault_process()'
to 'page_fault_process_vm()'.
- allow to resolve a fault on the process_vm of another process.
support PTRACE_SETREGS.
In struct process, add 'unsigned long *ptrace_debugreg', instead of 'struct user *userp'.
debug registers are read/written from/to ptrace_debugreg, save/restore in schedule().
most general registers are proc->uctx.
fs_base is proc->thread.tlsblock_base.
gs_base,ds,es,fs,gs and orig_rax are uncompleted.
other members in 'struct user' are ignored, same as Linux implementation.
refs #257
refs #373
refs #263
to start with a SIGSTOP, do not set proc->ftn->status to PS_RUNNING in __runq_add_proc().
change vfork() set CLONE_VFORK.
refs #266
refs #267
refs #372
support PTRACE_GETEVENTMSG.
to store ptrace event, add 'unsigned long ptrace_eventmsg;' member in struct fork_tree_node.
refs #273
Parameters of dkprintf() should be evaluated even if dkprintf() is
disabled. Because this enables to find expression of parameter obsolete
and to avoid unnecessary compiler warnings such as "unused variable".
There is a problem which causes wait4(2) hang when wait4(2) called by a
process races with its child process termination.
This is a quick fix for this problem. See idle().
refs #271