Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Adjust the definition of threadpool_job_fn_t to reflect ...



details:   https://anonhg.NetBSD.org/src/rev/78537a1fed9c
branches:  trunk
changeset: 446963:78537a1fed9c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Dec 26 21:43:39 2018 +0000

description:
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.)

diffstat:

 sys/kern/kern_threadpool.c |  6 +++---
 sys/sys/threadpool.h       |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r f52488324c5c -r 78537a1fed9c sys/kern/kern_threadpool.c
--- a/sys/kern/kern_threadpool.c        Wed Dec 26 21:36:50 2018 +0000
+++ b/sys/kern/kern_threadpool.c        Wed Dec 26 21:43:39 2018 +0000
@@ -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 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 *);
diff -r f52488324c5c -r 78537a1fed9c sys/sys/threadpool.h
--- a/sys/sys/threadpool.h      Wed Dec 26 21:36:50 2018 +0000
+++ b/sys/sys/threadpool.h      Wed Dec 26 21:43:39 2018 +0000
@@ -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_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 @@
        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];
 };
 



Home | Main Index | Thread Index | Old Index