Commit bb7a2c63 authored by Hui Su's avatar Hui Su Committed by Jonathan Corbet
Browse files

docs/cpu-load: format the example code.



format the example code.

Signed-off-by: default avatarHui Su <sh_def@163.com>
Link: https://lore.kernel.org/r/20201018170557.GA7670@rlk


Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 4fb220da
Loading
Loading
Loading
Loading
+33 −30
Original line number Diff line number Diff line
@@ -66,16 +66,19 @@ will lead to quite erratic information inside ``/proc/stat``::
		(void) signr;
		stop = 1;
	}

	static unsigned long hog (unsigned long niters)
	{
		stop = 0;
		while (!stop && --niters);
		return niters;
	}

	int main (void)
	{
		int i;
	struct itimerval it = { .it_interval = { .tv_sec = 0, .tv_usec = 1 },
		struct itimerval it = {
			.it_interval = { .tv_sec = 0, .tv_usec = 1 },
			.it_value    = { .tv_sec = 0, .tv_usec = 1 } };
		sigset_t set;
		unsigned long v[HIST];