Also cleans up two instances of open() with useless mode params, and
changes a few uses of snprintf to use sizeof(buffer) instead of
hardcoded buffer sizes.
Change-Id: If11591003d910c995e72ad8f75afd072c255a3c5
The use of PR to mean PSR rather than PR was confusing, so let's just
use PR and NI the same way everyone else does.
Also remove bogus blank lines and unnecessary delays (both before first
showing anything and after having shown the final iteration).
Bug: http://b/27447491
Change-Id: I676131956facf2167abb5d0852c55b0670b5eaa6
The toolbox -t option is really the standard -H option. Add -H so
I can switch dumpstate over.
We should also flush after each run so we don't arbitrarily truncate
at the stdio buffer size. (I'm pretty sure no one uses toolbox top
interactively, but it annoyed me while testing -H.)
Change-Id: Ib87cb541d1b21c48468614b2ef60b0cc62694c95
None of our tools -- except for top, which I'd fixed previously --
handles SIGPIE correctly. Let's just handle SIGPIPE in the driver.
Bug: https://code.google.com/p/android/issues/detail?id=157920
Change-Id: I322ea411f53c71585a64118c217d54389f675d4e
- Deal with some signedness issues
- Deal with some size issues
- Deal with NULL pointer issues
- Deal with some -Wunused issues
Change-Id: I1479dd90d690084491bae3475f2c547833519a57
This will make it easier to add additional policies (cgroups) if needed.
Also added comments to the sched_policy APIs.
Change-Id: I33ce1cc4deae10983241f7391294b7a512d2c47c