haiku/headers/private/kernel/arch
Ingo Weinhold 4048494ce4 axeld + bonefish:
* Implemented automatic syscall restarts:
  - A syscall can indicate that it has been interrupted and can be
    restarted by setting a respective bit in thread::flags. It can
    store parameters it wants to be preserved for the restart in
    thread::syscall_restart::parameters. Another thread::flags bit
    indicates whether it has been restarted.
  - handle_signals() clears the restart flag, if the handled signal
    has a handler function installed and SA_RESTART is not set. Another
    thread flag (THREAD_FLAGS_DONT_RESTART_SYSCALL) can prevent syscalls
    from being restarted, even if they could be (not used yet, but we
    might want to use it in resume_thread(), so that we stay
    behaviorally compatible with BeOS).
  - The architecture specific syscall handler restarts the syscall, if
    the restart flag is set. Implemented for x86 only.
  - Added some support functions in the private <syscall_restart.h> to
    simplify the syscall restart code in the syscalls.
  - Adjusted all syscalls that can potentially be restarted accordingly.
  - _user_ioctl() sets new thread flag THREAD_FLAGS_IOCTL_SYSCALL while
    calling the underlying FS's/driver's hook, so that syscall restarts
    can also be supported there.
* thread_at_kernel_exit() invokes handle_signals() in a loop now, as
  long as the latter indicates that the thread shall be suspended, so
  that after waking up signals received in the meantime will be handled
  before the thread returns to userland. Adjusted handle_signals()
  accordingly -- when encountering a suspending signal we don't check
  for further signals.
* Fixed sigsuspend(): Suspending the thread and rescheduling doesn't
  result in the correct behavior. Instead we employ a temporary
  condition variable and interruptably wait on it. The POSIX test
  suite test passes, now.
* Made the switch_sem[_etc]() behavior on interruption consistent.
  Depending on when the signal arrived (before the call or when already
  waiting) the first semaphore would or wouldn't be released. Now we
  consistently release it.
* Refactored _user_{read,write}[v]() syscalls. Use a common function for
  either pair. The iovec version doesn't fail anymore, if anything could
  be read/written at all. It also checks whether a complete vector
  could be read/written, so that we won't skip data, if the underlying
  FS/driver couldn't read/write more ATM.
* Some refactoring in the x86 syscall handler: The int 99 and sysenter
  handlers use a common subroutine to avoid code duplication.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-17 15:48:30 +00:00
..
alpha It is accomplished ... 2002-07-09 12:24:59 +00:00
m68k * get rid of ppc stuff 2008-02-03 11:39:28 +00:00
ppc added a arch_commpage.h header for ppc, dunno if it needs to be changed 2008-01-19 15:43:45 +00:00
sh4 Merged changes from branch build_system_redesign at revision 14573. 2005-10-29 16:27:43 +00:00
sparc Removed execute property that was set accidently (since CVS days). 2005-03-18 01:50:45 +00:00
x86 axeld + bonefish: 2008-02-17 15:48:30 +00:00
cpu.h yet another fix for #1018, which has at this point blossomed into a reorg of how AP cpus are initialized. 2007-02-19 00:11:24 +00:00
debug_console.h * Added the opportunity to add temporary debug interrupt handlers for 2006-06-12 22:24:53 +00:00
debug.h Cleanup of the debug stuff, prepared for blue screen debugging. 2005-05-29 13:01:38 +00:00
elf.h Made C++ safe. 2006-01-11 14:36:43 +00:00
int.h Added [arch_]int_post_device_manager() which is invoked after 2006-02-07 02:50:32 +00:00
platform.h Implemented first basic APM driver. Only tested with QEMU so far, that's why 2006-01-28 18:11:20 +00:00
real_time_clock.h The real_time_data structure contains an architecture specific 2006-01-04 02:17:59 +00:00
smp.h Applied NewOS change 1914: moved APIC setup into the kernel due to a 2004-03-14 22:54:00 +00:00
system_info.h Added our first x86-only syscall for get_cpuid(). 2004-12-01 03:54:23 +00:00
thread_types.h Replaced arch/thread_struct.h with arch/thread_types.h, and renamed 2005-12-20 16:07:27 +00:00
thread.h axeld + bonefish: 2008-02-17 15:48:30 +00:00
timer.h Replaced timer.h with a cpp safe version. 2004-03-14 21:08:25 +00:00
user_debugger.h Merged branch haiku/branches/developer/bonefish/optimization revision 2008-01-11 00:36:44 +00:00
vm_translation_map.h - the arch_vm_translation_map.c exported functions now have the arch_ prefix 2004-10-19 23:19:10 +00:00
vm_types.h Preparation for MTRR support, code is completely untested, though. 2005-12-12 17:04:36 +00:00
vm.h * vm.h no longer includes vm_types.h - only those that actually need access 2007-09-27 12:21:33 +00:00