haiku/src
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
..
add-ons Initialize the isochronous lock earlier. 2011-11-25 13:04:54 +01:00
apps Move Debugger's Array class to headers/shared 2011-11-25 06:18:52 +01:00
bin Use BStringList in package kit 2011-11-25 06:19:46 +01:00
build Fix build due to <directories.h> move 2011-11-25 06:19:50 +01:00
data Finally move the regular e version of the French Bepo keymap file to one with a decomposed 'latin small letter e followed by a combining acute accent'. 2011-11-04 09:06:26 +00:00
documentation
kits Add BPackageRoster::GetActivePackages() 2011-11-25 06:19:49 +01:00
libs Filtered flat import of Oliver's svn package management branch 2011-11-25 06:17:07 +01:00
preferences Filtered flat import of Oliver's svn package management branch 2011-11-25 06:17:07 +01:00
servers Fixed input server start fallback 2011-11-25 06:17:40 +01:00
system Fix virtual 8086 mode to properly account for TLS. 2011-11-25 16:10:19 +01:00
tests Filtered flat import of Oliver's svn package management branch 2011-11-25 06:17:07 +01:00
tools Add "package add" command. 2011-11-25 06:19:00 +01:00
Jamfile