bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH gnumach] Enable MACH_HOST and fix non-addressable bitfields


From: Samuel Thibault
Subject: Re: [PATCH gnumach] Enable MACH_HOST and fix non-addressable bitfields
Date: Sun, 11 Feb 2024 11:43:32 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Damien Zammit, le dim. 11 févr. 2024 07:09:48 +0000, a ecrit:
> ---
>  configfrag.ac |  2 +-
>  kern/task.h   | 10 +++++-----
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/configfrag.ac b/configfrag.ac
> index f9285c9d..d059c7b9 100644
> --- a/configfrag.ac
> +++ b/configfrag.ac
> @@ -71,7 +71,7 @@ AC_DEFINE([MACH_DEBUG], [1], [MACH_DEBUG])
>  AC_DEFINE([MACH_FIXPRI], [1], [MACH_FIXPRI])
>  
>  # Mach host (resource alloc.).
> -AC_DEFINE([MACH_HOST], [0], [MACH_HOST])
> +AC_DEFINE([MACH_HOST], [1], [MACH_HOST])

That's enabling a significant part of code. Better only enable it only
for NCPUS > 1

>  # IPC debugging calls.
>  AC_DEFINE([MACH_IPC_DEBUG], [1], [MACH_IPC_DEBUG])
> diff --git a/kern/task.h b/kern/task.h
> index dec3a530..27970620 100644
> --- a/kern/task.h
> +++ b/kern/task.h
> @@ -61,11 +61,11 @@ struct task {
>       decl_simple_lock_data(,lock)    /* Task's lock */
>       int             ref_count;      /* Number of references to me */
>  
> -     /* Flags */
> -     unsigned int    active:1,       /* Task has not been terminated */
> -     /* boolean_t */ may_assign:1,   /* can assigned pset be changed? */
> -                     assign_active:1,        /* waiting for may_assign */
> -                     essential:1;    /* Is this task essential for the 
> system? */
> +     /* Addressable flags */
> +     unsigned char   active;         /* Task has not been terminated */
> +     unsigned char   may_assign;     /* can assigned pset be changed? */
> +     unsigned char   assign_active;  /* waiting for may_assign */
> +     unsigned char   essential;      /* Is this task essential for the 
> system? */

AIUI only assign_active need to be adressable? Better make only that one
addressable.

Samuel

>  
>       /* Miscellaneous */
>       vm_map_t        map;            /* Address space description */
> -- 
> 2.43.0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]