Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/include/linux Little pseudo-f...
details: https://anonhg.NetBSD.org/src/rev/7564638ff8ad
branches: riastradh-drm2
changeset: 788025:7564638ff8ad
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 01:53:40 2013 +0000
description:
Little pseudo-fixes for untested bogus delayed_work implementation.
diffstat:
sys/external/bsd/drm2/include/linux/workqueue.h | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r 890f7ded8d83 -r 7564638ff8ad sys/external/bsd/drm2/include/linux/workqueue.h
--- a/sys/external/bsd/drm2/include/linux/workqueue.h Wed Jul 24 01:53:26 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/workqueue.h Wed Jul 24 01:53:40 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: workqueue.h,v 1.1.2.2 2013/07/24 01:52:24 riastradh Exp $ */
+/* $NetBSD: workqueue.h,v 1.1.2.3 2013/07/24 01:53:40 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,6 +36,12 @@
#include <linux/kernel.h>
+/*
+ * XXX This implementation is a load of bollocks -- callouts are
+ * expedient, but wrong, if for no reason other than that we never call
+ * callout_destroy.
+ */
+
struct work_struct {
struct callout ws_callout;
};
@@ -48,6 +54,8 @@
INIT_DELAYED_WORK(struct delayed_work *dw, void (*fn)(struct delayed_work *))
{
+ callout_init(&dw->dw_work.ws_callout, 0);
+
/* XXX This cast business is sketchy. */
callout_setfunc(&dw->dw_work.ws_callout, (void (*)(void *))fn,
&dw->dw_work);
@@ -69,7 +77,7 @@
static inline void
cancel_delayed_work_sync(struct delayed_work *dw)
{
- callout_stop(&dw->dw_work.ws_callout);
+ callout_halt(&dw->dw_work.ws_callout, NULL);
}
#endif /* _LINUX_WORKQUEUE_H_ */
Home |
Main Index |
Thread Index |
Old Index