Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Namespaces | Classes | Functions
Burger::Unix Namespace Reference

Namespaces

namespace  DBus
 Shim to call the posix/unix dbus library.
 

Classes

class  DBusInstance
 Handler for a dbus session. More...
 

Functions

eError BURGER_API nanosleep_delay (timespec *pInput, uint_t bAlertable=FALSE) BURGER_NOEXCEPT
 Sleep for a specific duration with nanosleep()
 
int pthread_setname_np (uintptr_t target_thread, const char *name)
 Shim for pthread_setname_np()
 
uint_t BURGER_API has_dbus (void) BURGER_NOEXCEPT
 Test if dbus is present.
 

Function Documentation

◆ has_dbus()

uint_t BURGER_API Burger::Unix::has_dbus ( void )
extern

Test if dbus is present.


Try to load the dbus library and return if it succeed or failed.

A side effect of this function is that it will call DBus::init() so dbus will be initialized after this call.

Note
This function can be called multiple times. It will only load the library once.
See also
DBus::init()

◆ nanosleep_delay()

Burger::eError BURGER_API Burger::Unix::nanosleep_delay ( timespec * pInput,
uint_t bAlertable = FALSE )
extern

Sleep for a specific duration with nanosleep()


nanosleep() can be interrupted and the delay aborted. If this is not desired, then leave the parameter bAlertable set to FALSE. If bAlertable is set to TRUE, then interrupt aborts is allowed.

Parameters
pInputPointer to an initialized timespec with the desired delay.
bAlertableTRUE if interruption is allowed
Returns
kErrorNone on no error, kErrorCancelled if cancelled

◆ pthread_setname_np()

int Burger::Unix::pthread_setname_np ( uintptr_t target_thread,
const char * name )
extern

Shim for pthread_setname_np()


Check if pthread_setname_np() is available, and if so, dispatch the call to the actual function. If the function is not available, always return EPERM.

Note
On Darwin platforms, the target_thread parameter doesn't exist. This is Darwin's fault.
Parameters
target_threadpthread_t of the thread to name (Not available on Darwin)
namePointer to a "C" for the new thread name
Returns
Error code, or zero, or EPERM if function not found