Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/common/linux Reorder fields to get better s...



details:   https://anonhg.NetBSD.org/src/rev/f1d3a207e76e
branches:  trunk
changeset: 993066:f1d3a207e76e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 15:05:30 2018 +0000

description:
Reorder fields to get better space savings than bit fields.

diffstat:

 sys/external/bsd/common/linux/linux_work.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (45 lines):

diff -r d08a216e7e35 -r f1d3a207e76e sys/external/bsd/common/linux/linux_work.c
--- a/sys/external/bsd/common/linux/linux_work.c        Mon Aug 27 15:05:16 2018 +0000
+++ b/sys/external/bsd/common/linux/linux_work.c        Mon Aug 27 15:05:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_work.c,v 1.36 2018/08/27 15:05:16 riastradh Exp $        */
+/*     $NetBSD: linux_work.c,v 1.37 2018/08/27 15:05:30 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.36 2018/08/27 15:05:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.37 2018/08/27 15:05:30 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/atomic.h>
@@ -52,10 +52,10 @@
        TAILQ_HEAD(, work_struct)       wq_queue;
        struct work_struct              *wq_current_work;
        int                             wq_flags;
-       struct lwp                      *wq_lwp;
+       bool                            wq_requeued;
+       bool                            wq_dying;
        uint64_t                        wq_gen;
-       bool                            wq_requeued:1;
-       bool                            wq_dying:1;
+       struct lwp                      *wq_lwp;
 };
 
 static void __dead     linux_workqueue_thread(void *);
@@ -166,10 +166,10 @@
        TAILQ_INIT(&wq->wq_queue);
        wq->wq_current_work = NULL;
        wq->wq_flags = 0;
-       wq->wq_lwp = NULL;
-       wq->wq_gen = 0;
        wq->wq_requeued = false;
        wq->wq_dying = false;
+       wq->wq_gen = 0;
+       wq->wq_lwp = NULL;
 
        error = kthread_create(PRI_NONE,
            KTHREAD_MPSAFE|KTHREAD_TS|KTHREAD_MUSTJOIN, NULL,



Home | Main Index | Thread Index | Old Index