diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2022-12-06 00:35:01 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-12-06 21:26:19 +0100 |
commit | 2a7263559572f178322451a6a1e0a43dc90cdb32 (patch) | |
tree | beb008838cac227cc7844ac02067731a5ca3ef20 /include/mach/task_info.h | |
parent | 45afcc68979b700bdef1dc0e27ba79e0822b1c18 (diff) | |
download | gnumach-2a7263559572f178322451a6a1e0a43dc90cdb32.tar.gz gnumach-2a7263559572f178322451a6a1e0a43dc90cdb32.tar.bz2 gnumach-2a7263559572f178322451a6a1e0a43dc90cdb32.zip |
Make task_info.h structs more portable
Changed vm_size_t to rpc_size_t so that both userland and kernel agree
on the same size. Also changed the denominator for the maximum struct
sizes to be integer_t to match the other declarations.
Introduced long_natural_t and rpc_long_natural_t to represent large
counters. Replaced rpc_unsigned_long with rpc_long_natural_t.
Message-Id: <Y47UhaOzKnqhgYq4@reue>
Diffstat (limited to 'include/mach/task_info.h')
-rw-r--r-- | include/mach/task_info.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/include/mach/task_info.h b/include/mach/task_info.h index 5607178c..3aaa7cd6 100644 --- a/include/mach/task_info.h +++ b/include/mach/task_info.h @@ -54,8 +54,8 @@ typedef integer_t task_info_data_t[TASK_INFO_MAX]; struct task_basic_info { integer_t suspend_count; /* suspend count for task */ integer_t base_priority; /* base scheduling priority */ - vm_size_t virtual_size; /* number of virtual pages */ - vm_size_t resident_size; /* number of resident pages */ + rpc_vm_size_t virtual_size; /* number of virtual pages */ + rpc_vm_size_t resident_size; /* number of resident pages */ time_value_t user_time; /* total user run time for terminated threads */ time_value_t system_time; /* total system run time for @@ -66,24 +66,24 @@ struct task_basic_info { typedef struct task_basic_info task_basic_info_data_t; typedef struct task_basic_info *task_basic_info_t; #define TASK_BASIC_INFO_COUNT \ - (sizeof(task_basic_info_data_t) / sizeof(natural_t)) + (sizeof(task_basic_info_data_t) / sizeof(integer_t)) #define TASK_EVENTS_INFO 2 /* various event counts */ struct task_events_info { - natural_t faults; /* number of page faults */ - natural_t zero_fills; /* number of zero fill pages */ - natural_t reactivations; /* number of reactivated pages */ - natural_t pageins; /* number of actual pageins */ - natural_t cow_faults; /* number of copy-on-write faults */ - natural_t messages_sent; /* number of messages sent */ - natural_t messages_received; /* number of messages received */ + rpc_long_natural_t faults; /* number of page faults */ + rpc_long_natural_t zero_fills; /* number of zero fill pages */ + rpc_long_natural_t reactivations; /* number of reactivated pages */ + rpc_long_natural_t pageins; /* number of actual pageins */ + rpc_long_natural_t cow_faults; /* number of copy-on-write faults */ + rpc_long_natural_t messages_sent; /* number of messages sent */ + rpc_long_natural_t messages_received; /* number of messages received */ }; typedef struct task_events_info task_events_info_data_t; typedef struct task_events_info *task_events_info_t; #define TASK_EVENTS_INFO_COUNT \ - (sizeof(task_events_info_data_t) / sizeof(natural_t)) + (sizeof(task_events_info_data_t) / sizeof(integer_t)) #define TASK_THREAD_TIMES_INFO 3 /* total times for live threads - only accurate if suspended */ @@ -98,7 +98,7 @@ struct task_thread_times_info { typedef struct task_thread_times_info task_thread_times_info_data_t; typedef struct task_thread_times_info *task_thread_times_info_t; #define TASK_THREAD_TIMES_INFO_COUNT \ - (sizeof(task_thread_times_info_data_t) / sizeof(natural_t)) + (sizeof(task_thread_times_info_data_t) / sizeof(integer_t)) /* * Flavor definitions for task_ras_control |