History log of /haiku/src/libs/compat/freebsd_network/compat/sys/condvar.h
Revision Date Author Comments
# 869de36d 09-Oct-2023 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Remove the need for <kernel_c++_structs.h>.

Use sizeof()+roundup() to build a char[] of the correct size,
and add a static_assert to ensure it stays so.

The <kernel_c++_structs.h> header needs to have its dependency
manually declared, and not all consumers of this file properly
declared it as such. This then fixes a concurrent build problem.

Fixes #17965 as this was the only consumer of this header.


# 1960df31 03-Feb-2022 Augustin Cavalier <waddlesplash@gmail.com>

freebsd_network: Add some missing __BEGIN_DECLS/__END_DECLS.


# 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.


# a22b78e6 04-Dec-2009 Colin Günther <coling@gmx.de>

Making use of the C++ structures in C only code feature introduced with
r34441. This allows to completely stick to FreeBSD's conditional cv_* function
semantics as 'struct cv' variables are freed automatically now.
This also gets rid of the dynamically de-/allocating of ConditionalVariables.
Thank you Ingo for helping me through this.


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


# c9986738 03-Dec-2009 Colin Günther <coling@gmx.de>

Refactoring condition variable subsystem of FreeBSD compat layer. Basically it
separates the usage of published and unpublished ConditionalVariables into
different functions.
This allows to stick to the semantics of FreeBSD's condition variable subsystem
where it isn't needed to call cv_destroy. With the refactoring now there aren't
orphaned published ConditionalVariable left over, when shutting down the compat
layer.
Though, allocated unpublished struct cv's aren't cleaned up yet. This will be
addressed in a next commit.


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


# a49ed9ad 02-Dec-2009 Colin Günther <coling@gmx.de>

* Refactoring the condition variable and synchronization subsystem of the
freebsd compat layer.
* Renaming functions where their names aren't preset by FreeBSD to stick
to the coding style guidelines.
* Making use of static Notify functions of Haiku's ConditionalVariable
implementation.
* Removing management of used ConditionalVariables within the compat layer.
This should also fix #5072.


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


# 56c28b45 01-Dec-2009 Colin Günther <coling@gmx.de>

* Getting rid of the necessity for cleaning up initialized ConditionalVariables
in uninit_condition_variables(). This method and its counterpart
init_condition_variables() will be removed, once the need for the
sConditionVariableHash will be eliminated.
* Now every initialized ConditionalVariable gets removed right after it is no
longer needed. Ingo what do you think?
* This behaviour matches with the FreeBSD way, where a conditional variable
gets assigned to a sleepqueue only when needed, and is removed from that
sleepqueue the moment the condition is met.


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


# cb89b085 30-Nov-2009 Colin Günther <coling@gmx.de>

* Completing the condition variable subsystem. Thanks to ingo for the heads
up.
* Removed the cv_waiters structure member as it is nowhere used in the network
subsytem by FreeBSD either.
* Removing the sleepqueue dummy functions completely, as Haiku's condition
variable subsystem is well suited for this purpose.
* This fixes the build, too, as it introduces the new implementation of pause
and _pause.
* Implementing the msleep and wakeup functions based on the condition variable
implementation.


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


# d0805bf4 30-Nov-2009 Colin Günther <coling@gmx.de>

* Basically reimplemented the conditional variable support, so that it is now
easier to a) cleanup on driver unloading and b) to implement the msleep
and wakeup functions. This is facilitated by keeping track of used
conditional variables in a hash table. Also this table can be used to get
the conditional variable belonging to a hash, which isn't supported by
Haiku's conditional variable support at the moment.
All network drivers are compiling and linking but it needs to be tested,
whether executing rises any issues.
* Minor coding style cleanup in condvar.h regarding intersection spacing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34375 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


# a22b78e6932d2ebbf4fb725568eb4d46b9d8a21f 04-Dec-2009 Colin Günther <coling@gmx.de>

Making use of the C++ structures in C only code feature introduced with
r34441. This allows to completely stick to FreeBSD's conditional cv_* function
semantics as 'struct cv' variables are freed automatically now.
This also gets rid of the dynamically de-/allocating of ConditionalVariables.
Thank you Ingo for helping me through this.


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


# c9986738a34f1fc1607734a34d41ad9930e9c86f 03-Dec-2009 Colin Günther <coling@gmx.de>

Refactoring condition variable subsystem of FreeBSD compat layer. Basically it
separates the usage of published and unpublished ConditionalVariables into
different functions.
This allows to stick to the semantics of FreeBSD's condition variable subsystem
where it isn't needed to call cv_destroy. With the refactoring now there aren't
orphaned published ConditionalVariable left over, when shutting down the compat
layer.
Though, allocated unpublished struct cv's aren't cleaned up yet. This will be
addressed in a next commit.


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


# a49ed9ad76c88ad2eb250fae1482750c2a32281b 02-Dec-2009 Colin Günther <coling@gmx.de>

* Refactoring the condition variable and synchronization subsystem of the
freebsd compat layer.
* Renaming functions where their names aren't preset by FreeBSD to stick
to the coding style guidelines.
* Making use of static Notify functions of Haiku's ConditionalVariable
implementation.
* Removing management of used ConditionalVariables within the compat layer.
This should also fix #5072.


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


# 56c28b450fcb0f8241451ac24b851746d5874a5f 01-Dec-2009 Colin Günther <coling@gmx.de>

* Getting rid of the necessity for cleaning up initialized ConditionalVariables
in uninit_condition_variables(). This method and its counterpart
init_condition_variables() will be removed, once the need for the
sConditionVariableHash will be eliminated.
* Now every initialized ConditionalVariable gets removed right after it is no
longer needed. Ingo what do you think?
* This behaviour matches with the FreeBSD way, where a conditional variable
gets assigned to a sleepqueue only when needed, and is removed from that
sleepqueue the moment the condition is met.


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


# cb89b085e32373e2b5cec80f8ea596a5524c34ea 30-Nov-2009 Colin Günther <coling@gmx.de>

* Completing the condition variable subsystem. Thanks to ingo for the heads
up.
* Removed the cv_waiters structure member as it is nowhere used in the network
subsytem by FreeBSD either.
* Removing the sleepqueue dummy functions completely, as Haiku's condition
variable subsystem is well suited for this purpose.
* This fixes the build, too, as it introduces the new implementation of pause
and _pause.
* Implementing the msleep and wakeup functions based on the condition variable
implementation.


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


# d0805bf47eff05d78cd40127bc7d1d6f04e99b82 30-Nov-2009 Colin Günther <coling@gmx.de>

* Basically reimplemented the conditional variable support, so that it is now
easier to a) cleanup on driver unloading and b) to implement the msleep
and wakeup functions. This is facilitated by keeping track of used
conditional variables in a hash table. Also this table can be used to get
the conditional variable belonging to a hash, which isn't supported by
Haiku's conditional variable support at the moment.
All network drivers are compiling and linking but it needs to be tested,
whether executing rises any issues.
* Minor coding style cleanup in condvar.h regarding intersection spacing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34375 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