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)  {}


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

alarm.c

Reply via email to