[haiku-commits] Re: haiku: hrev52902 - in src: add-ons/kernel/busses/usb add-ons/kernel/bus_managers/usb system/kernel system/kernel/arch/x86

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 20 Feb 2019 15:15:59 +0100

Am 20.02.2019 um 03:42 schrieb waddlesplash:

58ed2965d036: kernel: Panic on attempts to block a pinned thread.
Preventing "normal" context switches caused by a time interrupt
   is the primary reason for pinning threads. "thread_block" and friends,
   however, cause an explicit context switch and will not return until
   another thread unblocks us.
Calling these while a thread is pinned is thus undefined behavior,
   and so we should just panic in the case anyone attempts to do so.
Not sure if I follow this logic. When I pin a thread to a specific CPU, all I want to achieve is to have it run only on that specific CPU.
Is there anything that implies that I don't want context switches to happen?

Bye,
   Axel.

Other related posts: