Skip to contentSkip to conversation

Clarify pthread_make_periodic_np() usage

PATCH New Stelian Pop 1 participant 1 message Sep 29, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Clarify pthread_make_periodic_np() usage

Hi,

The attached patch makes the documentation of pthread_make_periodic_np() explicit about the rescheduling which takes place on invocation, until the start time has been reached.

I for one thought that pthread_make_periodic_np() would not sleep, and that pthread_wait_np() would do the wait instead when invoked for the first time...

Stelian.

skins/posix/thread.c +6 -2
Index: ksrc/skins/posix/thread.c
===================================================================
@@ -503,10 +503,12 @@
  *
  * This service is a non-portable extension of the POSIX interface.
  *
- * @param thread thread identifier;
+ * @param thread thread identifier. This thread is immediately delayed
+ * until the first periodic release point is reached.
  *
  * @param starttp start time, expressed as an absolute value of the
- * CLOCK_REALTIME clock;
+ * CLOCK_REALTIME clock. The affected thread will be delayed until
+ * this point is reached.
  *
  * @param periodtp period, expressed as a time interval.
  *
@@ -514,6 +516,8 @@
  * @return an error number if:
  * - ESRCH, @a thread is invalid;
  * - ETIMEDOUT, the start time has already passed.
+ *
+ * Rescheduling: always, until the @starttp start time has been reached.
  */
 int pthread_make_periodic_np(pthread_t thread,
 			     struct timespec *starttp,
Signature · 1 line
Stelian Pop <[email protected]>