aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/linux/refcount.h
Commit message (Collapse)AuthorAgeFilesLines
* linuxkpi: Include <linux/spinlock.h> from <linux/refcount.h>Jean-Sébastien Pédron2025-08-091-0/+1
| | | | | | | | | | | | | | The <linux/refcount.h> header uses the `spinlock_t` type and some consumers in the DRM drivers don't include <linux/spinlock.h> directly or indirectly. This led to compilation errors because the type was undefined. On Linux, <linux/refcount.h> includes <linux/spinlock_type.h> as a comparision. Reviewed by: emaste, manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50994
* linuxkpi: refcount: Use atomic_t directlyEmmanuel Vadot2024-05-161-15/+8
| | | | | | | | | | Simply use a typedef for refcount_t on atomic_t, this allow us to use a nativ type and also changing struct kref to directly use a refcount_t like Linux. Reviewed by: bz Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D45207
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* linuxkpi: Add refcount_dec_and_testEmmanuel Vadot2022-08-181-0/+11
| | | | | | | | | | In Linux this takes a refcount_t argument but in linuxkpi struct kref uses an atomic_t for the refcount and code in drm directly uses this function with a kref so use an atomic_t here. Reviewed by: bz Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D36099
* LinuxKPI: Constantly use _LINUXKPI_ prefix in include guardsVladimir Kondratyev2022-01-101-3/+3
| | | | | | MFC after: 1 week Reviewed by: bz, emaste, hselasky, manu Differential Revision: https://reviews.freebsd.org/D33562
* linuxkpi: Add refcount.hEmmanuel Vadot2020-05-251-0/+82
Implement some refcount functions needed by drm. Just use the atomic_t struct and functions from linuxkpi for simplicity. Sponsored-by: The FreeBSD Foundation Reviewed by: hselsasky Differential Revision: https://reviews.freebsd.org/D24985 Notes: svn path=/head/; revision=361450