History log of /src/sys/compat/linuxkpi/common/include/linux/cleanup.h (Results 1 – 10 of 10)
Revision Date Author Comments
# 31393810 20-Jan-2026 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add scoped_guard(), spinlock guard support

The "cleanup.h" implementation got a bit more complicated.

For one we now use a macro to concatenate a prefix, the name, and a
suffix for variab

LinuxKPI: add scoped_guard(), spinlock guard support

The "cleanup.h" implementation got a bit more complicated.

For one we now use a macro to concatenate a prefix, the name, and a
suffix for variable and function declarations. This was triggered
by the fact that the "guard_" prefix we used was confusing. We now
use a generic "cleanup_" which is only encoded in the single place
rather than all over the file.

As already indicated by the comment the DEFINE_LOCK_GUARD_0()
macro got split up and a _1 version which also takes a type got
implemented and is used for a spinlock variant used by rtw89(4)
via the new scoped_guard() bits.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54808

show more ...


# 3f48a0fe 04-Sep-2025 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add DEFINE_LOCK_GUARD_0 for rcu

This adds guard support for non-real-types like rcu locking meaning
that we need to keep the lock state separately ourselves. _T is still
special and needs

LinuxKPI: add DEFINE_LOCK_GUARD_0 for rcu

This adds guard support for non-real-types like rcu locking meaning
that we need to keep the lock state separately ourselves. _T is still
special and needs to be updated. Given it may not be used it needs
an __unused attribute (we are using the LinuxKPI __maybe_unused which
indeed is more expressive in this case).

Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52076

show more ...


# 39e9290d 04-Sep-2025 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: cleanup: implement __free() and DEFINE_FREE(); use for kfree()

A wifi driver update needs this.

Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Di

LinuxKPI: cleanup: implement __free() and DEFINE_FREE(); use for kfree()

A wifi driver update needs this.

Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52075

show more ...


# fa81baa3 28-Sep-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add cleanup.h for guard DEFINE_GUARD/guard.

iwlwifi v6.11 started to use guard(). _T in the implementation needs
to be exposed to the driver which uses it in DEFINE_GUARD().

Given this i

LinuxKPI: add cleanup.h for guard DEFINE_GUARD/guard.

iwlwifi v6.11 started to use guard(). _T in the implementation needs
to be exposed to the driver which uses it in DEFINE_GUARD().

Given this is the first instance of attribute(cleanup) in the tree:
- gcc has support for it since at least 2003-06-04
(0bfa5f65bfb186f10d43304946fd7fcd69988732)
- llvm gained support on 2009-01-31
(d277d790e0f6f23043397ba919619b5c3e157ff3, llvm-svn 63462).

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D46843

show more ...


# 3f48a0fe 04-Sep-2025 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add DEFINE_LOCK_GUARD_0 for rcu

This adds guard support for non-real-types like rcu locking meaning
that we need to keep the lock state separately ourselves. _T is still
special and needs

LinuxKPI: add DEFINE_LOCK_GUARD_0 for rcu

This adds guard support for non-real-types like rcu locking meaning
that we need to keep the lock state separately ourselves. _T is still
special and needs to be updated. Given it may not be used it needs
an __unused attribute (we are using the LinuxKPI __maybe_unused which
indeed is more expressive in this case).

Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52076

show more ...


# 39e9290d 04-Sep-2025 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: cleanup: implement __free() and DEFINE_FREE(); use for kfree()

A wifi driver update needs this.

Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Di

LinuxKPI: cleanup: implement __free() and DEFINE_FREE(); use for kfree()

A wifi driver update needs this.

Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52075

show more ...


# fa81baa3 28-Sep-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add cleanup.h for guard DEFINE_GUARD/guard.

iwlwifi v6.11 started to use guard(). _T in the implementation needs
to be exposed to the driver which uses it in DEFINE_GUARD().

Given this i

LinuxKPI: add cleanup.h for guard DEFINE_GUARD/guard.

iwlwifi v6.11 started to use guard(). _T in the implementation needs
to be exposed to the driver which uses it in DEFINE_GUARD().

Given this is the first instance of attribute(cleanup) in the tree:
- gcc has support for it since at least 2003-06-04
(0bfa5f65bfb186f10d43304946fd7fcd69988732)
- llvm gained support on 2009-01-31
(d277d790e0f6f23043397ba919619b5c3e157ff3, llvm-svn 63462).

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D46843

show more ...


# 3f48a0fe 04-Sep-2025 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add DEFINE_LOCK_GUARD_0 for rcu

This adds guard support for non-real-types like rcu locking meaning
that we need to keep the lock state separately ourselves. _T is still
special and needs

LinuxKPI: add DEFINE_LOCK_GUARD_0 for rcu

This adds guard support for non-real-types like rcu locking meaning
that we need to keep the lock state separately ourselves. _T is still
special and needs to be updated. Given it may not be used it needs
an __unused attribute (we are using the LinuxKPI __maybe_unused which
indeed is more expressive in this case).

Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52076

show more ...


# 39e9290d 04-Sep-2025 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: cleanup: implement __free() and DEFINE_FREE(); use for kfree()

A wifi driver update needs this.

Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Di

LinuxKPI: cleanup: implement __free() and DEFINE_FREE(); use for kfree()

A wifi driver update needs this.

Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52075

show more ...


# fa81baa3 28-Sep-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: add cleanup.h for guard DEFINE_GUARD/guard.

iwlwifi v6.11 started to use guard(). _T in the implementation needs
to be exposed to the driver which uses it in DEFINE_GUARD().

Given this i

LinuxKPI: add cleanup.h for guard DEFINE_GUARD/guard.

iwlwifi v6.11 started to use guard(). _T in the implementation needs
to be exposed to the driver which uses it in DEFINE_GUARD().

Given this is the first instance of attribute(cleanup) in the tree:
- gcc has support for it since at least 2003-06-04
(0bfa5f65bfb186f10d43304946fd7fcd69988732)
- llvm gained support on 2009-01-31
(d277d790e0f6f23043397ba919619b5c3e157ff3, llvm-svn 63462).

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D46843

show more ...