Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

heo07.h File Reference


Detailed Description

Routines for Creating and managing Threads,Mutex and Semaphores. AuthorBurkhard Diesing.

Author:
JoergM area Multithreading Runtime API
See also:
Routines are system independend. Including heo07.h or geo07.h does not force to include system specific header files.

Definition in file heo07.h.

#include "gsp00.h"
#include "geo07.h"

Go to the source code of this file.

Semaphore



#define SYNCHRONIZED_EO07(_m)
void sqlcreatesem (teo07_ThreadSemaphore *sem, tsp00_Int4 initval, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 Create a thread global semaphore.
void sqldestroysem (teo07_ThreadSemaphore sem)
 Delete a semaphore if no longer used.
void sqlsignalsem (teo07_ThreadSemaphore sem)
 Signals the given semaphore, inceasing counter by 1.
void sqltimedwaitsem (teo07_ThreadSemaphore sem, tsp00_Int4 seconds, teo07_ThreadErr *err)
 Nonblocking wait on semaphore.
void sqlwaitsem (teo07_ThreadSemaphore sem)
 Blocking wait on semaphore.

Functions

Mutex


void sqlbeginmutex (teo07_Mutex *hMutex)
 Blocking version of entering a critical section.
void sqlcreatemutex (teo07_Mutex *hMutex)
 Creates a mutual exlusive (mutex) structure.
void sqldestroymutex (teo07_Mutex *hMutex)
 Destroyes a mutex structure.
void sqlendmutex (teo07_Mutex *hMutex)
 Leave a critical section.
int sqlissetmutex (teo07_Mutex *hMutex)
 Test whether critical section is entered.
tsp00_Int4 sqltrybeginmutex (teo07_Mutex *hMutex)
 Non blocking version of entering a critical section.
Thread


void sqlbeginthread (tsp00_Int4 stack_size_in_bytes, teo07_ThreadCallback proc, void *arg, tsp00_Int4 flags, teo07_Thread *pThread, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 Creates a thread.
void sqlbeginthread_on_own_stack (tsp00_Int4 stack_size_in_bytes, void *stack_start_address, teo07_ThreadCallback proc, void *arg, tsp00_Int4 flags, teo07_Thread *pThread, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 Creates a thread, but using thread stack from outside.
void sqlcancelthread (teo07_Thread thread, tsp00_Int4 returncode, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 Allows to cancel a specific thread.
void sqlendthread (tsp00_Int4 returncode)
 Allows a thread to terminate itself.
void sqlforgetthread (teo07_Thread thread)
 Detaches the given thread.
tsp00_Int4 sqlget_thread_min_stack ()
 Get the minimum thread stack size.
teo07_ThreadErr sqlgetmythreadpriority (tsp00_Int4 VAR_VALUE_REF pPriority)
 Return the current thread priority.
teo07_Thread sqlgetthread ()
 Returns the current thread structure, usable in subsequent calls.
teo07_ThreadId sqlgetthreadid ()
 Returned TID uniquely identifies this thread within process.
teo07_ThreadErr sqlgetthreadpriority (teo07_Thread thread, tsp00_Int4 VAR_VALUE_REF pPriority)
 Return the thread priority.
void sqlinit_multithreading (teo07_Thread *thread, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 This function initialize global data needed.
tsp00_Bool sqlIsThreadSuspended (teo07_Thread thread)
 Check if given thread has suspended itself.
void sqljointhread (teo07_Thread thread, tsp00_Int4 *status, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 Allows to join a formerly created thread.
void sqlkillthread (teo07_Thread thread, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 Allows to send a SIGTERM signal to a specific thread.
void sqlonce (tsp00_Int4 *initialized, teo07_ThreadCallback callback, void *arg)
 Allows to execute a function exactly once.
void sqlresumethread (teo07_Thread thread, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 Allows to resume a formerly suspended thread.
teo07_ThreadErr sqlsetmythreadpriority (tsp00_Int4 priority)
 Modify the current thread priority.
teo07_ThreadErr sqlsetthreadpriority (teo07_Thread thread, tsp00_Int4 priority)
 Modify the thread priority.
void sqlsigthread (teo07_Thread thread, tsp00_Int4 signal, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 Allows to send a given signal to a specific thread.
void sqlsuspendthread (teo07_Thread thread, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 Allows a thread to suspend itself.
int sqlthreadalive (teo07_Thread thread, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 Allows to check whether a thread is still running.
teo07_ThreadId sqlthreadid (teo07_Thread thread)
 Returned TID uniquely identifies the given thread within process.
void sqlyieldthread (void)
 Allows a thread to reschedule itself.
Local Storage


void sqlcreatetls (tsp00_Int4 *hKey, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 Allocates a Thread Local Storage key.
void sqldestroytls (tsp00_Int4 hKey, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 Frees a Thread Local Storage key.
void * sqlgettls (tsp00_Int4 hKey)
 Get the value for a given Thread Local Storage key.
void sqlsettls (tsp00_Int4 hKey, void *pObjPtr, tsp00_ErrTextc VAR_ARRAY_REF errtext, teo07_ThreadErr *err)
 Set the value for a given Thread Local Storage key.


Generated by  Doxygen 1.6.0   Back to index