History log of /haiku/src/libs/compat/freebsd_network/clock.c
Revision Date Author Comments
# 8548a4ad 12-May-2022 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Adaptations in preparation for the OpenBSD layer.

Most of these changes however add things that FreeBSD has (with a few
exceptions noted in comments) which the OpenBSD shim layer merely needs
to make use of.

(FreeBSD used to have support for IFF_NEEDSGIANT but removed it. The
support instated here is very similar to what FreeBSD used to have.)


# c70ec71d 05-Jul-2020 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Move ticks/seconds conversions to sys/time.h and
rename.

They now match the names they have in FreeBSD.
No functional change intended.


# dba28784 24-Dec-2018 Augustin Cavalier <waddlesplash@gmail.com>

freebsd11_network -> freebsd_network.

FreeBSD 12 has no major changes to the ifnet KPIs that constitute a
source compatibility break, save a single one related to locking
which doesn't really apply to us, and so we don't need to create
a "freebsd12_network" directory to work through the upgrades.


# 177f5fac 23-May-2018 Jérôme Duval <jerome.duval@gmail.com>

kernel drivers: have timer hooks return B_HANDLED_INTERRUPT.

* 0 means B_UNHANDLED_INTERRUPT.
* uses int32 as return type.


# e6e6f56c 21-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Include compat/sys/kernel.h rather than "kernel.h".

Using "kernel.h" was pulling in the private kernel.h header instead,
which was causing a build failure on my branch since arch_cpu.h is
C++-only there.


# 73fc635b 16-Jul-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Tick at 1000Hz not 1MHz.

Our FreeBSD networking code defined hz to 1MHz and 1 tick = 1 / hz,
but the clock code ticked 1 tick at 1000Hz.

This caused all calculations that are done on ticks, autonegotiation
and wlan scanning to be done very often as FreeBSD uses 1000 Hz
(100Hz for ARM). Defaults for autonegotiation is 5 and 17 ticks.

(Another interesting thing is that callouts are using 8% cpu...)


# df65e069 27-Oct-2009 Colin Günther <coling@gmx.de>

Coding style fix. Thx to axeld. No functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33793 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6c76785b 27-Oct-2009 Colin Günther <coling@gmx.de>

Using the add_timer() function as proposed by alexd. Thanks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33791 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2406849d 27-Oct-2009 Colin Günther <coling@gmx.de>

* Coding style fixes regarding whitespace usage.
* Copyright style fixes.
* Implemented FreeBSD hardclock subsystem, which is needed to update the ticks
variable. The previous usage of "#define ticks system_time()" wasn't
sufficient anymore, as there are drivers using the ticks name for local
scoped variables.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33785 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14627e08 22-Oct-2009 Colin Günther <coling@gmx.de>

* reordering of headerfile inclusion to comply to FreeBSD 8
ordering.
this makes porting driver (especially wifi ones) more
convinient
* based on FreeBSD svn revision 196691

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33739 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e6e6f56ccf702fe4bc09821b8064861a200122a8 21-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Include compat/sys/kernel.h rather than "kernel.h".

Using "kernel.h" was pulling in the private kernel.h header instead,
which was causing a build failure on my branch since arch_cpu.h is
C++-only there.


# 73fc635b3d87970ed7843eacd0ac7a5ffcac0e9b 16-Jul-2012 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Tick at 1000Hz not 1MHz.

Our FreeBSD networking code defined hz to 1MHz and 1 tick = 1 / hz,
but the clock code ticked 1 tick at 1000Hz.

This caused all calculations that are done on ticks, autonegotiation
and wlan scanning to be done very often as FreeBSD uses 1000 Hz
(100Hz for ARM). Defaults for autonegotiation is 5 and 17 ticks.

(Another interesting thing is that callouts are using 8% cpu...)


# df65e069cf225a5caec71764ec0935a4aadac3fa 27-Oct-2009 Colin Günther <coling@gmx.de>

Coding style fix. Thx to axeld. No functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33793 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6c76785bef595b1b4e15a13831d57005f0b274c7 27-Oct-2009 Colin Günther <coling@gmx.de>

Using the add_timer() function as proposed by alexd. Thanks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33791 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2406849d4a8bcb152bc992bc5c1c6ef51e783f4b 27-Oct-2009 Colin Günther <coling@gmx.de>

* Coding style fixes regarding whitespace usage.
* Copyright style fixes.
* Implemented FreeBSD hardclock subsystem, which is needed to update the ticks
variable. The previous usage of "#define ticks system_time()" wasn't
sufficient anymore, as there are drivers using the ticks name for local
scoped variables.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33785 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14627e087b920676d05d45cec5f28688744e1fdb 22-Oct-2009 Colin Günther <coling@gmx.de>

* reordering of headerfile inclusion to comply to FreeBSD 8
ordering.
this makes porting driver (especially wifi ones) more
convinient
* based on FreeBSD svn revision 196691

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33739 a95241bf-73f2-0310-859d-f6bbb57e9c96