#ifndef __RESOURCE_LOADED #define __RESOURCE_LOADED 1 /**************************************************************************** ** ** - Declarations for resource operations ** ***************************************************************************** ** Header introduced by the X/Open CAE Specification, Issue 4, Version 2 ***************************************************************************** ** * ** HPE CONFIDENTIAL. This software is confidential proprietary software * ** licensed by Hewlett Packard Enterprise Development, LP, and is not * ** authorized to be used, duplicated or disclosed to anyone without the * ** prior written permission of HPE. * ** Copyright 2003 Hewlett Packard Enterprise Development, LP * ** * ** VMS SOFTWARE, INC. CONFIDENTIAL. This software is confidential * ** proprietary software licensed by VMS Software, Inc., and is not * ** authorized to be used, duplicated or disclosed to anyone without * ** the prior written permission of VMS Software, Inc. * ** Copyright 2020-2023 VMS Software, Inc. * ** * ***************************************************************************** */ #pragma __nostandard #include #ifdef __cplusplus extern "C" { #endif /* ** All structures should be member aligned on natural boundaries */ #pragma __member_alignment __save #pragma __member_alignment /* ** Public typedefs */ #if !defined __TIME_T && !defined _DECC_V4_SOURCE # define __TIME_T 1 #ifdef __NAMESPACE_STD namespace std { #endif typedef __time_t time_t; #ifdef __NAMESPACE_STD } /* namespace std */ using std::time_t; #endif #endif #ifndef __TIMEVAL # define __TIMEVAL 1 # if defined _XOPEN_SOURCE_EXTENDED || !defined _DECC_V4_SOURCE struct timeval { __time_t tv_sec; /* seconds since Jan. 1, 1970 */ # if defined(__clang__) int tv_usec; /* microseconds */ # else long tv_usec; /* microseconds */ # endif }; # else struct timeval { # if defined(__clang__) int tv_sec; /* seconds since Jan. 1, 1970 */ int tv_usec; /* microseconds */ # else long tv_sec; /* seconds since Jan. 1, 1970 */ long tv_usec; /* microseconds */ # endif }; # endif #endif #define RUSAGE_SELF 0 #define RUSAGE_CHILDREN -1 #ifdef _GNU_SOURCE # define RUSAGE_THREAD 1 /* not implemented */ #endif #ifndef __x86_64 struct __rusage { struct timeval ru_utime; /* user time used */ struct timeval ru_stime; /* system time used -- not implemented */ }; # if __CRTL_VER < 90210000 || defined __DONT_USE_EXT_WAIT # define rusage __rusage # endif #endif #if defined __x86_64 || __CRTL_VER >= 90210000 # ifdef __x86_64 struct rusage { # else struct __ext_rusage { # endif struct timeval ru_utime; /* user time used */ struct timeval ru_stime; /* system time used -- not implemented */ int ru_maxrss; /* max resident set size */ int ru_ixrss; /* integral shared text memory size -- not implemented */ int ru_idrss; /* integral unshared data size -- not implemented */ int ru_isrss; /* integral unshared stack size -- not implemented */ int ru_minflt; /* page reclaims -- not implemented */ int ru_majflt; /* page faults -- not implemented */ int ru_nswap; /* swaps -- not implemented */ int ru_inblock; /* block input operations -- not implemented */ int ru_oublock; /* block output operations -- not implemented */ int ru_msgsnd; /* messages sent -- not implemented */ int ru_msgrcv; /* messages received -- not implemented */ int ru_nsignals; /* signals received -- not implemented */ int ru_nvcsw; /* voluntary context switches -- not implemented */ int ru_nivcsw; /* involuntary context switches -- not implemented */ }; # if !defined __x86_64 && !defined __DONT_USE_EXT_WAIT # define rusage __ext_rusage # endif # if !defined _ANSI_C_SOURCE # if __INITIAL_POINTER_SIZE || defined(__clang__) # pragma __required_pointer_size __save # pragma __required_pointer_size 64 # endif # ifdef __x86_64 int getrusage(int, struct rusage *); # else int getrusage(int, struct __ext_rusage *); # endif # if __INITIAL_POINTER_SIZE || defined(__clang__) # pragma __required_pointer_size __restore # endif # endif #else # define rusage __rusage #endif #pragma __member_alignment __restore #ifdef __cplusplus } #endif #pragma __standard #endif /* __RESOURCE_LOADED */