0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Static Public Member Functions | Static Private Attributes | List of all members
Hypertable::SshThreadsCallbacks Class Reference

Thread callbacks for libssh More...

#include <SshThreadsCallbacks.h>

Collaboration diagram for Hypertable::SshThreadsCallbacks:
Collaboration graph
[legend]

Static Public Member Functions

static int mutex_init (void **priv)
 Mutex initializaton callback. More...
 
static int mutex_destroy (void **lock)
 Mutex destroy callback. More...
 
static int mutex_lock (void **lock)
 Mutex lock callback. More...
 
static int mutex_unlock (void **lock)
 Mutex unlock callback. More...
 
static unsigned long thread_id ()
 Callback for obtaining current thread ID. More...
 
static struct
ssh_threads_callbacks_struct * 
get ()
 Gets libssh threads callbacks structure. More...
 

Static Private Attributes

static std::mutex ms_thread_id_mutex {}
 Mutex for serializing access to static data members More...
 
static unsigned long ms_thread_id_next {}
 Next thread ID. More...
 
static std::unordered_map
< std::thread::id, int > 
ms_thread_id_map {}
 Mapping from std::thread::id to unique thread ID number. More...
 
static struct
ssh_threads_callbacks_struct 
ms_callbacks
 libssh callbacks structure More...
 

Detailed Description

Thread callbacks for libssh

Definition at line 42 of file SshThreadsCallbacks.h.

Member Function Documentation

struct ssh_threads_callbacks_struct * SshThreadsCallbacks::get ( )
static

Gets libssh threads callbacks structure.

Allocates a ssh_threads_callbacks_struct structure with callback functions initialized to the ones defined in this class. The type member is set to "threads_cpp".

Returns
libssh threads callback structure.

Definition at line 81 of file SshThreadsCallbacks.cc.

int SshThreadsCallbacks::mutex_destroy ( void **  lock)
static

Mutex destroy callback.

Deallocates mutex object pointed to by *lock

Parameters
lockAddress of mutex pointer
Returns
0

Definition at line 54 of file SshThreadsCallbacks.cc.

int SshThreadsCallbacks::mutex_init ( void **  priv)
static

Mutex initializaton callback.

Allocates a mutex object and assigns to *priv

Parameters
privAddress of mutex pointer
Returns
0

Definition at line 49 of file SshThreadsCallbacks.cc.

int SshThreadsCallbacks::mutex_lock ( void **  lock)
static

Mutex lock callback.

Locks mutex object pointed to by *lock

Parameters
lockAddress of mutex pointer
Returns
0

Definition at line 59 of file SshThreadsCallbacks.cc.

int SshThreadsCallbacks::mutex_unlock ( void **  lock)
static

Mutex unlock callback.

Unlocks mutex object pointed to by *lock

Parameters
lockAddress of mutex pointer
Returns
0

Definition at line 64 of file SshThreadsCallbacks.cc.

unsigned long SshThreadsCallbacks::thread_id ( )
static

Callback for obtaining current thread ID.

Definition at line 70 of file SshThreadsCallbacks.cc.

Member Data Documentation

struct ssh_threads_callbacks_struct Hypertable::SshThreadsCallbacks::ms_callbacks
staticprivate

libssh callbacks structure

Definition at line 92 of file SshThreadsCallbacks.h.

unordered_map< thread::id, int > SshThreadsCallbacks::ms_thread_id_map {}
staticprivate

Mapping from std::thread::id to unique thread ID number.

Definition at line 89 of file SshThreadsCallbacks.h.

mutex SshThreadsCallbacks::ms_thread_id_mutex {}
staticprivate

Mutex for serializing access to static data members

Definition at line 83 of file SshThreadsCallbacks.h.

unsigned long SshThreadsCallbacks::ms_thread_id_next {}
staticprivate

Next thread ID.

Definition at line 86 of file SshThreadsCallbacks.h.


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