diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2022-12-18 12:21:27 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-12-18 18:39:02 +0100 |
commit | 3b097978c147d6e98f02e7b2d31e75a36e36338f (patch) | |
tree | bf8e7c770b5e8dfbf104dcf80e594ce573470754 /include/device | |
parent | 16e0cdef9ce952fa5f7980d19f113be027e88b27 (diff) | |
download | gnumach-3b097978c147d6e98f02e7b2d31e75a36e36338f.tar.gz gnumach-3b097978c147d6e98f02e7b2d31e75a36e36338f.tar.bz2 gnumach-3b097978c147d6e98f02e7b2d31e75a36e36338f.zip |
Use long_natural_t for recnum_t
For 64 bits, device operations will provide an addressing space of 64
bits.
Also define the translation functions if long_natural_t or
long_integer_t are ever used in RPCs.
Note that MIG does not implicitly inherit the translation functions from
types hence the need to redefine them for recnum_t.
Message-Id: <Y59MFzekEA0YUXIw@mars>
Diffstat (limited to 'include/device')
-rw-r--r-- | include/device/device_types.defs | 11 | ||||
-rw-r--r-- | include/device/device_types.h | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/include/device/device_types.defs b/include/device/device_types.defs index e97d89ca..de8dbb02 100644 --- a/include/device/device_types.defs +++ b/include/device/device_types.defs @@ -43,7 +43,16 @@ DEVICE_IMPORTS #endif -type recnum_t = uint32_t; +type rpc_recnum_t = rpc_long_natural_t; +type recnum_t = rpc_recnum_t +#if defined(KERNEL_SERVER) + intran: recnum_t convert_long_natural_from_user(rpc_recnum_t) + outtran: rpc_recnum_t convert_long_natural_to_user(recnum_t) +#elif defined(KERNEL_USER) + ctype: rpc_recnum_t +#endif + ; + type dev_mode_t = uint32_t; type dev_flavor_t = uint32_t; type dev_name_t = (MACH_MSG_TYPE_STRING_C, 8*128); diff --git a/include/device/device_types.h b/include/device/device_types.h index f13122f0..7c533723 100644 --- a/include/device/device_types.h +++ b/include/device/device_types.h @@ -89,7 +89,8 @@ typedef struct { /* * Record number for random-access devices */ -typedef unsigned int recnum_t; +typedef long_natural_t recnum_t; +typedef rpc_long_natural_t rpc_recnum_t; /* * Flavors of set/get statuses |