Re: synchronisation question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> For some esoteric feature that I'm trying to implement, I need to be able to
> modify the IDT from within a kernel module. 

I am assuming you know this is essentially a "hack" and should be done
for educational purposes only.

> Is a sti() / cli() enough to protect a critical section? Or should I use a
> synchronization primitive exposed by the kernel?

cli/sti() interfaces are now outdated as they disable the interrupts
on _all_ processors (unless you are using it in interrupt context,
where it'll disable interrupts on the local CPU).

./h
-- 
Operating Systems and Computer Architecture Research  - University of Cincinnati
http://www.ececs.uc.edu/~mohapth

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux