[go: up one dir, main page]

File: getrusage.c

package info (click to toggle)
fio 3.39-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 12,924 kB
  • sloc: ansic: 80,931; python: 9,252; sh: 5,843; makefile: 813; yacc: 204; lex: 184
file content (14 lines) | stat: -rw-r--r-- 273 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <errno.h>
#include "getrusage.h"

int fio_getrusage(struct rusage *ru)
{
#ifdef CONFIG_RUSAGE_THREAD
	if (!getrusage(RUSAGE_THREAD, ru))
		return 0;
	if (errno != EINVAL)
		return -1;
	/* Fall through to RUSAGE_SELF */
#endif
	return getrusage(RUSAGE_SELF, ru);
}