libnx  v4.7.0
Data Structures | Functions
levent.h File Reference

Light event synchronization primitive [4.0.0+]. More...

#include "../types.h"
#include "../result.h"
#include "svc.h"

Go to the source code of this file.

Data Structures

struct  LEvent
 User-mode light event structure. More...
 

Functions

static void leventInit (LEvent *le, bool signaled, bool autoclear)
 Initializes a user-mode light event. More...
 
bool leventWait (LEvent *le, u64 timeout_ns)
 Waits on a user-mode light event. More...
 
bool leventTryWait (LEvent *le)
 Polls a user-mode light event. More...
 
void leventSignal (LEvent *le)
 Signals a user-mode light event. More...
 
void leventClear (LEvent *le)
 Clears a user-mode light event. More...
 

Detailed Description

Light event synchronization primitive [4.0.0+].

Author
fincs

Function Documentation

◆ leventClear()

void leventClear ( LEvent le)

Clears a user-mode light event.

Parameters
[in]lePointer to LEvent structure.

◆ leventInit()

static void leventInit ( LEvent le,
bool  signaled,
bool  autoclear 
)
inlinestatic

Initializes a user-mode light event.

Parameters
[out]lePointer to LEvent structure.
[in]signaledWhether the event starts off in signaled state.
[in]autoclearAutoclear flag.

◆ leventSignal()

void leventSignal ( LEvent le)

Signals a user-mode light event.

Parameters
[in]lePointer to LEvent structure.

◆ leventTryWait()

bool leventTryWait ( LEvent le)

Polls a user-mode light event.

Parameters
[in]lePointer to LEvent structure.
Returns
true if event is signaled, false otherwise.

◆ leventWait()

bool leventWait ( LEvent le,
u64  timeout_ns 
)

Waits on a user-mode light event.

Parameters
[in]lePointer to LEvent structure.
[in]timeout_nsTimeout in nanoseconds (pass UINT64_MAX to wait indefinitely).
Returns
true if wait succeeded, false if wait timed out.