On Tue, Mar 27, 2001 at 04:41:29PM -0500, Kenneth Jacker wrote:
> yodaiken> My suggestion is that you start with examples/misc/posix_mod.c
> yodaiken> as a base - the clock_nanosleep mechanism is, to me, better than
> yodaiken> the RTLinux native method.
>
> I wasn't exactly sure what Victor meant here, but I decided he was
> suggesting letting the "clock" thread do its delaying via nanosleep()
> instead of using pthread_make_periodic_np().
>
> I modified the program slightly to that end. The "clock" thread
> (priority 4) now "sleeps" for 1 ms (verified via gethrtime()) after
> being woken up by another controlling thread (priority 2). After
> awaking, it sets ALARM to 1.
>
> The main thread, in the meantime, is sitting at:
>
> while (!ALARM) {}
while(!ALARM){
clock_nanosleep( some long time);
if(!ALARM){ timed out}
else
>
>
> I ran everything ... and right, you guessed it ... the machine "locked
> up" hanging in the above 'while' statement.
>
> I must be doing something *really* stupid. Any ideas are *most* welcomed!
>
> -Kenneth
>
--
---------------------------------------------------------
Victor Yodaiken
Finite State Machine Labs: The RTLinux Company.
www.fsmlabs.com www.rtlinux.com
-- [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/