23 #ifndef OTF2_OPENMP_LOCKS_H
24 #define OTF2_OPENMP_LOCKS_H
67 struct OTF2_LockObject
74 otf2_openmp_lock_create(
void* userData,
82 *lock = (
OTF2_Lock )malloc(
sizeof( **lock ) );
88 omp_init_lock( &( *lock )->lock );
95 otf2_openmp_lock_destroy(
void* userData,
103 omp_destroy_lock( &lock->lock );
110 otf2_openmp_lock_lock(
void* userData,
118 omp_set_lock( &lock->lock );
125 otf2_openmp_lock_unlock(
void* userData,
133 omp_unset_lock( &lock->lock );
142 otf2_openmp_lock_create,
143 otf2_openmp_lock_destroy,
144 otf2_openmp_lock_lock,
145 otf2_openmp_lock_unlock
160 &otf2_openmp_locking_callbacks,
176 &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:230
OTF2_ErrorCode
Definition: OTF2_ErrorCodes.h:53
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.