Ivan Martinez wrote:
>
> Hello!
> I have some real time tasks/threads sharing some variables, so I would
> like to prevent them from being interrupted by other task when reading
> or writing them. How can I do that?. Do I get what I want with
> "rtl_no_iterrupts"?.
> Thank you!.
Hi Ivan,
I use the following wrappers:
#ifdef CONFIG_RTL
#include <asm/rtl_sync.h>
#undef cli()
#undef sti()
#undef save_flags(x)
#undef restore_flags(x)
#define sti()
#define cli()
#define save_flags(x) rtl_hard_savef_and_cli(x)
#define restore_flags(x) rtl_hard_restore_flags(x)
#else
.....
Then you can just use save_flags(flags) and restore_flags(flags) pairs.
It works on a uniprocessor, but there may well be a better way.
Regards, Stuart
-- [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/