Module Name: src
Committed By: thorpej
Date: Wed Dec 26 21:43:39 UTC 2018
Modified Files:
src/sys/kern: kern_threadpool.c
src/sys/sys: threadpool.h
Log Message:
Adjust the definition of threadpool_job_fn_t to reflect Taylor's original
intent. (The original didn't compile, and I'm not a very good mind reader.)
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/kern/kern_threadpool.c
cvs rdiff -u -r1.4 -r1.5 src/sys/sys/threadpool.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_threadpool.c
diff -u src/sys/kern/kern_threadpool.c:1.9 src/sys/kern/kern_threadpool.c:1.10
--- src/sys/kern/kern_threadpool.c:1.9 Wed Dec 26 21:25:51 2018
+++ src/sys/kern/kern_threadpool.c Wed Dec 26 21:43:39 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_threadpool.c,v 1.9 2018/12/26 21:25:51 thorpej Exp $ */
+/* $NetBSD: kern_threadpool.c,v 1.10 2018/12/26 21:43:39 thorpej Exp $ */
/*-
* Copyright (c) 2014, 2018 The NetBSD Foundation, Inc.
@@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_threadpool.c,v 1.9 2018/12/26 21:25:51 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_threadpool.c,v 1.10 2018/12/26 21:43:39 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -140,7 +140,7 @@ static void threadpool_rele(struct threa
static int threadpool_percpu_create(struct threadpool_percpu **, pri_t);
static void threadpool_percpu_destroy(struct threadpool_percpu *);
-static void threadpool_job_dead(struct threadpool_job *);
+static threadpool_job_fn_t threadpool_job_dead;
static int threadpool_job_hold(struct threadpool_job *);
static void threadpool_job_rele(struct threadpool_job *);
Index: src/sys/sys/threadpool.h
diff -u src/sys/sys/threadpool.h:1.4 src/sys/sys/threadpool.h:1.5
--- src/sys/sys/threadpool.h:1.4 Wed Dec 26 21:36:50 2018
+++ src/sys/sys/threadpool.h Wed Dec 26 21:43:39 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: threadpool.h,v 1.4 2018/12/26 21:36:50 thorpej Exp $ */
+/* $NetBSD: threadpool.h,v 1.5 2018/12/26 21:43:39 thorpej Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@ struct threadpool_job;
struct threadpool_percpu;
struct threadpool_thread;
-typedef void (*threadpool_job_fn_t)(struct threadpool_job *);
+typedef void threadpool_job_fn_t(struct threadpool_job *);
struct threadpool_job {
kmutex_t *job_lock;
@@ -54,7 +54,7 @@ struct threadpool_job {
TAILQ_ENTRY(threadpool_job) job_entry;
volatile unsigned int job_refcnt;
kcondvar_t job_cv;
- threadpool_job_fn_t job_fn;
+ threadpool_job_fn_t *job_fn;
char job_name[MAXCOMLEN];
};