Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Nov 2006 16:53:46 +0100
From:      "Attilio Rao" <attilio@freebsd.org>
To:        "ranjith kumar" <ranjith_kumar_b4u@yahoo.com>
Cc:        freebsd-ia32@freebsd.org
Subject:   Re: disabling interrupts
Message-ID:  <3bbf2fe10611160753q3303d81bw515bffe9af4ee0c9@mail.gmail.com>
In-Reply-To: <20061116112749.58242.qmail@web58409.mail.re3.yahoo.com>
References:  <20061116112749.58242.qmail@web58409.mail.re3.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2006/11/16, ranjith kumar <ranjith_kumar_b4u@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10611160753q3303d81bw515bffe9af4ee0c9>