disabling interrupts

Attilio Rao attilio at freebsd.org
Thu Nov 16 15:53:49 UTC 2006


2006/11/16, ranjith kumar <ranjith_kumar_b4u at yahoo.com>:
> Hi,
>
>      How to disable interrupts on Pentium 4(or any
> i386) machine?
>
> I tried to include "cli" instruction in kernel module.
> But got runtime errors.
>
> Thanks in advance.

Why you want this?
Anyway, you can't disable interrupts for long periods of time, since
interrupts are required for a lot of vital works (i.e. pagefaults). In
this optic, even the "syscall handler" (exception handler of the int
0x80) is implemented through a trap gate more than an interrupt gate.
And keep in mind that a lot of kernel routines working on IF, preserve
the caller's eflags state (so disabling them would have no results in
some cases).

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein


More information about the freebsd-ia32 mailing list