2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef FRAMEWORK_UNIFIED_CLIENT_NS_LOGGER_INCLUDE_FRAMEWORKUNIFIED_STUB_H_
18 #define FRAMEWORK_UNIFIED_CLIENT_NS_LOGGER_INCLUDE_FRAMEWORKUNIFIED_STUB_H_
20 /*#include <PosixBasedOS001legacy_types.h>*/ // for _UintXXt
22 #define _NTO_TRACE_USERFIRST (0x00000000)
25 typedef char *__NTO_va_list;
27 // from sys/platform.h
28 #define __CLOCKADJUST \
30 unsigned long tick_count; /*NOLINT (readability/nolint)*/\
31 long tick_nsec_inc; /*NOLINT (readability/nolint)*/\
35 struct _clockadjust __CLOCKADJUST;
37 _Uint64t cycles_per_sec; /* for ClockCycle */
38 _Uint64t volatile nsec_tod_adjust;
39 _Uint64t volatile nsec;
40 unsigned long nsec_inc; // NOLINT (readability/nolint)
41 unsigned long boot_time; /* UTC seconds when machine booted */ // NOLINT (readability/nolint)
43 struct _clockadjust adjust;
44 unsigned long timer_rate; /* times 10^timer_scale */ // NOLINT (readability/nolint)
45 long timer_scale; // NOLINT (readability/nolint)
46 unsigned long timer_load; // NOLINT (readability/nolint)
47 long intr; // NOLINT (readability/nolint)
48 unsigned long epoch; // NOLINT (readability/nolint)
49 unsigned long flags; // NOLINT (readability/nolint)
50 unsigned int rr_interval_mul;
51 unsigned long spare0; // NOLINT (readability/nolint)
52 _Uint64t volatile nsec_stable;
53 unsigned long spare[4]; // NOLINT (readability/nolint)
56 struct syspage_entry *_syspage_ptr;
63 struct syspage_entry {
64 _Uint16t size; /* size of syspage_entry */
65 _Uint16t total_size; /* size of system page */
68 syspage_entry_info system_private;
69 syspage_entry_info asinfo;
70 syspage_entry_info meminfo;
71 syspage_entry_info hwinfo;
72 syspage_entry_info cpuinfo;
73 syspage_entry_info cacheattr;
74 syspage_entry_info qtime;
75 syspage_entry_info callout;
76 syspage_entry_info callin;
77 syspage_entry_info typed_strings;
78 syspage_entry_info strings;
79 syspage_entry_info intrinfo;
80 syspage_entry_info smp;
81 syspage_entry_info pminfo;
82 syspage_entry_info mdriver;
83 long spare[2]; // NOLINT (readability/nolint)
85 #if defined(SYSPAGE_TARGET_ALL) || defined(SYSPAGE_TARGET_X86)
86 struct x86_syspage_entry x86;
88 #if defined(SYSPAGE_TARGET_ALL) || defined(SYSPAGE_TARGET_PPC)
89 struct ppc_syspage_entry ppc;
91 #if defined(SYSPAGE_TARGET_ALL) || defined(SYSPAGE_TARGET_MIPS)
92 struct mips_syspage_entry mips;
94 #if defined(SYSPAGE_TARGET_ALL) || defined(SYSPAGE_TARGET_ARM)
95 struct arm_syspage_entry arm;
97 #if defined(SYSPAGE_TARGET_ALL) || defined(SYSPAGE_TARGET_SH)
98 struct sh_syspage_entry sh;
101 long filler[20]; // NOLINT (readability/nolint)
106 #define _SYSPAGE_ENTRY( __base, __field ) /*NOLINT (readability/nolint)*/\
107 ((struct __field##_entry *)reinterpret_cast<void *>(reinterpret_cast<char *>(__base)\
108 + (__base)->__field.entry_off))
109 #define SYSPAGE_ENTRY(__field) _SYSPAGE_ENTRY(_syspage_ptr, __field)
111 #endif // FRAMEWORK_UNIFIED_CLIENT_NS_LOGGER_INCLUDE_FRAMEWORKUNIFIED_STUB_H_