Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Dec 2020 12:46:04 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Cy Schubert <Cy.Schubert@cschubert.com>, freebsd-arch@freebsd.org
Subject:   Re: struct timex and Linux adjtimex()
Message-ID:  <X8jB7CYRtt8ukdd5@kib.kiev.ua>
In-Reply-To: <60612.1606991186@critter.freebsd.dk>
References:  <202012030523.0B35NsG7003810@slippy.cwsent.com> <X8i4UIzzH7vxkKvH@kib.kiev.ua> <60532.1606990671@critter.freebsd.dk> <X8i715mJUphnxXEo@kib.kiev.ua> <60612.1606991186@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 03, 2020 at 10:26:26AM +0000, Poul-Henning Kamp wrote:
> --------
> Konstantin Belousov writes:
> > On Thu, Dec 03, 2020 at 10:17:51AM +0000, Poul-Henning Kamp wrote:
> > > --------
> > > Konstantin Belousov writes:
> > > 
> > > > 1. Implement new syscall, which would take extended struct timex.
> > > >    ntp_adjtimex() perhaps should be kept for backward compatibility.
> > > >    [It does not matter where struct timeval is placed in the updated
> > > >    struct timex, see below].
> > > 
> > > That would break all ports with timekeeping software.
> > Why ?
> 
> Last I looked they all had "#ifdef FreeBSD use ntp_adjtim()", so if
> you rename it to ntp_adjtimex() you break them.
> 
> I see no problem having a #define to alias timex() to ntp_adjtime(),
> but I doubt it would make life easier for anybody.  (I think we used
> to have that and it got GC'ed.)
> 
> *If* we want to do this, the right way is to extend struct timex and
> let ntpadjtime(2) handle the new modes.

I do not propose to rename anything, the new syscall should be called
ntp_adjtime, as it is now. Current (old) syscall, that takes current
(non-extended) struct timex, would be kept versioned at FBSD_1.0.

New syscall should come at FBSD_1.6 version and take new structure,
still called struct timex.

All existing sources should start using new syscall by recompile.
If we provide ntp_adjtime@FBSD_1.0 AKA syscall slot 176, old binaries would
continue working, and doing this is very easy, so I do not see why not.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?X8jB7CYRtt8ukdd5>