[chrony-dev] [RFC PATCH v1 14/17] doc/chrony.conf: Add dynamic clock allocation option to the auxclockid directive

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


The auxclockid directive takes one of two options: 'set' or 'alloc'
- set: takes one argument that is the clock ID of an already allocated auxiliary clock
- alloc: takes no arguments, instruct chrony to, if possible, allocate a new auxiliary clock ID
         which is freed on exit
---
 conf.c               |  4 ++--
 conf.h               |  2 +-
 doc/chrony.conf.adoc | 16 +++++++++++++---
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/conf.c b/conf.c
index a1bedd0..5e99d98 100644
--- a/conf.c
+++ b/conf.c
@@ -3051,11 +3051,11 @@ alloc_auxclockid(int *clockid)
 /* ================================================== */
 
 void
-CNF_FreeAuxClockId(int clockid)
+CNF_FreeAuxClockId(void)
 {
   if (CNF_GetAuxClockDynamic()) {
 #ifdef LINUX
-    SYS_Linux_FreeAuxClock(clockid);
+    SYS_Linux_FreeAuxClock(auxclock_id);
 #endif
   }
 }
diff --git a/conf.h b/conf.h
index c5164c0..88621b9 100644
--- a/conf.h
+++ b/conf.h
@@ -185,7 +185,7 @@ extern int CNF_GetOffsetSanityCheck(void);
 #ifdef FEAT_AUXCLOCK
 extern const int *CNF_GetAuxClockId(void);
 extern int CNF_GetAuxClockDynamic(void);
-extern void CNF_FreeAuxClockId(int clockid);
+extern void CNF_FreeAuxClockId(void);
 #endif
 
 #endif /* GOT_CONF_H */
diff --git a/doc/chrony.conf.adoc b/doc/chrony.conf.adoc
index c50de6e..bc1d85c 100644
--- a/doc/chrony.conf.adoc
+++ b/doc/chrony.conf.adoc
@@ -1567,19 +1567,29 @@ Valid measurements with corresponding compensations are logged to the
 _tempcomp.log_ file if enabled by the <<log,*log tempcomp*>> directive.
 
 [[auxclockid]]
-*auxclockid* set <Clock ID>::
+*auxclockid* {alloc | set} [<Clock ID>]::
 The *auxclockid* directive is used to specify use of an auxiliary clock. Currently,
 this is only available using Linux. An auxiliary clock is implemented as a standard
 POSIX clock, but can be adjusted independently from the standard CLOCK_REALTIME.
 +
-The only currently supported option is 'set'. The argument to the 'set' option
-is the numerical clock ID of the already allocated auxiliary clock.
+Currently there are two supported options is 'set' and 'alloc'.
+The argument to the 'set' option is the numerical clock ID of an already allocated
+auxiliary clock.
+The 'alloc' option takes no arguments and directs Chrony to allocate an auxiliary 
+clock dynamically which is freed on exit.
 +
 An example of the _auxclockid_ directive to set the clock ID to 16:
 +
 ----
 auxclockid set 16
 ----
++
+The 'alloc' argument to the _auxclockid_ directive dynamically allocates a clock ID
+at startup and frees that clock ID on exit
++
+----
+auxclockid alloc
+----
 
 [[nooffsetsanitycheck]]
 *nooffsetsanitycheck* ::
-- 
2.34.1


-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/