cpuuse
1# This file was automatically generated by SWIG (https://www.swig.org). 2# Version 4.2.1 3# 4# Do not make changes to this file unless you know what you are doing - modify 5# the SWIG interface file instead. 6 7from sys import version_info as _swig_python_version_info 8from mock_rtems import _cpuuse as _cpuuse 9 10try: 11 import builtins as __builtin__ 12except ImportError: 13 import __builtin__ 14 15def _swig_repr(self): 16 try: 17 strthis = "proxy of " + self.this.__repr__() 18 except __builtin__.Exception: 19 strthis = "" 20 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 21 22 23def _swig_setattr_nondynamic_instance_variable(set): 24 def set_instance_attr(self, name, value): 25 if name == "this": 26 set(self, name, value) 27 elif name == "thisown": 28 self.this.own(value) 29 elif hasattr(self, name) and isinstance(getattr(type(self), name), property): 30 set(self, name, value) 31 else: 32 raise AttributeError("You cannot add instance attributes to %s" % self) 33 return set_instance_attr 34 35 36def _swig_setattr_nondynamic_class_variable(set): 37 def set_class_attr(cls, name, value): 38 if hasattr(cls, name) and not isinstance(getattr(cls, name), property): 39 set(cls, name, value) 40 else: 41 raise AttributeError("You cannot add class attributes to %s" % cls) 42 return set_class_attr 43 44 45def _swig_add_metaclass(metaclass): 46 """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" 47 def wrapper(cls): 48 return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) 49 return wrapper 50 51 52class _SwigNonDynamicMeta(type): 53 """Meta class to enforce nondynamic attributes (no new attributes) for a class""" 54 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) 55 56 57 58def rtems_cpu_info_report(printer): 59 r""" 60 Reports the CPU information using the printer plugin. 61 62 :type printer: struct rtems_printer 63 :param printer: is the printer plugin to output the report. 64 65 :rtype: int 66 :return: Returns the number of characters printed. 67 68 Title: Constraints 69 70 The following constraints apply to this directive: 71 72 * The directive may be called from within any runtime context. 73 74 * The directive will not cause the calling task to be preempted. 75 """ 76 return _cpuuse.rtems_cpu_info_report(printer) 77 78def rtems_cpu_usage_report(): 79 r""" 80 Reports the CPU usage of each thread using the printk() printer. 81 82 Title: Notes 83 See also rtems_cpu_usage_report_with_plugin(). 84 85 Title: Constraints 86 87 The following constraints apply to this directive: 88 89 * The directive may be called from within device driver initialization 90 context. 91 92 * The directive may be called from within task context. 93 94 * The directive may obtain and release the object allocator mutex. This may 95 cause the calling task to be preempted. 96 """ 97 return _cpuuse.rtems_cpu_usage_report() 98 99def rtems_cpu_usage_report_with_plugin(printer): 100 r""" 101 Reports the CPU usage of each thread using the printer plugin. 102 103 :type printer: struct rtems_printer 104 :param printer: is the printer plugin to output the report. 105 106 Title: Constraints 107 108 The following constraints apply to this directive: 109 110 * The directive may be called from within device driver initialization 111 context. 112 113 * The directive may be called from within task context. 114 115 * The directive may obtain and release the object allocator mutex. This may 116 cause the calling task to be preempted. 117 """ 118 return _cpuuse.rtems_cpu_usage_report_with_plugin(printer) 119 120def rtems_cpu_usage_reset(): 121 r""" 122 Resets the CPU usage of each thread. 123 124 Title: Constraints 125 126 The following constraints apply to this directive: 127 128 * The directive may be called from within device driver initialization 129 context. 130 131 * The directive may be called from within task context. 132 133 * The directive may obtain and release the object allocator mutex. This may 134 cause the calling task to be preempted. 135 """ 136 return _cpuuse.rtems_cpu_usage_reset() 137 138def rtems_cpu_usage_top(): 139 r""" 140 Starts an interactive CPU usage reporting using the printk() printer. 141 142 Title: Notes 143 See also rtems_cpu_usage_top_with_plugin(). 144 145 Title: Constraints 146 147 The following constraints apply to this directive: 148 149 * The directive may be called from within task context. 150 151 * The directive may obtain and release the object allocator mutex. This may 152 cause the calling task to be preempted. 153 154 * The directive sends a request to another task and waits for a response. 155 This may cause the calling task to be blocked and unblocked. 156 """ 157 return _cpuuse.rtems_cpu_usage_top() 158 159def rtems_cpu_usage_top_with_plugin(printer): 160 r""" 161 Starts an interactive CPU usage reporting using the printer plugin. 162 163 :type printer: struct rtems_printer 164 :param printer: is the printer plugin to output the report. 165 166 Title: Notes 167 The directive starts a task to do the reporting. The getchar() function is 168 used to get commands from the user. 169 170 Title: Constraints 171 172 The following constraints apply to this directive: 173 174 * The directive may be called from within task context. 175 176 * The directive may obtain and release the object allocator mutex. This may 177 cause the calling task to be preempted. 178 179 * The directive sends a request to another task and waits for a response. 180 This may cause the calling task to be blocked and unblocked. 181 """ 182 return _cpuuse.rtems_cpu_usage_top_with_plugin(printer)
59def rtems_cpu_info_report(printer): 60 r""" 61 Reports the CPU information using the printer plugin. 62 63 :type printer: struct rtems_printer 64 :param printer: is the printer plugin to output the report. 65 66 :rtype: int 67 :return: Returns the number of characters printed. 68 69 Title: Constraints 70 71 The following constraints apply to this directive: 72 73 * The directive may be called from within any runtime context. 74 75 * The directive will not cause the calling task to be preempted. 76 """ 77 return _cpuuse.rtems_cpu_info_report(printer)
Reports the CPU information using the printer plugin.
Parameters
- printer: is the printer plugin to output the report.
Returns
Returns the number of characters printed.
Title: Constraints
The following constraints apply to this directive:
The directive may be called from within any runtime context.
The directive will not cause the calling task to be preempted.
79def rtems_cpu_usage_report(): 80 r""" 81 Reports the CPU usage of each thread using the printk() printer. 82 83 Title: Notes 84 See also rtems_cpu_usage_report_with_plugin(). 85 86 Title: Constraints 87 88 The following constraints apply to this directive: 89 90 * The directive may be called from within device driver initialization 91 context. 92 93 * The directive may be called from within task context. 94 95 * The directive may obtain and release the object allocator mutex. This may 96 cause the calling task to be preempted. 97 """ 98 return _cpuuse.rtems_cpu_usage_report()
Reports the CPU usage of each thread using the printk() printer.
Title: Notes See also rtems_cpu_usage_report_with_plugin().
Title: Constraints
The following constraints apply to this directive:
The directive may be called from within device driver initialization context.
The directive may be called from within task context.
The directive may obtain and release the object allocator mutex. This may cause the calling task to be preempted.
100def rtems_cpu_usage_report_with_plugin(printer): 101 r""" 102 Reports the CPU usage of each thread using the printer plugin. 103 104 :type printer: struct rtems_printer 105 :param printer: is the printer plugin to output the report. 106 107 Title: Constraints 108 109 The following constraints apply to this directive: 110 111 * The directive may be called from within device driver initialization 112 context. 113 114 * The directive may be called from within task context. 115 116 * The directive may obtain and release the object allocator mutex. This may 117 cause the calling task to be preempted. 118 """ 119 return _cpuuse.rtems_cpu_usage_report_with_plugin(printer)
Reports the CPU usage of each thread using the printer plugin.
Parameters
- printer: is the printer plugin to output the report.
Title: Constraints
The following constraints apply to this directive:
The directive may be called from within device driver initialization context.
The directive may be called from within task context.
The directive may obtain and release the object allocator mutex. This may cause the calling task to be preempted.
121def rtems_cpu_usage_reset(): 122 r""" 123 Resets the CPU usage of each thread. 124 125 Title: Constraints 126 127 The following constraints apply to this directive: 128 129 * The directive may be called from within device driver initialization 130 context. 131 132 * The directive may be called from within task context. 133 134 * The directive may obtain and release the object allocator mutex. This may 135 cause the calling task to be preempted. 136 """ 137 return _cpuuse.rtems_cpu_usage_reset()
Resets the CPU usage of each thread.
Title: Constraints
The following constraints apply to this directive:
The directive may be called from within device driver initialization context.
The directive may be called from within task context.
The directive may obtain and release the object allocator mutex. This may cause the calling task to be preempted.
139def rtems_cpu_usage_top(): 140 r""" 141 Starts an interactive CPU usage reporting using the printk() printer. 142 143 Title: Notes 144 See also rtems_cpu_usage_top_with_plugin(). 145 146 Title: Constraints 147 148 The following constraints apply to this directive: 149 150 * The directive may be called from within task context. 151 152 * The directive may obtain and release the object allocator mutex. This may 153 cause the calling task to be preempted. 154 155 * The directive sends a request to another task and waits for a response. 156 This may cause the calling task to be blocked and unblocked. 157 """ 158 return _cpuuse.rtems_cpu_usage_top()
Starts an interactive CPU usage reporting using the printk() printer.
Title: Notes See also rtems_cpu_usage_top_with_plugin().
Title: Constraints
The following constraints apply to this directive:
The directive may be called from within task context.
The directive may obtain and release the object allocator mutex. This may cause the calling task to be preempted.
The directive sends a request to another task and waits for a response. This may cause the calling task to be blocked and unblocked.
160def rtems_cpu_usage_top_with_plugin(printer): 161 r""" 162 Starts an interactive CPU usage reporting using the printer plugin. 163 164 :type printer: struct rtems_printer 165 :param printer: is the printer plugin to output the report. 166 167 Title: Notes 168 The directive starts a task to do the reporting. The getchar() function is 169 used to get commands from the user. 170 171 Title: Constraints 172 173 The following constraints apply to this directive: 174 175 * The directive may be called from within task context. 176 177 * The directive may obtain and release the object allocator mutex. This may 178 cause the calling task to be preempted. 179 180 * The directive sends a request to another task and waits for a response. 181 This may cause the calling task to be blocked and unblocked. 182 """ 183 return _cpuuse.rtems_cpu_usage_top_with_plugin(printer)
Starts an interactive CPU usage reporting using the printer plugin.
Parameters
- printer: is the printer plugin to output the report.
Title: Notes The directive starts a task to do the reporting. The getchar() function is used to get commands from the user.
Title: Constraints
The following constraints apply to this directive:
The directive may be called from within task context.
The directive may obtain and release the object allocator mutex. This may cause the calling task to be preempted.
The directive sends a request to another task and waits for a response. This may cause the calling task to be blocked and unblocked.