|
libclues
Linux C++ Tracing Library
|
Composite bit values used in val3 for futex() operation FUTEX_WAKE_OP.
More...
#include <futex.hxx>
Inheritance diagram for clues::item::FutexWakeOperation:Public Types | |
| enum class | Operation : uint32_t { SET = FUTEX_OP_SET , ADD = FUTEX_OP_ADD , OR = FUTEX_OP_OR , ANDN = FUTEX_OP_ANDN , XOR = FUTEX_OP_XOR } |
| Atomic operation to be carried out on futex value. More... | |
| enum class | Comparator : uint32_t { EQUAL = FUTEX_OP_CMP_EQ , UNEQUAL = FUTEX_OP_CMP_NE , LESS_THAN = FUTEX_OP_CMP_LT , LESS_EQUAL = FUTEX_OP_CMP_LE , GREATER_THAN = FUTEX_OP_CMP_GT , GREATER_EQUAL = FUTEX_OP_CMP_GE } |
Public Types inherited from clues::SystemCallItem | |
| enum class | Flag { DEFER_FILL = 1 << 0 } |
| using | Flags = cosmos::BitMask<Flag> |
Public Member Functions | |
| 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. | |
| auto | operation () const |
| auto | comparator () const |
| bool | doShiftArg () const |
| uint32_t | oparg () const |
| uint32_t | cmparg () const |
Public Member Functions inherited from clues::item::ValueInParameter | |
| ValueInParameter (const std::string_view short_name, const std::string_view long_name={}) | |
Public Member Functions inherited from clues::item::ValueParameter | |
| ValueParameter (const ItemType type, const std::string_view short_name, const std::string_view long_name={}) | |
Public Member Functions inherited from clues::SystemCallItem | |
| SystemCallItem (const ItemType type, const std::string_view short_name={}, const std::string_view long_name={}) | |
| Constructs a new SystemCallItem. | |
| auto | type () const |
| bool | isIn () const |
| bool | isOut () const |
| bool | isInOut () const |
| bool | isReturnValue () const |
| void | fill (const Tracee &proc, const Word word) |
| Fills the item from the given register data. | |
| bool | needsUpdate () const |
| Returns whether the item needs to be updated after the system call is finished. | |
| std::string_view | shortName () const |
| Returns the friendly short name for this item. | |
| std::string_view | longName () const |
| Returns the friendly long name for this item, if available, else the short name. | |
| auto | hasLongName () const |
| bool | isZero () const |
| Returns whether the parameter is set to 0 / NULL. | |
| Word | value () const |
| Returns the currently stored raw value of the item. | |
| template<typename OTHER> | |
| OTHER | valueAs () const |
Helper to cast the strongly typed Word m_val to other strong enum types. | |
| ForeignPtr | asPtr () const |
| Flags | flags () const |
| bool | deferFill () const |
Protected Attributes | |
| Operation | m_op = Operation{0} |
| Comparator | m_comp = Comparator{0} |
| bool | m_shift_arg = false |
! Whether oparg is additionally replaced by 1 << oparg. | |
| uint32_t | m_oparg = 0 |
! The operation argument used in uaddr2 OP oparg. | |
| uint32_t | m_cmparg = 0 |
! The comparison argument used in oldval CMP cmparg. | |
Protected Attributes inherited from clues::SystemCallItem | |
| const SystemCall * | m_call = nullptr |
| The system call context this item part of. | |
| const ItemType | m_type |
| The type of item. | |
| std::string_view | m_short_name |
| A human readable short name for the item, should be one word only. | |
| std::string_view | m_long_name |
| A human readable longer name for the item. | |
| Word | m_val |
| The raw register value for the item. | |
| Flags | m_flags |
| Flags influencing the processing of the item. | |
Additional Inherited Members | |
Protected Member Functions inherited from clues::SystemCallItem | |
| virtual void | updateData (const Tracee &t) |
| Called upon exit of the system call to update possible out parameters. | |
| void | setSystemCall (const SystemCall &sc) |
| Sets the system call context this item is a part of. | |
Composite bit values used in val3 for futex() operation FUTEX_WAKE_OP.
This parameter defines scalar operations and comparisons to be carried out in the context of FutexOperation::Command::WAKE_OP.
The futex value found at uaddr2 is modified based on the given Operation and the result is written back to the futex in an atomic fashion.
The waiters blocked on uaddr are woken up.
The original futex value observed at uaddr2 is additionally compared based on the given Comparator. If the comparison yields true then a number of waiters blocked on uaddr2 are also woken up.
The information to the uaddr2 modification and comparison is stored in a uint32_t passed to the futex system call, whose details are made available in this type..
|
strong |
| Enumerator | |
|---|---|
| EQUAL |
|
| UNEQUAL |
|
| LESS_THAN |
|
| LESS_EQUAL |
|
| GREATER_THAN |
|
| GREATER_EQUAL |
|
Definition at line 102 of file futex.hxx.
|
strong |
Atomic operation to be carried out on futex value.
| Enumerator | |
|---|---|
| SET | assignment |
| ADD | addition |
| OR | bitwise or |
| ANDN | bitwise and of negated value |
| XOR | bitwise XOR |
Definition at line 94 of file futex.hxx.
|
inlineexplicit |
|
inline |
Definition at line 137 of file futex.hxx.
|
inline |
|
inline |
Definition at line 129 of file futex.hxx.
|
inline |
Definition at line 133 of file futex.hxx.
|
inline |
|
overridevirtual |
Processes the value stored in m_val acc. to the actual item type.
This function is called for all parameter types upon entry to a system call, and for ItemType::RETVAL upon exit from a system call.
For parameters of ItemType::PARAM_OUT this callback can be used to reset any stored data to be filled in later when updateData() is called.
Reimplemented from clues::SystemCallItem.
Definition at line 86 of file futex.cxx.
|
overridevirtual |
Returns a human readable string representation of the item.
This member function should be specialized in derived classes to output the item's data in a fashion suitable for the concrete item type.
Reimplemented from clues::SystemCallItem.
|
protected |
|
protected |
|
protected |
|
protected |