haiku/headers/private/kernel
Michael Lotz 79f0056002 Fix virtual 8086 mode to properly account for TLS.
* The vm86 code or the code running in virtual 8086 mode may clobber the
  %fs register that we use for the CPU dependent thread local storage
  (TLS). Previously the vm86 code would simply restore %fs on exit, but
  this doesn't always work. If the thread got unscheduled while running
  in virtual 8086 mode and was then rescheduled on a different CPU, the
  vm86 exit code would restore the %fs register with the TLS value of
  the old CPU, causing anything using TLS in userland to crash later on.
  Instead we skip the %fs register restore on exit (as do the other
  interrupt return functions) and explicitly update the potentially
  clobbered %fs by calling x86_set_tls_context(). This will repopulate
  the %fs register with the TLS value for the right CPU. Fixes #8068.

* Made the static set_tls_context() into x86_set_tls_context() and made
  it available to others to faciliate the above.

* Sync the vm86 specific interrupt code with the changes from hrev23370,
  using the iframe pop macro to properly return. Previously what was
  pushed in int_bottom wasn't poped on return.

* Account for the time update macro resetting the in_kernel flag and
  reset it to 1, as we aren't actually returning to userland. This
  didn't cause any harm though as only the time tracking is using that
  flag so far.

* Some minor cleanup.
2011-11-25 16:10:19 +01:00
..
arch Fix virtual 8086 mode to properly account for TLS. 2011-11-25 16:10:19 +01:00
boot ARM: move kernel calling code to arch specific file 2011-11-21 01:22:32 +01:00
disk_device_manager * Added file_system_module_info::uninitialize() analogously to 2011-06-13 01:53:11 +00:00
fs Reverted the part of r31520 that made devfs_unpublish_partition() take a raw 2010-01-09 03:55:38 +00:00
platform * Rename of_region type template as per Axel 2011-07-26 16:42:14 +00:00
posix Merged the signals branch into trunk, with these changes: 2011-01-10 21:54:38 +00:00
slab Add new operator that takes an ObjectCache* and allocation flags and 2011-11-02 21:12:09 +00:00
util Remove TwoKeyAVLTree from kernel utils again 2011-11-25 06:19:23 +01:00
vm Add an assert to ensure the wired count doesn't wrap. 2011-11-13 22:02:36 +01:00
AllocationTracking.h Move AllocationTrackingInfo into a header. This way it can be re-used outside 2011-11-04 18:03:34 +00:00
block_cache.h Added block_cache_used_memory() that returns the memory allocated by all 2008-08-06 00:09:31 +00:00
boot_device.h * vfs_boot.cpp now also exports gReadOnlyBootDevice which is true when the 2009-06-05 15:52:58 +00:00
boot_item.h * Changed get_boot_item() API: it now also can retrieve the size of the boot 2008-03-30 11:01:41 +00:00
boot_splash.h * Added an explicit boot_splash_uninit(). Not really needed, but makes 2008-07-09 15:25:01 +00:00
commpage.h Split the commpage initialization into two parts. The second part is executed 2009-06-24 13:53:58 +00:00
condition_variable.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
console.h Made the header C++ safe. 2005-05-26 09:08:54 +00:00
cpu.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
debug_heap.h Replaced the temporary storage used in the kernel debug command parser. We now 2009-06-03 12:28:49 +00:00
debug_paranoia.h Fixed build for paranoia disabled globally, but enabled for individual 2008-04-29 18:42:31 +00:00
debug.h mmlr + bonefish: 2011-11-01 17:19:26 +00:00
debugger_keymaps.h * Let's keep the alphabetical order 2008-06-20 22:45:33 +00:00
DPC.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
elf_priv.h * elf_find_symbol(): Skip undefined symbols and symbols with the wrong binding. 2010-11-26 13:32:24 +00:00
elf.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
file_cache.h * Moved the VM headers into subdirectory vm/. 2009-12-02 18:05:10 +00:00
frame_buffer_console.h * If the VESA driver remaps the frame buffer on init, it will now also make 2010-01-01 14:54:41 +00:00
generic_syscall.h * Introduced new header directory headers/private/system which is supposed 2008-05-14 03:55:16 +00:00
heap.h Added a heap_init_post_area() which is called right after areas can be 2010-05-18 15:51:27 +00:00
int.h * Introduce {reserve|allocate|free}_io_interrupt_vectors() that can generically 2011-10-12 20:55:28 +00:00
kdevice_manager.h * Integration of the new driver architecture. 2008-05-26 16:52:27 +00:00
kdriver_settings.h * Initialize all static mutexes in the kernel through a MUTEX_INITIALIZER() 2008-06-05 23:19:27 +00:00
kernel_c++_structs.h Attempt at allowing to use C++ structures in C only code: We use the 2009-12-02 10:56:10 +00:00
kernel_daemon.h * Refactored the kernel daemon code into a class. 2008-08-22 01:13:18 +00:00
kernel.h * IS_KERNEL_ADDRESS(): Avoid the check against KERNEL_BASE or KERNEL_TOP, if 2011-01-03 17:56:04 +00:00
kimage.h Merged the signals branch into trunk, with these changes: 2011-01-10 21:54:38 +00:00
kmodule.h * Call module_init_post_boot_device() right after the boot volume has 2008-09-26 23:59:53 +00:00
kscheduler.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
ksignal.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
ksyscalls.h Also include info about the syscall return type in the 2008-02-07 16:03:00 +00:00
ksystem_info.h Switch haiku-revision from uint32 to string, as that's going to be required soon, no matter if we switch to Git or Mercurial 2011-05-08 20:02:42 +00:00
listeners.h Merged the signals branch into trunk, with these changes: 2011-01-10 21:54:38 +00:00
lock.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
low_resource_manager.h * The kernel's address space is now also a resource that is known to the low 2009-11-27 13:03:28 +00:00
messaging.h Added _user_unregister_messaging_service(). Fixed second send_message() proto. 2005-01-24 01:19:03 +00:00
MessagingServiceDefs.h Removed obsolete struct. 2005-01-30 01:11:33 +00:00
Notifications.h Replace uses of obsolescent BReference[able] API. 2010-12-16 14:29:37 +00:00
port.h Merged the signals branch into trunk, with these changes: 2011-01-10 21:54:38 +00:00
real_time_clock.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
safemode.h * Introduced new header directory headers/private/system which is supposed 2008-05-14 03:55:16 +00:00
scheduling_analysis.h Changed ConditionVariable from class to struct to make it more C-friendly. 2009-06-22 23:49:05 +00:00
sem.h Merged the signals branch into trunk, with these changes: 2011-01-10 21:54:38 +00:00
smp.h Added try_acquire_spinlock(). 2011-06-14 12:41:11 +00:00
syscall_restart.h Merged the signals branch into trunk, with these changes: 2011-01-10 21:54:38 +00:00
system_profiler.h * It seems we always have to specify all flags to make it work; removed "flags" 2009-07-21 12:09:15 +00:00
team.h * Added function team_init_exit_info_on_error() which initializes the team's 2011-06-14 13:04:31 +00:00
thread_types.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
thread.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
timer.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
tracing.h bonefish+mmlr: 2011-11-02 16:02:07 +00:00
user_atomic.h Some ppc fixes for #4115, patch by kallisti5 (without the #ifdef _BOOT_MODE): 2009-08-03 10:10:22 +00:00
user_debugger.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
user_mutex.h * Moved created subdirectory src/system/kernel/lock.cpp to new subdirectory 2010-04-11 16:07:39 +00:00
UserEvent.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
usergroup.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
UserTimer.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
vfs.h Add support for bind-mounting directories 2011-11-25 06:17:44 +01:00
wait_for_objects.h * Removed select_sync::lock. The only thread that was still locking was 2008-04-30 16:12:20 +00:00