rtems_irq_mngt_init() forgets to enable interrupt?

Rloase Flinne Rloase at myrealbox.com
Mon Apr 19 09:28:23 UTC 2004


----------------------- Original Message -----------------------
From:    Eric Valette <eric.valette at free.fr>
To:      Rloase Flinne <Rloase at myrealbox.com>
Cc:      rtems-users at rtems.com
Date:    Mon, 19 Apr 2004 11:12:38 +0200
Subject: Re: rtems_irq_mngt_init() forgets to enable interrupt?
----

> Rloase Flinne wrote:
> > Hi all
> > 	I found that the function rtems_irq_mngt_init() in
> > c/src/lib/libbsp/i386/shared/irq/irq_int.c seems forget to enable
> > interrupt after disabling it. 
> > 
> > 	There is only a _CPU_ISR_Disable(level); at about line 133 and no
> > _CPU_ISR_Enable(level) elsewhere in the rtems_irq_mngt_init(). Could
> > this be a bug?
> > 
> > 	The rtems_irq_mngt_init() is only called at initialization phase
> > where the isr has already been disabled so the lack of _CPU_ISR_Enable
> > seems to be innocuous but I think it's not proper.
> > 
> > 	Could anyone please give me a confirmation? Thanks.
> > 
> > PS.
> > 	The RTEMS version I've scaned is 4.6.0
> > 
> 
> The irq are unmasked when scheduling the initial thread as CPU IF is set 
> to enable...

	Well I think whether or not the IF is set depends on the attribute
of the initial thread and this has nothing to do with the interrupt masking
in the rtems_irq_mngt_init().

	And I think it could be a good programming practice to enable
interrpt( dispatch ) after disable interrupt( dispatch ).

> This is done on purpose...
> 
> -- 
>     __
>    /  `                   	Eric Valette
>   /--   __  o _.          	6 rue Paul Le Flem
> (___, / (_(_(__         	35740 Pace
> 
> Tel: +33 (0)2 99 85 26 76	Fax: +33 (0)2 99 85 26 76
> E-mail: eric.valette at free.fr
> 
> 
> 


--------------------- Original Message Ends --------------------



More information about the users mailing list