OCILIB (C and C++ Driver for Oracle)
4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
OcilibCApiHashTables
Oracle proposes a portable implementation of Mutex and Thread objects
OCILIB implements these OCI features for portable multi-threading support.
Mutexes are designed for mutual exclusion between thread in order to lock resources temporarily
Thread keys can be seen as process-wide variables that have a thread-specific values. It allows to create a unique key identified by a name (string) that can store values specific to each thread.
OCILIB exposes the types OCI_Mutex, OCI_Thread
Functions | |
OCI_SYM_PUBLIC OCI_Mutex *OCI_API | OCI_MutexCreate (void) |
Create a Mutex object. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_MutexFree (OCI_Mutex *mutex) |
Destroy a mutex object. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_MutexAcquire (OCI_Mutex *mutex) |
Acquire a mutex lock. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_MutexRelease (OCI_Mutex *mutex) |
Release a mutex lock. | |
OCI_SYM_PUBLIC OCI_Thread *OCI_API | OCI_ThreadCreate (void) |
Create a Thread object. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_ThreadFree (OCI_Thread *thread) |
Destroy a thread object. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_ThreadRun (OCI_Thread *thread, POCI_THREAD proc, void *arg) |
Execute the given routine within the given thread object. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_ThreadJoin (OCI_Thread *thread) |
Join the given thread. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_ThreadKeyCreate (const otext *name, POCI_THREADKEYDEST destfunc) |
Create a thread key object. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_ThreadKeySetValue (const otext *name, void *value) |
Set a thread key value. | |
OCI_SYM_PUBLIC void *OCI_API | OCI_ThreadKeyGetValue (const otext *name) |
Get a thread key value. | |
OCI_SYM_PUBLIC OCI_Mutex *OCI_API OCI_MutexCreate | ( | void | ) |
#include <api.h>
Create a Mutex object.
Referenced by ocilib::Mutex::Create().
OCI_SYM_PUBLIC boolean OCI_API OCI_MutexFree | ( | OCI_Mutex * | mutex | ) |
#include <api.h>
Destroy a mutex object.
mutex | - Mutex handle |
Referenced by ocilib::Mutex::Destroy().
OCI_SYM_PUBLIC boolean OCI_API OCI_MutexAcquire | ( | OCI_Mutex * | mutex | ) |
#include <api.h>
Acquire a mutex lock.
mutex | - Mutex handle |
Referenced by ocilib::Mutex::Acquire().
OCI_SYM_PUBLIC boolean OCI_API OCI_MutexRelease | ( | OCI_Mutex * | mutex | ) |
#include <api.h>
Release a mutex lock.
mutex | - Mutex handle |
Referenced by ocilib::Mutex::Release().
OCI_SYM_PUBLIC OCI_Thread *OCI_API OCI_ThreadCreate | ( | void | ) |
#include <api.h>
Create a Thread object.
Referenced by ocilib::Thread::Create().
OCI_SYM_PUBLIC boolean OCI_API OCI_ThreadFree | ( | OCI_Thread * | thread | ) |
#include <api.h>
Destroy a thread object.
thread | - Thread handle |
Referenced by ocilib::Thread::Destroy().
OCI_SYM_PUBLIC boolean OCI_API OCI_ThreadRun | ( | OCI_Thread * | thread, |
POCI_THREAD | proc, | ||
void * | arg | ||
) |
#include <api.h>
Execute the given routine within the given thread object.
thread | - Thread handle |
proc | - routine to execute |
arg | - parameter to pass to the routine |
Referenced by ocilib::Thread::Run().
OCI_SYM_PUBLIC boolean OCI_API OCI_ThreadJoin | ( | OCI_Thread * | thread | ) |
#include <api.h>
Join the given thread.
thread | - Thread handle |
Referenced by ocilib::Thread::Join().
OCI_SYM_PUBLIC boolean OCI_API OCI_ThreadKeyCreate | ( | const otext * | name, |
POCI_THREADKEYDEST | destfunc | ||
) |
#include <api.h>
Create a thread key object.
name | - Thread key name |
destfunc | - Thread key value destructor function |
Referenced by ocilib::ThreadKey::Create().
OCI_SYM_PUBLIC boolean OCI_API OCI_ThreadKeySetValue | ( | const otext * | name, |
void * | value | ||
) |
#include <api.h>
Set a thread key value.
name | - Thread key name |
value | - user value to set |
Referenced by ocilib::ThreadKey::SetValue().
OCI_SYM_PUBLIC void *OCI_API OCI_ThreadKeyGetValue | ( | const otext * | name | ) |
#include <api.h>
Get a thread key value.
name | - Thread key name |
Referenced by ocilib::ThreadKey::GetValue().