David
the rtl_no_interrupts is on fact a macro or whatever.
here it is in rtl_sync.h
==================================
#define rtl_no_interrupts(s) \
__asm__ __volatile__("pushfl ; popl %0; cli":"=g" (s): /* no input */
:"memory")
#define rtl_restore_interrupts(s)\
__asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g"
(s):"memory")
#define rtl_stop_interrupts()\
__asm__ __volatile__("cli": /* no output,no input */ ::)
====================================
You gotta watch these tricky tricks...
regards,
Phil
>
> I don't have the man pages, but:
>
> > int rtl_task_init(...)
> > {
> > int *st;
> > long interrupt_state; /* never gets initialized */
> >
> > ... a bunch of stuff deleted ...
> > ---> rtl_no_interrupts(interrupt_state);
> > task->next = rt_tasks;
> > rt_tasks = task;
> > ---> rtl_restore_interrupts(interrupt_state);
> > return 0;
> >
> > }
>
> I can't image that it is right to pass garbage on the stack to
> rtl_no_interrupts() and rtl_restore_interrupts(). What is the
> interrupt_state set from? I'd think:
>
> long interrupt_state = rtl_no_interrupts();
> ... do critical section stuff ...
> rtl_restore_interrupts(interrupt_state);
>
> right?
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/