dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::event< kernel > Class Reference

kernel triggerable user space event: signalled when the kernel triggers it, or its callback called instead - on the thread of the kernel's async notifications More...

#include <dx_sync.h>

Inheritance diagram for dx::event< kernel >:
Collaboration diagram for dx::event< kernel >:

Public Types

typedef abstract::event super

Public Member Functions

 event()= default
 event(bool signalled= false)
 event(const std::string& name, bool signalled= false)
 event(std::function<void()>&& callback)
 event(std::function<void()>&& callback)
virtual void free() noexcept
super& initialize(bool signalled= false) override
super& initialize(const std::string& name, bool signalled= false) override
 operator const os_event() const noexcept
 operator os_event() noexcept
 operator ::HANDLE() const noexcept
super& reset(uint64_t= 0) override
super& signal(uint64_t= 1) override
uint64_t signalled() const
super& wait(bool reset= false) override
template<typename rep_t, typename period_t>
bool wait(const std::chrono::duration<rep_t, period_t>& timeout, bool reset= false)
 waits the duration at most, as event<user>: true signalled, false timed out
 ~event() override
 the callback's wait gone, its calls run out, before resource closes the event
virtual ~event()= default

Static Public Member Functions

static void wait(::HANDLE handle, int64_t timeout= 0)

Static Public Attributes

static constexpr auto scope{kernel}

Protected Attributes

::HANDLE process{::GetCurrentProcess()}

Detailed Description

kernel triggerable user space event: signalled when the kernel triggers it, or its callback called instead - on the thread of the kernel's async notifications

an event the OS owns: a kernel object, waitable together with other handles and reachable by name across processes - what a driver or another process signals; or its callback called each time on the thread pool instead

Member Typedef Documentation

◆ super

Constructor & Destructor Documentation

◆ event() [1/5]

dx::event<kernel>::event()
default
Here is the caller graph for this function:

◆ event() [2/5]

dx::event<kernel>::event(std::function<void()>&& callback)
inlineexplicit

◆ ~event() [1/2]

virtual dx::event<kernel>::~event()
virtualdefault

Reimplemented from dx::abstract::event.

◆ event() [3/5]

dx::event<kernel>::event(bool signalled= false)
inlineexplicit
Here is the call graph for this function:

◆ event() [4/5]

dx::event<kernel>::event(const std::string& name, bool signalled= false)
inlineexplicit
Here is the call graph for this function:

◆ event() [5/5]

dx::event<kernel>::event(std::function<void()>&& callback)
inlineexplicit
Here is the call graph for this function:

◆ ~event() [2/2]

dx::event<kernel>::~event()
inlineoverridevirtual

the callback's wait gone, its calls run out, before resource closes the event

Reimplemented from dx::abstract::event.

Member Function Documentation

◆ free()

◆ initialize() [1/2]

super& dx::event<kernel>::initialize(bool signalled= false)
inlineoverridevirtual

Reimplemented from dx::abstract::event.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize() [2/2]

super& dx::event<kernel>::initialize(const std::string& name, bool signalled= false)
inlineoverridevirtual

Reimplemented from dx::abstract::event.

Here is the call graph for this function:

◆ operator const os_event()

template<::HANDLE invalid_t= INVALID_HANDLE_VALUE>
dx::resource<invalid_t>::operator const os_event() const
inlinenoexceptinherited

◆ operator os_event()

dx::event<kernel>::operator os_event()
inlinenoexcept

◆ operator ::HANDLE()

template<::HANDLE invalid_t= INVALID_HANDLE_VALUE>
dx::resource<invalid_t>::operator ::HANDLE() const
inlinenoexceptinherited
Here is the caller graph for this function:

◆ reset()

super& dx::event<kernel>::reset(uint64_t= 0)
inlineoverridevirtual

Implements dx::abstract::event.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ signal()

super& dx::event<kernel>::signal(uint64_t= 1)
inlineoverridevirtual

Implements dx::abstract::event.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ signalled()

uint64_t dx::event<user>::signalled() const
inlineinherited
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wait() [1/3]

void dx::event<kernel>::wait(::HANDLE handle, int64_t timeout= 0)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wait() [2/3]

super& dx::event<kernel>::wait(bool reset= false)
inlineoverridevirtual

Implements dx::abstract::event.

Here is the call graph for this function:

◆ wait() [3/3]

template<typename rep_t, typename period_t>
bool dx::event<kernel>::wait(const std::chrono::duration<rep_t, period_t>& timeout, bool reset= false)
inline

waits the duration at most, as event<user>: true signalled, false timed out

Here is the call graph for this function:

Member Data Documentation

◆ process

template<::HANDLE invalid_t= INVALID_HANDLE_VALUE>
::HANDLE dx::resource<invalid_t>::process{::GetCurrentProcess()}
protectedinherited

◆ scope

constexpr auto dx::event<kernel>::scope{kernel}
staticconstexpr

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