The simplest method is to disable interrupts while executing your code.  If
you're using SMP you'll need a spinlock, too.

That will mean your code execution real-time response of RTLinux, though.

} Does RTLinux provides any facilities to carry out a
} few operations atomically..        atomic.h in linux 
} provides of operations like add,increment and stuff..
} 
} --
}       Say, I have some code in RT thread 
}               my_thread()
}               {
}                       func1();
}                    /* Atomic begin */
}                       func2(); 
}                       func3(); 
}                    /* Atomic end  */ 
}                       func4(); 
}               }
} 
}       I would expect the facility to make sure 
}       func2(), func3() calls are complete or shouldn't
}       execute either of 'em.
} 
} Will rtl_no_interrupts(), rtl_restore_interrupts() help
} me in achieving this atomicity. But if a high priority
} thread is kicked will the scheduler schedule this high
} priority thread immediately ?
} 
} Any pointers/suggestions will be appreciated. 
} 
} Thanks
} - Sudhir
} 
} --
} Character is what you are in the Dark !!!! 
} _______________________________________________
} Rtl mailing list
} [EMAIL PROTECTED]
} http://www2.fsmlabs.com/mailman/listinfo.cgi/rtl
_______________________________________________
Rtl mailing list
[EMAIL PROTECTED]
http://www2.fsmlabs.com/mailman/listinfo.cgi/rtl

Reply via email to