| [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
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: [chrony-dev] [RFC PATCH v1 14/17] doc/chrony.conf: Add dynamic clock allocation option to the auxclockid directive
- From: Christopher S M Hall <christopher.s.hall@xxxxxxxxx>
- Date: Sat, 6 Dec 2025 06:11:00 +0000
- Cc: christopher.s.hall@xxxxxxxxx, david.zage@xxxxxxxxx, yoong.siang.song@xxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1765002157; x=1796538157; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gxhM9rsazELlku3cwn/hunX99sZtV+D6TY1v0kQzSSM=; b=X8smIdhltmkqYuPlt5qR3iLKzvXwbFlWvGCwX7A8d/C4C90GIVPtcHNa 11D4cRDuk2Vcp1zttEDrPlTsZBfgxy06Bv1fux4vNWLrc/NGmC8/NIFy4 nu6CI3mNTPeX/yaLZvuXDu3OjKXxhFwNAoPNzYMP+yXcmp2SUnhYA0MEm qTue71TWT6mQeQe1BqZDL2YE7QTyGa1iW4cB6CwVIl7TJS7OZZtr9BIhI RE79J+ko1/lDE5xUp0h6Enm7ldIUFxF5PSyvAgVbz8I0cqYYU0pNlZ6qA eP1Epts/gcVgmCMEZhj67yLYgQTttB6HJfdKbdyRQ0febYljA52eZytBH Q==;
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.
- Messages sorted by: [ date | thread ]
- Prev by Date:
[chrony-dev] [RFC PATCH v1 15/17] util, main, logging: Add cleanup code for dynamically allocated auxiliary clocks
- Next by Date:
[chrony-dev] [RFC PATCH v1 17/17] client, cmdmon, doc/chrony.conf, doc/chronyc: Add chronyc command to query allocated clock ID
- Previous by thread:
[chrony-dev] [RFC PATCH v1 15/17] util, main, logging: Add cleanup code for dynamically allocated auxiliary clocks
- Next by thread:
[chrony-dev] [RFC PATCH v1 17/17] client, cmdmon, doc/chrony.conf, doc/chronyc: Add chronyc command to query allocated clock ID