>       What gives?  Is anyone successfully changing periods on periodic
> tasks?  If so, how?

Easy. Read the source and do:

pthread_self()->period= new_period_in_ns;

You may also wish to modify pthread_self()->resume_time before entering
ptrhread_wait_np().

BTW: Feature request:
Functions which:
1. Change the period starting from THIS, not next wait (both ->period and
->resume_time have to be changed).

pthread_self()->resume_time = ...->resume_time - ...->period + new_period;
pthread_self()->period = new_period;

2. Delay the thread by given number of ns.

pthread_self()->resume_time = gethrtime() + t_ns;
pthread_wait_np();

3. Delay the thread by a given number of ns from the last scheduled wake-up

pthread_self()->resume_time = ...->resume_time - ...->period + delay;
pthread_wait_np();

4. Wait until specified time (easiest)

pthread_self()->resume_time = time_until;
pthread_wait_np();

Is any from above already implemented? Since these functions are simple, may
be they can be provided as simple macros?

--
Tomek

-- [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/

Reply via email to