ip stack mutual exclusion

Jennifer Averritt jennifer at usa.oarcorp.com
Wed Jan 19 22:19:00 UTC 2000


On Wed, 19 Jan 2000 Fermi at aol.com wrote:

> I am adding a security association database to the
> RTEMS IP-stack to support IPSEC.
>
> I would like to run RTEMS with a
> thread time slice, but a thread that is acessing the database when its 
time quantum expires might leave
> it in an unstable state.

Try:

rtems_task_mode( RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &pmode);
rtems_task_mode( RTEMS_PREEMPT, RTEMS_PREEMPT_MASK, &pmode);

To protect against an isr you can use:

rtems_interrupt_disable( level );
rtems_interrupt_enable( level );


Jennifer




More information about the users mailing list