ip stack mutual exclusion
joel.sherrill at OARcorp.com
Thu Jan 20 20:12:37 UTC 2000
Jennifer Averritt wrote:
> 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.
> 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 );
In general, this is correct. But in this case, the network stack is
already protected by a binary semaphore.
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users