btftoolchain
btf::OS Class Reference

Class for OS (EVENT) Events (see BTF Specification Chapter 2.3.5). More...

#include <os.h>

Public Types

enum class  Events { clear_event , set_event , wait_event , unknown }
 Possible types of OS events. More...
 

Public Member Functions

bool isWait (OS::Events e) const
 Checks, if the current OS event is wait_event. More...
 

Static Public Member Functions

static std::string eventToString (Events ev)
 Converts the enum Events into string. More...
 
static Events stringToEvent (const std::string &str)
 Converts a string into the enum Events. More...
 

Detailed Description

Class for OS (EVENT) Events (see BTF Specification Chapter 2.3.5).

OS-Events (EVENT) are objects provided by the operating system. They offer a possibility to
synchronize different processes. An OS-Event is always associated with a task, which ”owns”
the event.

Member Enumeration Documentation

◆ Events

enum btf::OS::Events
strong

Possible types of OS events.

Enumerator
clear_event 

The clear_event event indicates that a potentially set OS-Event (target) gets reset by the task owning this OS-Event.

set_event 

The set_event event indicates that an OS-Event (target) gets set by a process or a stimulus (source).

wait_event 

The wait_event event indicates that a task calls a system service to wait for an OS-Event.

unknown 

Default value.

Member Function Documentation

◆ eventToString()

std::string btf::OS::eventToString ( Events  ev)
static

Converts the enum Events into string.

Parameters
[in]evEvents enum that will be converted.
Returns
String if Events type is valid, else a fatal error is triggered.
Here is the caller graph for this function:

◆ isWait()

bool btf::OS::isWait ( OS::Events  e) const

Checks, if the current OS event is wait_event.

Parameters
[in]eOS event that is checked.
Returns
True if the OS event is the wait_event, else false.

◆ stringToEvent()

OS::Events btf::OS::stringToEvent ( const std::string &  str)
static

Converts a string into the enum Events.

Parameters
[in]strString that will be converted.
Returns
Events enum.
Here is the caller graph for this function:

The documentation for this class was generated from the following files: