23 #ifndef OTF2_OPENMP_LOCKS_H
24 #define OTF2_OPENMP_LOCKS_H
64 struct OTF2_LockObject
71 otf2_openmp_lock_create(
void* userData,
79 *lock = (
OTF2_Lock )malloc(
sizeof( **lock ) );
85 omp_init_lock( &( *lock )->lock );
92 otf2_openmp_lock_destroy(
void* userData,
100 omp_destroy_lock( &lock->lock );
107 otf2_openmp_lock_lock(
void* userData,
115 omp_set_lock( &lock->lock );
122 otf2_openmp_lock_unlock(
void* userData,
130 omp_unset_lock( &lock->lock );
139 otf2_openmp_lock_create,
140 otf2_openmp_lock_destroy,
141 otf2_openmp_lock_lock,
142 otf2_openmp_lock_unlock
157 &otf2_openmp_locking_callbacks,
173 &otf2_openmp_locking_callbacks,
static OTF2_ErrorCode OTF2_OpenMP_Reader_SetLockingCallbacks(OTF2_Reader *reader)
Register callbacks to use OpenMP locks for an OTF2 reader.
Record reading can continue.
Definition: OTF2_GeneralDefinitions.h:352
OTF2_ErrorCode OTF2_Archive_SetLockingCallbacks(OTF2_Archive *archive, const OTF2_LockingCallbacks *lockingCallbacks, void *lockingData)
Set the locking callbacks for the archive.
Main include file for applications using OTF2.
Definition: OTF2_ErrorCodes.h:231
OTF2_ErrorCode
Definition: OTF2_ErrorCodes.h:54
OTF2_CallbackCode
Return value to indicate that the record reading should be interrupted.
Definition: OTF2_GeneralDefinitions.h:349
struct OTF2_LockObject * OTF2_Lock
Opaque type for a locking object.
Definition: OTF2_Callbacks.h:552
Signaling an error in the callback.
Definition: OTF2_GeneralDefinitions.h:363
struct OTF2_Archive_struct OTF2_Archive
Keeps all meta-data for an OTF2 archive.
Definition: OTF2_Archive.h:220
struct OTF2_Reader_struct OTF2_Reader
Keeps all necessary information for the reader.
Definition: OTF2_Reader.h:193
Struct which holds all locking callbacks.
Definition: OTF2_Callbacks.h:643
static OTF2_ErrorCode OTF2_OpenMP_Archive_SetLockingCallbacks(OTF2_Archive *archive)
Register callbacks to use OpenMP locks for an OTF2 archive.
OTF2_ErrorCode OTF2_Reader_SetLockingCallbacks(OTF2_Reader *reader, const OTF2_LockingCallbacks *lockingCallbacks, void *lockingData)
Set the locking callbacks for the reader.