bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH hurd] Use uintptr_t for message payloads.


From: Samuel Thibault
Subject: Re: [PATCH hurd] Use uintptr_t for message payloads.
Date: Tue, 2 May 2023 07:47:28 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks!

Flavio Cruz, le mar. 02 mai 2023 00:11:22 -0400, a ecrit:
> A follow up to 92fad38a043b75ed6b435b3efa574ede91dbe9ee in gnumach.
> ---
>  auth/mig-decls.h            |  2 +-
>  eth-multiplexer/mig-decls.h |  2 +-
>  exec/mig-decls.h            |  2 +-
>  libcons/priv.h              |  2 +-
>  libdiskfs/diskfs.h          | 12 ++++++------
>  libmachdev/mig-decls.h      |  2 +-
>  libnetfs/priv.h             |  4 ++--
>  libpager/mig-decls.h        |  2 +-
>  libports/mig-decls.h        |  2 +-
>  libports/ports.h            |  8 ++++----
>  libtrivfs/mig-decls.h       |  4 ++--
>  lwip/mig-decls.h            |  4 ++--
>  mach-defpager/mig-decls.h   |  2 +-
>  pfinet/mig-decls.h          |  4 ++--
>  pflocal/mig-decls.h         |  4 ++--
>  proc/mig-decls.h            |  4 ++--
>  term/mig-decls.h            |  2 +-
>  17 files changed, 31 insertions(+), 31 deletions(-)
> 
> diff --git a/auth/mig-decls.h b/auth/mig-decls.h
> index fa7b06d3..dab4a1fb 100644
> --- a/auth/mig-decls.h
> +++ b/auth/mig-decls.h
> @@ -33,7 +33,7 @@ auth_port_to_handle (mach_port_t auth)
>  }
>  
>  static inline struct authhandle * __attribute__ ((unused))
> -auth_payload_to_handle (unsigned long payload)
> +auth_payload_to_handle (uintptr_t payload)
>  {
>    return ports_lookup_payload (auth_bucket, payload, authhandle_portclass);
>  }
> diff --git a/eth-multiplexer/mig-decls.h b/eth-multiplexer/mig-decls.h
> index 6ad9ebf9..6cb76930 100644
> --- a/eth-multiplexer/mig-decls.h
> +++ b/eth-multiplexer/mig-decls.h
> @@ -36,7 +36,7 @@ begin_using_device_port (mach_port_t port)
>  }
>  
>  static inline struct vether_device * __attribute__ ((unused))
> -begin_using_device_payload (unsigned long payload)
> +begin_using_device_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (port_bucket, payload, vdev_portclass);
>  }
> diff --git a/exec/mig-decls.h b/exec/mig-decls.h
> index cf3e17da..94adfc9c 100644
> --- a/exec/mig-decls.h
> +++ b/exec/mig-decls.h
> @@ -31,7 +31,7 @@ begin_using_bootinfo_port (mach_port_t port)
>  }
>  
>  static inline struct bootinfo * __attribute__ ((unused))
> -begin_using_bootinfo_payload (unsigned long payload)
> +begin_using_bootinfo_payload (uintptr_t payload)
>  {
>      return ports_lookup_payload (port_bucket, payload, execboot_portclass);
>  }
> diff --git a/libcons/priv.h b/libcons/priv.h
> index 6cdf3dbc..2fb9b26d 100644
> --- a/libcons/priv.h
> +++ b/libcons/priv.h
> @@ -81,7 +81,7 @@ begin_using_notify_port (fs_notify_t port)
>  }
>  
>  static inline cons_notify_t
> -begin_using_notify_payload (unsigned long payload)
> +begin_using_notify_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (cons_port_bucket, payload, cons_port_class);
>  }
> diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
> index be4061b4..91b868bb 100644
> --- a/libdiskfs/diskfs.h
> +++ b/libdiskfs/diskfs.h
> @@ -889,13 +889,13 @@ void diskfs_finish_protid (struct protid *cred, struct 
> iouser *user);
>  
>  extern struct protid * diskfs_begin_using_protid_port (file_t port);
>  extern struct protid *
> -diskfs_begin_using_protid_payload (unsigned long payload);
> +diskfs_begin_using_protid_payload (uintptr_t payload);
>  extern struct diskfs_control * diskfs_begin_using_control_port (fsys_t port);
>  extern struct diskfs_control *
> -diskfs_begin_using_control_port_payload (unsigned long payload);
> +diskfs_begin_using_control_port_payload (uintptr_t payload);
>  extern struct bootinfo *diskfs_begin_using_bootinfo_port (exec_startup_t 
> port);
>  struct bootinfo *
> -diskfs_begin_using_bootinfo_payload (unsigned long payload);
> +diskfs_begin_using_bootinfo_payload (uintptr_t payload);
>  
>  extern void diskfs_end_using_protid_port (struct protid *cred);
>  extern void diskfs_end_using_control_port (struct diskfs_control *cred);
> @@ -913,7 +913,7 @@ diskfs_begin_using_protid_port (file_t port)
>  }
>  
>  DISKFS_EXTERN_INLINE struct protid *
> -diskfs_begin_using_protid_payload (unsigned long payload)
> +diskfs_begin_using_protid_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (diskfs_port_bucket,
>                              payload,
> @@ -928,7 +928,7 @@ diskfs_begin_using_control_port (fsys_t port)
>  }
>  
>  DISKFS_EXTERN_INLINE struct diskfs_control *
> -diskfs_begin_using_control_port_payload (unsigned long payload)
> +diskfs_begin_using_control_port_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (diskfs_port_bucket,
>                              payload,
> @@ -943,7 +943,7 @@ diskfs_begin_using_bootinfo_port (exec_startup_t port)
>  }
>  
>  DISKFS_EXTERN_INLINE struct bootinfo *
> -diskfs_begin_using_bootinfo_payload (unsigned long payload)
> +diskfs_begin_using_bootinfo_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (diskfs_port_bucket,
>                              payload,
> diff --git a/libmachdev/mig-decls.h b/libmachdev/mig-decls.h
> index 62eaac80..91db36b5 100644
> --- a/libmachdev/mig-decls.h
> +++ b/libmachdev/mig-decls.h
> @@ -36,7 +36,7 @@ begin_using_device_port (mach_port_t port)
>  }
>  
>  static inline struct mach_device * __attribute__ ((unused))
> -begin_using_device_payload (unsigned long payload)
> +begin_using_device_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (machdev_device_bucket, payload, 
> machdev_device_class);
>  }
> diff --git a/libnetfs/priv.h b/libnetfs/priv.h
> index 48bf67a8..2be2c436 100644
> --- a/libnetfs/priv.h
> +++ b/libnetfs/priv.h
> @@ -34,7 +34,7 @@ begin_using_protid_port (file_t port)
>  }
>  
>  static inline struct protid * __attribute__ ((unused))
> -begin_using_protid_payload (unsigned long payload)
> +begin_using_protid_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (netfs_port_bucket, payload, 
> netfs_protid_class);
>  }
> @@ -53,7 +53,7 @@ begin_using_control_port (fsys_t port)
>  }
>  
>  static inline struct netfs_control * __attribute__ ((unused))
> -begin_using_control_payload (unsigned long payload)
> +begin_using_control_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (netfs_port_bucket, payload, 
> netfs_control_class);
>  }
> diff --git a/libpager/mig-decls.h b/libpager/mig-decls.h
> index 7e6b64ff..8126f0bb 100644
> --- a/libpager/mig-decls.h
> +++ b/libpager/mig-decls.h
> @@ -33,7 +33,7 @@ begin_using_pager (mach_port_t port)
>  }
>  
>  static inline struct pager * __attribute__ ((unused))
> -begin_using_pager_payload (unsigned long payload)
> +begin_using_pager_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (0, payload, _pager_class);
>  }
> diff --git a/libports/mig-decls.h b/libports/mig-decls.h
> index c88ff261..4316e07c 100644
> --- a/libports/mig-decls.h
> +++ b/libports/mig-decls.h
> @@ -31,7 +31,7 @@ begin_using_port_info_port (mach_port_t port)
>  }
>  
>  static inline struct port_info * __attribute__ ((unused))
> -begin_using_port_info_payload (unsigned long payload)
> +begin_using_port_info_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (0, payload, 0);
>  }
> diff --git a/libports/ports.h b/libports/ports.h
> index c0f0a22a..e84ee333 100644
> --- a/libports/ports.h
> +++ b/libports/ports.h
> @@ -253,20 +253,20 @@ void *ports_lookup_port (struct port_bucket *bucket,
>     this function is used, PAYLOAD must be a pointer to the port
>     structure.  */
>  extern void *ports_lookup_payload (struct port_bucket *bucket,
> -                                unsigned long payload,
> +                                uintptr_t payload,
>                                  struct port_class *port_class);
>  
>  /* This returns the ports name.  This function can be used as
>     intranpayload function turning payloads back into port names.  If
>     this function is used, PAYLOAD must be a pointer to the port
>     structure.  */
> -extern mach_port_t ports_payload_get_name (unsigned int payload);
> +extern mach_port_t ports_payload_get_name (uintptr_t payload);
>  
>  #if (defined(__USE_EXTERN_INLINES) || defined(PORTS_DEFINE_EI)) && 
> !defined(__cplusplus)
>  
>  PORTS_EI void *
>  ports_lookup_payload (struct port_bucket *bucket,
> -                   unsigned long payload,
> +                   uintptr_t payload,
>                     struct port_class *class)
>  {
>    struct port_info *pi = (struct port_info *) payload;
> @@ -287,7 +287,7 @@ ports_lookup_payload (struct port_bucket *bucket,
>  }
>  
>  PORTS_EI mach_port_t
> -ports_payload_get_name (unsigned int payload)
> +ports_payload_get_name (uintptr_t payload)
>  {
>    struct port_info *pi = (struct port_info *) payload;
>  
> diff --git a/libtrivfs/mig-decls.h b/libtrivfs/mig-decls.h
> index f3afd5ae..5a52bef3 100644
> --- a/libtrivfs/mig-decls.h
> +++ b/libtrivfs/mig-decls.h
> @@ -52,7 +52,7 @@ trivfs_begin_using_protid (mach_port_t port)
>  }
>  
>  static inline struct trivfs_protid * __attribute__ ((unused))
> -trivfs_begin_using_protid_payload (unsigned long payload)
> +trivfs_begin_using_protid_payload (uintptr_t payload)
>  {
>    struct port_info *pi = ports_lookup_payload (NULL, payload, NULL);
>  
> @@ -99,7 +99,7 @@ trivfs_begin_using_control (mach_port_t port)
>  }
>  
>  static inline struct trivfs_control * __attribute__ ((unused))
> -trivfs_begin_using_control_payload (unsigned long payload)
> +trivfs_begin_using_control_payload (uintptr_t payload)
>  {
>    struct port_info *pi = ports_lookup_payload (NULL, payload, NULL);
>  
> diff --git a/lwip/mig-decls.h b/lwip/mig-decls.h
> index 907369ee..8071da10 100644
> --- a/lwip/mig-decls.h
> +++ b/lwip/mig-decls.h
> @@ -34,7 +34,7 @@ begin_using_socket_port (mach_port_t port)
>  }
>  
>  static inline struct sock_user * __attribute__ ((unused))
> -begin_using_socket_payload (unsigned long payload)
> +begin_using_socket_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (lwip_bucket, payload, socketport_class);
>  }
> @@ -53,7 +53,7 @@ begin_using_sockaddr_port (mach_port_t port)
>  }
>  
>  static inline struct sock_addr * __attribute__ ((unused))
> -begin_using_sockaddr_payload (unsigned long payload)
> +begin_using_sockaddr_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (lwip_bucket, payload, addrport_class);
>  }
> diff --git a/mach-defpager/mig-decls.h b/mach-defpager/mig-decls.h
> index 3357aa2e..bacb2185 100644
> --- a/mach-defpager/mig-decls.h
> +++ b/mach-defpager/mig-decls.h
> @@ -32,7 +32,7 @@ begin_using_default_pager (mach_port_t port)
>  }
>  
>  static inline struct dstruct * __attribute__ ((unused))
> -begin_using_default_pager_payload (unsigned long payload)
> +begin_using_default_pager_payload (uintptr_t payload)
>  {
>    return (default_pager_t) payload;
>  }
> diff --git a/pfinet/mig-decls.h b/pfinet/mig-decls.h
> index 67bcbfc3..3c15fb62 100644
> --- a/pfinet/mig-decls.h
> +++ b/pfinet/mig-decls.h
> @@ -33,7 +33,7 @@ begin_using_socket_port (mach_port_t port)
>  }
>  
>  static inline struct sock_user * __attribute__ ((unused))
> -begin_using_socket_payload (unsigned long payload)
> +begin_using_socket_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (pfinet_bucket, payload, socketport_class);
>  }
> @@ -52,7 +52,7 @@ begin_using_sockaddr_port (mach_port_t port)
>  }
>  
>  static inline struct sock_addr * __attribute__ ((unused))
> -begin_using_sockaddr_payload (unsigned long payload)
> +begin_using_sockaddr_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (pfinet_bucket, payload, addrport_class);
>  }
> diff --git a/pflocal/mig-decls.h b/pflocal/mig-decls.h
> index 6c044ce9..494ea58a 100644
> --- a/pflocal/mig-decls.h
> +++ b/pflocal/mig-decls.h
> @@ -37,7 +37,7 @@ begin_using_sock_user_port(mach_port_t port)
>  }
>  
>  static inline sock_user_t __attribute__ ((unused))
> -begin_using_sock_user_payload (unsigned long payload)
> +begin_using_sock_user_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (NULL, payload, sock_user_port_class);
>  }
> @@ -56,7 +56,7 @@ begin_using_addr_port(mach_port_t port)
>  }
>  
>  static inline addr_t __attribute__ ((unused))
> -begin_using_addr_payload (unsigned long payload)
> +begin_using_addr_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (NULL, payload, addr_port_class);
>  }
> diff --git a/proc/mig-decls.h b/proc/mig-decls.h
> index eb33ef31..c6b5d3ed 100644
> --- a/proc/mig-decls.h
> +++ b/proc/mig-decls.h
> @@ -36,7 +36,7 @@ begin_using_proc_port (mach_port_t port)
>  }
>  
>  static inline struct proc * __attribute__ ((unused))
> -begin_using_proc_payload (unsigned long payload)
> +begin_using_proc_payload (uintptr_t payload)
>  {
>    struct proc *p;
>    p = ports_lookup_payload (proc_bucket, payload, proc_class);
> @@ -62,7 +62,7 @@ begin_using_exc_port (mach_port_t port)
>  }
>  
>  static inline exc_t __attribute__ ((unused))
> -begin_using_exc_payload (unsigned long payload)
> +begin_using_exc_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (NULL, payload, exc_class);
>  }
> diff --git a/term/mig-decls.h b/term/mig-decls.h
> index 09b45c6e..252de38c 100644
> --- a/term/mig-decls.h
> +++ b/term/mig-decls.h
> @@ -33,7 +33,7 @@ begin_using_ctty_port (mach_port_t port)
>  }
>  
>  static inline struct port_info * __attribute__ ((unused))
> -begin_using_ctty_payload (unsigned long payload)
> +begin_using_ctty_payload (uintptr_t payload)
>  {
>    return ports_lookup_payload (term_bucket, payload, cttyid_class);
>  }
> -- 
> 2.39.2
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.



reply via email to

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