summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2007-05-31 21:33:08 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2007-05-31 21:33:08 +0000
commit8858a5f5a9ca6a4723ce09309514ef9e9133c7cf (patch)
tree0390302d0d7b82151e58c21a0ce99406aaabfd83
parent7ca5e9cc58ada482095b6fcbc853f50f024b6cc5 (diff)
switch the flags argument to the front, requested by art
ok dlg
-rw-r--r--sys/kern/kern_workq.c8
-rw-r--r--sys/sys/workq.h9
2 files changed, 9 insertions, 8 deletions
diff --git a/sys/kern/kern_workq.c b/sys/kern/kern_workq.c
index e3435bb8fca..251010400f9 100644
--- a/sys/kern/kern_workq.c
+++ b/sys/kern/kern_workq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_workq.c,v 1.1 2007/05/31 18:16:59 dlg Exp $ */
+/* $OpenBSD: kern_workq.c,v 1.2 2007/05/31 21:33:07 tedu Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -28,7 +28,7 @@
struct workq_task {
int wqt_flags;
- void (*wqt_func)(void *, void *);
+ workq_fn wqt_func;
void *wqt_arg1;
void *wqt_arg2;
@@ -121,8 +121,8 @@ workq_destroy(struct workq *wq)
}
int
-workq_add_task(struct workq *wq, void (*func)(void *, void *),
- void *a1, void *a2, int flags)
+workq_add_task(struct workq *wq, int flags, workq_fn func,
+ void *a1, void *a2)
{
struct workq_task *wqt;
int wake = 1;
diff --git a/sys/sys/workq.h b/sys/sys/workq.h
index 0059b4a4c33..ec88afbc98b 100644
--- a/sys/sys/workq.h
+++ b/sys/sys/workq.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: workq.h,v 1.1 2007/05/31 18:16:59 dlg Exp $ */
+/* $OpenBSD: workq.h,v 1.2 2007/05/31 21:33:07 tedu Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -25,9 +25,10 @@ struct workq;
#define WQ_WAITOK (1<<0)
#define WQ_MPSAFE (1<<1)
-struct workq *workq_create(const char *, int);
-int workq_add_task(struct workq *, void (*func)(void *, void *),
- void *, void *, int);
+typedef void (*workq_fn)(void *, void *);
+struct workq *workq_create(const char * /* name */, int /* nthreads */);
+int workq_add_task(struct workq *, int /* flags */, workq_fn,
+ void *, void *);
void workq_destroy(struct workq *);
#endif /* _SYS_WORKQ_H_ */