spin_lock on non-preemtive linux kernels

前端 未结 4 1195
忘掉有多难
忘掉有多难 2021-01-14 02:56

I read that on a system with 1 CPU and non preemtive linux kernel (2.6.x) a spin_lock call is equivalent to an empty call, and thus implemented that way.

I can\'t un

4条回答
  •  我在风中等你
    2021-01-14 03:16

    By definition, if you're using a non-preemptive kernel, you won't be preempted. If you do your own multitasking, that's not the kernel's problem; that's your problem. Interrupt handlers may still be executed, but they won't cause context switches.

提交回复
热议问题