libclues
Linux C++ Tracing Library
Loading...
Searching...
No Matches
time.hxx
1#pragma once
2
3// clues
4#include <clues/items/time.hxx>
5#include <clues/sysnrs/generic.hxx>
6#include <clues/SystemCall.hxx>
7
8namespace clues {
9
10struct CLUES_API NanoSleepSystemCall :
11 public SystemCall {
12
13 NanoSleepSystemCall() :
14 SystemCall{SystemCallNr::NANOSLEEP},
15 req_time{"req_time", "requested time"},
16 rem_time{"rem_time", "remaining time", ItemType::PARAM_OUT} {
17 setReturnItem(result);
18 setParameters(req_time, rem_time);
19 }
20
21 /* parameters */
24
25 /* return value */
27};
28
29struct CLUES_API ClockNanoSleepSystemCall :
30 public SystemCall {
31
32 ClockNanoSleepSystemCall() :
33 SystemCall{SystemCallNr::CLOCK_NANOSLEEP},
34 time{"time", "requested sleep time"},
35 remaining{"rem", "remaining sleep time", ItemType::PARAM_OUT,
36 /*remain_semantics=*/true} {
37 setReturnItem(result);
38 setParameters(clockid, flags, time, remaining);
39 }
40
41 /* parameters */
42 item::ClockID clockid;
46
47 /* return value */
49};
50
51} // end ns
void setReturnItem(SystemCallItem &ret)
Sets the return value system call item.
SystemCall(const SystemCallNr nr)
Instantiates a new SystemCall object with given properties.
An always-success return value.
Definition error.hxx:15
The struct timespec used for various timing and timeout operations in system calls.
Definition time.hxx:17
@ PARAM_OUT
An output parameter filled by in by the system call.