Commit Graph

26 Commits

Author SHA1 Message Date
Zev Weiss a1a027b9bd Axe automated header generation.
Reasoning:
 - implementation was unsound -- broke down when I added a fairly
   basic macro definition expanding to a struct initializer in a *.c
   file.

 - made it way too easy (e.g. via otherwise totally innocuous git
   commands) to end up with timestamps such that it always ran
   MakeHeader.py but never used its output, leading to overbuild noise
   when running what should be a null 'make'.

 - but mostly: it's just an awkward way of dealing with C code.
2020-09-03 11:58:58 -05:00
Nathan Scott 6b443c5da9 Merge branch 'hishamhm-pull-932' 2020-08-20 14:47:07 +10:00
Nathan Scott 78f4d064de Merge branch 'hishamhm-pull-868' 2020-08-20 09:53:00 +10:00
Nathan Scott e9947acfc6 Merge branch 'hishamhm-pull-818' 2020-08-19 16:49:43 +10:00
Nathan Scott 5a17cee74d Merge branch 'hishamhm-pull-817' 2020-08-19 16:43:55 +10:00
Arnavion 909bb86f05 Show N/A on unsupported platforms instead of 0KHz 2019-08-10 17:17:45 -07:00
Antoine Motet 27fe307d22 Remove a few unnecessary #includes 2018-12-16 11:34:15 +01:00
Antoine Motet 9197adf57e Fix CPU usage on OpenBSD
The current OpenBSD-specific CPU usage code is broken. The `cpu`
parameter of `Platform_setCPUValues` is an integer in the interval
[0, cpuCount], not [0, cpuCount-1]: Actual CPUs are numbered from
1, the “zero” CPU is a “virtual” one which represents the average
of actual CPUs (I guess it’s inherited from Linux’s `/proc/stats`).
This off-by-one error leads to random crashes.

Moreover, the displayed CPU usage is more detailed with system,
user and nice times.

I made the OpenBSD CPU code more similar to the Linux CPU code,
removing a few old bits from OpenBSD’s top(1). I think it will be
easier to understand, maintain and evolve.

I’d love some feedback from experienced OpenBSD people.
2018-12-16 11:30:06 +01:00
multiplexd c1fb585b6b OpenBSD: add environment reading support (#819) 2018-08-19 01:07:36 -03:00
kremlin 060aa2b20f remove wrongfix 2018-07-26 04:17:06 -05:00
multiplexd 3d79c72e9a Update OpenBSD maximum PID
The source code correctly states that the maximum PID number in
the OpenBSD kernel is fixed in sys/sys/proc.h, however this was
updated in revision 1.215 (two years ago!) from 32766 to 99999.
2018-07-17 18:46:55 +01:00
Ian Sutton c005ffc3d7 Fix zero-index array bounds issue 2018-07-17 08:50:22 -05:00
Ian Sutton 48b807b0ff Fix CPU meters
Introduction of CP_SPIN sched state broke hard-coded state indexes
resulting in the meters incorrectly reporting bogus intr data instead of
CPU usage. Change hardcoded values to sched.h macros.
2018-07-17 08:43:50 -05:00
Explorer09 1f3d85b617 Mark signal tables 'const'
Specifically, Platform_signals[] and Platform_numberOfSignals. Both are
not supposed to be mutable. Marking them 'const' puts them into rodata
sections in binary. And for Platform_numberOfSignals, this aids
optimization (aids only Link Time Optimization for now). :)

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
2016-08-30 20:41:17 +08:00
Michael McConville 1809f4be98 Remove needless allocation error conditions
These allocations were converted to use xMalloc et al. and no longer
need error checks.
2016-04-29 21:10:05 -04:00
Hisham b54d2dde40 Check for failure in allocations. 2016-02-02 15:53:02 +01:00
Michael Klein cc23d13f87 Add Platform_getProcessEnv
- currently implemented for darwin and linux
2015-12-03 22:23:40 +01:00
Hisham Muhammad fd5dd6605a Merge pull request #299 from mmcco/master
OpenBSD port updates and error exit improvements
2015-11-02 08:46:40 -05:00
Michael McConville 0fb9a8c389 Remove a debugging print 2015-11-01 13:19:01 -05:00
Michael McConville 8673a84e5f Remove some trailing whitespace 2015-10-13 11:05:52 -04:00
Michael McConville 9f1884c28f Fix generation of openbsd/Platform.h and replace a vestigial dummy CPU utilization value 2015-10-09 14:57:01 -04:00
Hisham Muhammad 56193323ce let's let the user find SIGIOT if the look for it :) 2015-10-06 12:58:53 -03:00
Michael McConville c4eb99f264 Add header file reference for OpenBSD signals 2015-10-06 11:32:40 -04:00
Michael McConville 77f12bbecd Add OpenBSD signals 2015-10-06 11:25:16 -04:00
Michael McConville e2bbd5cfa4 Change some tabs to three spaces 2015-09-19 12:08:34 -04:00
Michael McConville a9a5a539cf (Very) initial working OpenBSD port 2015-09-18 00:46:48 -04:00