7#include <cosmos/time/types.hxx>
10#include <clues/items/items.hxx>
11#include <clues/SystemCallItem.hxx>
13namespace clues::item {
16class CLUES_API TimeSpecParameter :
19 explicit TimeSpecParameter(
20 const std::string_view short_name,
21 const std::string_view long_name = {},
23 const bool remain_semantics =
false) :
25 m_remain_semantics{remain_semantics} {
28 std::string
str()
const override;
30 const std::optional<struct timespec>& spec()
const {
43 void updateData(
const Tracee &proc)
override;
45 void fetch(
const Tracee &proc);
48 bool needTime32Conversion()
const;
52 std::optional<struct timespec> m_timespec;
53 bool m_remain_semantics =
false;
56class CLUES_API ClockID :
57 public ValueInParameter {
60 ValueInParameter{
"clockid",
"clock identifier"} {
63 std::string
str()
const override;
65 auto type()
const {
return m_type; }
75 cosmos::ClockType m_type = cosmos::ClockType::INVALID;
78class CLUES_API ClockNanoSleepFlags :
79 public ValueInParameter {
82 enum class Flag :
int {
83 ABSTIME = TIMER_ABSTIME
86 using Flags = cosmos::BitMask<Flag>;
90 explicit ClockNanoSleepFlags() :
91 ValueInParameter{
"flags",
"clock sleep flags"} {
94 std::string
str()
const override;
OTHER valueAs() const
Helper to cast the strongly typed Word m_val to other strong enum types.
SystemCallItem(const ItemType type, const std::string_view short_name={}, const std::string_view long_name={})
Constructs a new SystemCallItem.
Base class for traced processes.
std::string str() const override
Returns a human readable string representation of the item.
void processValue(const Tracee &) override
Processes the value stored in m_val acc. to the actual item type.
std::string str() const override
Returns a human readable string representation of the item.
void processValue(const Tracee &) override
Processes the value stored in m_val acc. to the actual item type.
void processValue(const Tracee &proc) override
Processes the value stored in m_val acc. to the actual item type.
std::string str() const override
Returns a human readable string representation of the item.
ItemType
Basic type of a SystemCallItem.
@ PARAM_IN
An input parameter to the system call.