globus_thread.h - Online Linux Manual PageSection : 3
Updated : Tue Jan 26 2021
Source : Version 18.9
Note : globus_common

NAMEglobus_thread.h − Globus Threading Abstraction​.

SYNOPSIS
#include 'globus_module​.h'
#include 'globus_time​.h'
#include <unistd​.h>

Data Structuresunion globus_thread_t
Thread ID​.
union globus_threadattr_t
Thread attributes​.
union globus_mutex_t
Mutex​.
union globus_cond_t
Condition variable​.
union globus_mutexattr_t
Mutex attribute​.
union globus_condattr_t
Condition variable attribute​.
union globus_thread_key_t
Thread-specific data key​.
union globus_thread_once_t
Thread once structure​.

Macros#define GLOBUS_THREAD_ONCE_INIT { ​.none = 0 }
Thread once initializer value​.
#define GLOBUS_THREAD_CANCEL_DISABLE 0
Disable thread cancellation value​.
#define GLOBUS_THREAD_CANCEL_ENABLE 1
Enable thread cancellation value​.
#define GLOBUS_THREAD_MODULE (&globus_i_thread_module)
Thread Module​.

Typedefstypedef void(* globus_thread_key_destructor_func_t) (void *value)
Thread-specific data destructor​.

Functionsint globus_thread_set_model (const char *model)
Select threading model for an application​.
int globus_mutex_init (globus_mutex_t *mutex, globus_mutexattr_t *attr)
Initialize a mutex​.
int globus_mutex_destroy (globus_mutex_t *mutex)
Destroy a mutex​.
int globus_mutex_lock (globus_mutex_t *mutex)
Lock a mutex​.
int globus_mutex_unlock (globus_mutex_t *mutex)
Unlock a mutex​.
int globus_mutex_trylock (globus_mutex_t *mutex)
Lock a mutex if it is not locked​.
int globus_cond_init (globus_cond_t *cond, globus_condattr_t *attr)
"Initializeaconditionvariable
The globus_cond_init() function creates a condition variable that can be used for event signalling between threads​. " int globus_cond_destroy (globus_cond_t *cond)
Destroy a condition variable​.
int globus_cond_wait (globus_cond_t *cond, globus_mutex_t *mutex)
Wait for a condition to be signalled​.
int globus_cond_timedwait (globus_cond_t *cond, globus_mutex_t *mutex, globus_abstime_t *abstime)
Wait for a condition to be signalled​.
int globus_cond_signal (globus_cond_t *cond)
Signal a condition to a thread​.
int globus_cond_broadcast (globus_cond_t *cond)
Signal a condition to multiple threads​.
int globus_condattr_init (globus_condattr_t *cond_attr)
Initialize a condition variable attribute​.
int globus_condattr_destroy (globus_condattr_t *cond_attr)
Destroy a condition attribute​.
int globus_condattr_setspace (globus_condattr_t *cond_attr, int space)
"Setcallbackspaceassociatedwithaconditionvariableattribute
The globus_condattr_setspace() function sets the callback space to use with condition variables created with this attribute​. Callback spaces are used to control how callbacks are issued to different threads​. See Callback Spaces for more information on callback spaces​. " int globus_condattr_getspace (globus_condattr_t *cond_attr, int *space)
"Getcallbackspaceassociatedwithaconditionvariableattribute
The globus_condattr_getspace() function copies the value of the callback space associated with a condition variable attribute to the integer pointed to by the space parameter​. " int globus_thread_create (globus_thread_t *thread, globus_threadattr_t *attr, globus_thread_func_t func, void *user_arg)
Create a new thread​.
void * globus_thread_getspecific (globus_thread_key_t key)
Get a thread-specific data value​.
int globus_thread_setspecific (globus_thread_key_t key, void *value)
Set a thread-specific data value​.
int globus_thread_key_create (globus_thread_key_t *key, globus_thread_key_destructor_func_t func)
Create a key for thread-specific storage​.
int globus_thread_key_delete (globus_thread_key_t key)
Delete a thread-local storage key​.
int globus_thread_once (globus_thread_once_t *once, void(*init_routine)(void))
Execute a function one time​.
void globus_thread_yield (void)
Yield execution to another thread​.
int globus_thread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask)
Modify the current thread's signal mask​.
int globus_thread_kill (globus_thread_t thread, int sig)
Send a signal to a thread​.
void globus_thread_exit (void *value)
Terminate the current thread​.
globus_thread_t globus_thread_self (void)
Determine the current thread's ID​.
int globus_thread_equal (globus_thread_t thread1, globus_thread_t thread2)
Check whether thread identifiers match​.
globus_bool_t globus_i_am_only_thread (void)
Determine if threads are supported​.
globus_bool_t globus_thread_preemptive_threads (void)
Indicate whether the active thread model supports preemption​.
void * globus_thread_cancellable_func (void *(*func)(void *), void *arg, void(*cleanup_func)(void *), void *cleanup_arg, globus_bool_t execute_cleanup)
Execute a function with thread cleanup in case of cancellation​.
int globus_thread_cancel (globus_thread_t thr)
Cancel a thread​.
void globus_thread_testcancel (void)
Thread cancellation point​.
int globus_thread_setcancelstate (int state, int *oldstate)
Set the thread's cancellable state​.

Detailed DescriptionGlobus Threading Abstraction​. Globus threads package which can work with either pthreads or without threads, depending on runtime configuration

AuthorGenerated automatically by Doxygen for globus_common from the source code​.
0
Johanes Gumabo
Data Size   :   24,691 byte
man-GLOBUS_THREAD_MODULE.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 165,193
Visitor ID   :     :  
Visitor IP   :   18.188.195.90   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.