Wed Jul 24 03:59:06 2013 UTC ()
Use a non-NULL value for bogus <linux/workqueue.h> stubs.


(riastradh)
diff -r1.1.2.6 -r1.1.2.7 src/sys/external/bsd/drm2/include/linux/workqueue.h

cvs diff -r1.1.2.6 -r1.1.2.7 src/sys/external/bsd/drm2/include/linux/Attic/workqueue.h (expand / switch to unified diff)

--- src/sys/external/bsd/drm2/include/linux/Attic/workqueue.h 2013/07/24 03:37:04 1.1.2.6
+++ src/sys/external/bsd/drm2/include/linux/Attic/workqueue.h 2013/07/24 03:59:06 1.1.2.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: workqueue.h,v 1.1.2.6 2013/07/24 03:37:04 riastradh Exp $ */ 1/* $NetBSD: workqueue.h,v 1.1.2.7 2013/07/24 03:59:06 riastradh Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2013 The NetBSD Foundation, Inc. 4 * Copyright (c) 2013 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Taylor R. Campbell. 8 * by Taylor R. Campbell.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -97,39 +97,42 @@ cancel_delayed_work_sync(struct delayed_ @@ -97,39 +97,42 @@ cancel_delayed_work_sync(struct delayed_
97{ 97{
98 cancel_work_sync(&dw->dw_work); 98 cancel_work_sync(&dw->dw_work);
99} 99}
100 100
101/* 101/*
102 * XXX Bogus stubs for Linux work queues. 102 * XXX Bogus stubs for Linux work queues.
103 */ 103 */
104 104
105struct workqueue_struct; 105struct workqueue_struct;
106 106
107static inline struct workqueue_struct * 107static inline struct workqueue_struct *
108alloc_ordered_workqueue(const char *name __unused, int flags __unused) 108alloc_ordered_workqueue(const char *name __unused, int flags __unused)
109{ 109{
110 return NULL; 110 return (void *)(uintptr_t)0xdeadbeef;
111} 111}
112 112
113static inline void 113static inline void
114destroy_workqueue(struct workqueue_struct *wq __unused) 114destroy_workqueue(struct workqueue_struct *wq __unused)
115{ 115{
 116 KASSERT(wq == (void *)(uintptr_t)0xdeadbeef);
116} 117}
117 118
118#define flush_workqueue(wq) WARN(true, "Can't flush workqueues!"); 119#define flush_workqueue(wq) WARN(true, "Can't flush workqueues!");
119#define flush_scheduled_work(wq) WARN(true, "Can't flush workqueues!"); 120#define flush_scheduled_work(wq) WARN(true, "Can't flush workqueues!");
120 121
121static inline void 122static inline void
122queue_work(struct workqueue_struct *wq __unused, struct work_struct *work) 123queue_work(struct workqueue_struct *wq __unused, struct work_struct *work)
123{ 124{
 125 KASSERT(wq == (void *)(uintptr_t)0xdeadbeef);
124 schedule_work(work); 126 schedule_work(work);
125} 127}
126 128
127static inline void 129static inline void
128queue_delayed_work(struct workqueue_struct *wq __unused, 130queue_delayed_work(struct workqueue_struct *wq __unused,
129 struct delayed_work *dw, 131 struct delayed_work *dw,
130 unsigned int ticks) 132 unsigned int ticks)
131{ 133{
 134 KASSERT(wq == (void *)(uintptr_t)0xdeadbeef);
132 schedule_delayed_work(dw, ticks); 135 schedule_delayed_work(dw, ticks);
133} 136}
134 137
135#endif /* _LINUX_WORKQUEUE_H_ */ 138#endif /* _LINUX_WORKQUEUE_H_ */