diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-04-24 23:53:52 -0400 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-04-25 22:12:00 +0200 |
commit | 0afac7ab288a2a259bbc6bdb7e20b686b3913274 (patch) | |
tree | be7b66587fa09204a9e16462242c0b47335170e0 /hurd/default_pager.defs | |
parent | a3cf2656cabaf5691a4e45302eea879791917e2b (diff) |
Use c_string for default_pager_filename_t to define a new default_pager_paging_storage RPC.
This brings us a bit closer to having all types' msgt_size representable
with a single byte. We will be able to avoid mach_msg_type_long_t
entirely for x86_64 since mach_msg_type_t can represent long types using
a separate field.
Message-Id: <ZEdO0Grm2AUw4Tfe@jupiter.tail36e24.ts.net>
Diffstat (limited to 'hurd/default_pager.defs')
-rw-r--r-- | hurd/default_pager.defs | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/hurd/default_pager.defs b/hurd/default_pager.defs index 6b834584..3ca34fc4 100644 --- a/hurd/default_pager.defs +++ b/hurd/default_pager.defs @@ -69,14 +69,10 @@ skip; /* default_pager_paging_file */ skip; /* default_pager_register_fileserver */ -/* Add or remove an area of paging storage, which is a subset of the - Mach device for which device_open returned DEVICE_PORT. The area - consists of the concatenation of contiguous regions described by - RUNS. Each even-numbered element of RUNS gives the starting record - number of a region whose length is given by the next odd-numbered - element. NAME is used in any diagnostics the default pager prints - about device errors when paging. When removing a paging area, NAME - and RUNS must match exactly. */ +/* Deprecated RPC to add or remove an area of paging storage. + * Was superseded in favor of default_pager_paging_storage_new which + * uses the correct type for default_pager_filename_t using c_string. + */ routine default_pager_paging_storage( default_pager : mach_port_t; device_port : mach_port_t; @@ -101,3 +97,21 @@ routine default_pager_storage_info( array[] of vm_size_t, dealloc; out name : data_t); +type new_default_pager_filename_t = c_string[256] + ctype: default_pager_filename_t; + +/* Add or remove an area of paging storage, which is a subset of the + Mach device for which device_open returned DEVICE_PORT. The area + consists of the concatenation of contiguous regions described by + RUNS. Each even-numbered element of RUNS gives the starting record + number of a region whose length is given by the next odd-numbered + element. NAME is used in any diagnostics the default pager prints + about device errors when paging. When removing a paging area, NAME + and RUNS must match exactly. */ +routine default_pager_paging_storage_new( + default_pager : mach_port_t; + device_port : mach_port_t; + runs : recnum_array_t = + array[] of recnum_t; + name : new_default_pager_filename_t; + add : boolean_t); |