Documentation

Generated on Thu Aug 31 00:02:34 2006

 

tls.cpp File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Defines

#define TLS_CPP

Functions

static int gcry_pthread_mutex_init (void **priv)
static int gcry_pthread_mutex_destroy (void **lock)
static int gcry_pthread_mutex_lock (void **lock)
static int gcry_pthread_mutex_unlock (void **lock)

Variables

static struct gcry_thread_cbs gcry_threads_pthread

Define Documentation

#define TLS_CPP

Definition at line 13 of file tls.cpp.


Function Documentation

static int gcry_pthread_mutex_destroy ( void **  lock  )  [static]

Definition at line 33 of file tls.cpp.

00034 {
00035   pthread_mutex_t *temp_lock = (static_cast<pthread_mutex_t*>(*lock));
00036   int err = pthread_mutex_destroy(temp_lock);
00037   delete temp_lock;
00038   return err;
00039 }

static int gcry_pthread_mutex_init ( void **  priv  )  [static]

Definition at line 16 of file tls.cpp.

00017 {
00018   int err = 0;
00019   pthread_mutex_t *lock = new pthread_mutex_t;
00020   if (!lock)
00021     err = ENOMEM;
00022   if (!err)
00023   {
00024     err = pthread_mutex_init (lock, NULL);
00025     if (err)
00026       delete lock;
00027     else
00028       *priv = lock;
00029   }
00030   return err;
00031 }

static int gcry_pthread_mutex_lock ( void **  lock  )  [static]

Definition at line 41 of file tls.cpp.

00042 {
00043   pthread_mutex_t *temp_lock = (static_cast<pthread_mutex_t*>(*lock));
00044   return pthread_mutex_lock(temp_lock);
00045 }

static int gcry_pthread_mutex_unlock ( void **  lock  )  [static]

Definition at line 47 of file tls.cpp.

00048 {
00049   pthread_mutex_t *temp_lock = (static_cast<pthread_mutex_t*>(*lock));
00050   return pthread_mutex_unlock(temp_lock);
00051 }


Variable Documentation

struct gcry_thread_cbs gcry_threads_pthread [static]

Initial value:

Definition at line 53 of file tls.cpp.

Referenced by main().