summaryrefslogtreecommitdiff
path: root/sys/external/bsd/common/include/linux
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2021-12-19 11:03:17 +0000
committerriastradh <riastradh@NetBSD.org>2021-12-19 11:03:17 +0000
commitaff5180783a49bf1cccfb1ff4e8ee3497a966065 (patch)
tree90a5bf649f89ea20ad5752c61fbeb01f3c7e25fd /sys/external/bsd/common/include/linux
parent21a09503d2d38565db764c55be9d09a8909d6146 (diff)
Rework linux_tasklet.c a little.
Provide some more hacks for i915's grubby paws.
Diffstat (limited to 'sys/external/bsd/common/include/linux')
-rw-r--r--sys/external/bsd/common/include/linux/tasklet.h31
1 files changed, 22 insertions, 9 deletions
diff --git a/sys/external/bsd/common/include/linux/tasklet.h b/sys/external/bsd/common/include/linux/tasklet.h
index 4679b371517..0bbb18a42f9 100644
--- a/sys/external/bsd/common/include/linux/tasklet.h
+++ b/sys/external/bsd/common/include/linux/tasklet.h
@@ -1,7 +1,7 @@
-/* $NetBSD: tasklet.h,v 1.4 2021/12/19 01:17:46 riastradh Exp $ */
+/* $NetBSD: tasklet.h,v 1.5 2021/12/19 11:03:17 riastradh Exp $ */
/*-
- * Copyright (c) 2018 The NetBSD Foundation, Inc.
+ * Copyright (c) 2018, 2020 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -33,16 +33,22 @@
#define _LINUX_TASKLET_H_
/* namespace */
+#define __tasklet_disable_sync_once linux___tasklet_disable_sync_once
+#define __tasklet_enable linux___tasklet_enable
+#define __tasklet_enable_sync_once linux___tasklet_enable_sync_once
+#define __tasklet_is_enabled linux___tasklet_is_enabled
+#define __tasklet_is_scheduled linux___tasklet_is_scheduled
#define tasklet_disable linux_tasklet_disable
-#define tasklet_disable_sync_once linux_tasklet_disable_sync_once
#define tasklet_enable linux_tasklet_enable
-#define tasklet_enable_sync_once linux_tasklet_enable_sync_once
#define tasklet_hi_schedule linux_tasklet_hi_schedule
#define tasklet_init linux_tasklet_init
-#define tasklet_is_enabled linux_tasklet_is_enabled
+#define tasklet_is_locked linux_tasklet_is_locked
#define tasklet_kill linux_tasklet_kill
#define tasklet_schedule linux_tasklet_schedule
#define tasklet_struct linux_tasklet_struct
+#define tasklet_trylock linux_tasklet_trylock
+#define tasklet_unlock linux_tasklet_unlock
+#define tasklet_unlock_wait linux_tasklet_unlock_wait
struct tasklet_struct {
SIMPLEQ_ENTRY(tasklet_struct) tl_entry;
@@ -81,9 +87,16 @@ void tasklet_schedule(struct tasklet_struct *);
void tasklet_hi_schedule(struct tasklet_struct *);
void tasklet_kill(struct tasklet_struct *);
-/* i915drmkms hack */
-void tasklet_disable_sync_once(struct tasklet_struct *);
-void tasklet_enable_sync_once(struct tasklet_struct *);
-bool tasklet_is_enabled(const struct tasklet_struct *);
+bool tasklet_is_locked(const struct tasklet_struct *);
+bool tasklet_trylock(struct tasklet_struct *);
+void tasklet_unlock(struct tasklet_struct *);
+void tasklet_unlock_wait(const struct tasklet_struct *);
+
+/* i915 hacks */
+void __tasklet_disable_sync_once(struct tasklet_struct *);
+void __tasklet_enable_sync_once(struct tasklet_struct *);
+bool __tasklet_is_enabled(const struct tasklet_struct *);
+bool __tasklet_is_scheduled(const struct tasklet_struct *);
+bool __tasklet_enable(struct tasklet_struct *);
#endif /* _LINUX_TASKLET_H_ */