[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Update mach_port_status_t definition to use the new struct
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] Update mach_port_status_t definition to use the new struct |
Date: |
Mon, 28 Nov 2022 02:16:48 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Applied, thanks!
Flavio Cruz, le dim. 27 nov. 2022 20:10:26 -0500, a ecrit:
> Also update C definition to use proper types.
> ---
> include/mach/mach_types.defs | 12 +++++++++++-
> include/mach/port.h | 14 +++++++-------
> 2 files changed, 18 insertions(+), 8 deletions(-)
>
> diff --git a/include/mach/mach_types.defs b/include/mach/mach_types.defs
> index f7106946..3ef9611e 100644
> --- a/include/mach/mach_types.defs
> +++ b/include/mach/mach_types.defs
> @@ -58,7 +58,17 @@ userprefix USERPREFIX;
> serverprefix SERVERPREFIX;
> #endif
>
> -type mach_port_status_t = struct[9] of integer_t;
> +type mach_port_status_t = struct {
> + mach_port_name_t mps_pset; /* containing port set */
> + mach_port_seqno_t mps_seqno; /* sequence number */
> + mach_port_mscount_t mps_mscount; /* make-send count */
> + mach_port_msgcount_t mps_qlimit; /* queue limit */
> + mach_port_msgcount_t mps_msgcount; /* number in the queue */
> + mach_port_rights_t mps_sorights; /* how many send-once rights */
> + boolean_t mps_srights; /* do send rights exist? */
> + boolean_t mps_pdrequest; /* port-deleted requested? */
> + boolean_t mps_nsrequest; /* no-senders requested? */
> +};
>
> type task_t = mach_port_t
> ctype: mach_port_t
> diff --git a/include/mach/port.h b/include/mach/port.h
> index d25eb0b4..caa6b713 100644
> --- a/include/mach/port.h
> +++ b/include/mach/port.h
> @@ -140,13 +140,13 @@ typedef unsigned int mach_port_rights_t; /*
> number of rights */
> typedef struct mach_port_status {
> mach_port_name_t mps_pset; /* containing port set */
> mach_port_seqno_t mps_seqno; /* sequence number */
> -/*mach_port_mscount_t*/natural_t mps_mscount; /* make-send count */
> -/*mach_port_msgcount_t*/natural_t mps_qlimit; /* queue limit */
> -/*mach_port_msgcount_t*/natural_t mps_msgcount; /* number in the queue
> */
> -/*mach_port_rights_t*/natural_t mps_sorights; /* how many send-once
> rights */
> -/*boolean_t*/natural_t mps_srights; /* do send rights
> exist? */
> -/*boolean_t*/natural_t mps_pdrequest; /* port-deleted
> requested? */
> -/*boolean_t*/natural_t mps_nsrequest; /* no-senders
> requested? */
> + mach_port_mscount_t mps_mscount; /* make-send count */
> + mach_port_msgcount_t mps_qlimit; /* queue limit */
> + mach_port_msgcount_t mps_msgcount; /* number in the queue */
> + mach_port_rights_t mps_sorights; /* how many send-once rights */
> + boolean_t mps_srights; /* do send rights exist? */
> + boolean_t mps_pdrequest; /* port-deleted requested? */
> + boolean_t mps_nsrequest; /* no-senders requested? */
> } mach_port_status_t;
>
> #define MACH_PORT_QLIMIT_DEFAULT ((mach_port_msgcount_t) 5)
> --
> 2.37.2
>
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.