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/2436b2eb3c6c
branches:  trunk
changeset: 364835:2436b2eb3c6c
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 dde7490d2d99 -r 2436b2eb3c6c 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