blob: 23a77473d07bbe0d418c8424212b2f36eee33f53 [file] [log] [blame]
Elvira Khabirova254ff1e2015-08-03 07:09:34 +03001#include "defs.h"
Elvira Khabirova6773d6d2015-08-03 07:26:53 +03002#include DEF_MPERS_TYPE(tms_t)
Elvira Khabirova254ff1e2015-08-03 07:09:34 +03003#include <sys/times.h>
Elvira Khabirova6773d6d2015-08-03 07:26:53 +03004typedef struct tms tms_t;
5#include MPERS_DEFS
Elvira Khabirova254ff1e2015-08-03 07:09:34 +03006
7SYS_FUNC(times)
8{
Elvira Khabirova6773d6d2015-08-03 07:26:53 +03009 tms_t tbuf;
Elvira Khabirova254ff1e2015-08-03 07:09:34 +030010
Dmitry V. Levind8ef5e72015-08-20 21:20:14 +000011 if (entering(tcp))
12 return 0;
13
14 if (!umove_or_printaddr(tcp, tcp->u_arg[0], &tbuf)) {
15 tprintf("{tms_utime=%llu, tms_stime=%llu, ",
16 (unsigned long long) tbuf.tms_utime,
17 (unsigned long long) tbuf.tms_stime);
18 tprintf("tms_cutime=%llu, tms_cstime=%llu}",
19 (unsigned long long) tbuf.tms_cutime,
20 (unsigned long long) tbuf.tms_cstime);
Elvira Khabirova254ff1e2015-08-03 07:09:34 +030021 }
Dmitry V. Levind8ef5e72015-08-20 21:20:14 +000022
23 return syserror(tcp) ? RVAL_DECIMAL : RVAL_UDECIMAL;
Elvira Khabirova254ff1e2015-08-03 07:09:34 +030024}