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
8
namespace
clues
{
9
10
struct
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 */
22
item::TimeSpecParameter
req_time;
23
item::TimeSpecParameter
rem_time;
24
25
/* return value */
26
item::SuccessResult
result;
27
};
28
29
struct
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;
43
item::ClockNanoSleepFlags
flags;
44
item::TimeSpecParameter
time;
45
item::TimeSpecParameter
remaining;
46
47
/* return value */
48
item::SuccessResult
result;
49
};
50
51
}
// end ns
clues::SystemCall::setReturnItem
void setReturnItem(SystemCallItem &ret)
Sets the return value system call item.
Definition
SystemCall.hxx:151
clues::SystemCall::SystemCall
SystemCall(const SystemCallNr nr)
Instantiates a new SystemCall object with given properties.
Definition
SystemCall.cxx:36
clues::item::ClockID
Definition
time.hxx:57
clues::item::ClockNanoSleepFlags
Definition
time.hxx:79
clues::item::SuccessResult
An always-success return value.
Definition
error.hxx:15
clues::item::TimeSpecParameter
The struct timespec used for various timing and timeout operations in system calls.
Definition
time.hxx:17
clues
Definition
AutoAttachedTracee.cxx:12
clues::ItemType::PARAM_OUT
@ PARAM_OUT
An output parameter filled by in by the system call.
Definition
SystemCallItem.hxx:23
include
syscalls
time.hxx
Generated by
1.13.2