![]() |
1.2.1 (revision 3238)
|
00001 /* 00002 * This file is part of the Score-P software (http://www.score-p.org) 00003 * 00004 * Copyright (c) 2009-2012, 00005 * RWTH Aachen University, Germany 00006 * Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany 00007 * Technische Universitaet Dresden, Germany 00008 * University of Oregon, Eugene, USA 00009 * Forschungszentrum Juelich GmbH, Germany 00010 * German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany 00011 * Technische Universitaet Muenchen, Germany 00012 * 00013 * See the COPYING file in the package base directory for details. 00014 * 00015 */ 00016 00017 00018 #ifndef OTF2_CALLBACKS_H 00019 #define OTF2_CALLBACKS_H 00020 00021 00033 #include <stdio.h> 00034 #ifndef __cplusplus 00035 #include <stdbool.h> 00036 #endif 00037 00038 00039 #include <otf2/OTF2_ErrorCodes.h> 00040 00041 00042 #include <otf2/OTF2_GeneralDefinitions.h> 00043 00044 00045 #ifdef __cplusplus 00046 extern "C" { 00047 #endif /* __cplusplus */ 00048 00049 00075 typedef OTF2_FlushType 00076 ( *OTF2_PreFlushCallback )( void* userData, 00077 OTF2_FileType fileType, 00078 OTF2_LocationRef location, 00079 void* callerData, 00080 bool final ); 00081 00082 00098 typedef OTF2_TimeStamp 00099 ( *OTF2_PostFlushCallback )( void* userData, 00100 OTF2_FileType fileType, 00101 OTF2_LocationRef location ); 00102 00103 00111 typedef struct OTF2_FlushCallbacks 00112 { 00114 OTF2_PreFlushCallback otf2_pre_flush; 00116 OTF2_PostFlushCallback otf2_post_flush; 00117 } OTF2_FlushCallbacks; 00118 00119 00143 typedef void* 00144 ( *OTF2_MemoryAllocate )( void* userData, 00145 OTF2_FileType fileType, 00146 OTF2_LocationRef location, 00147 void** perBufferData, 00148 uint64_t chunkSize ); 00149 00150 00174 typedef void 00175 ( *OTF2_MemoryFreeAll )( void* userData, 00176 OTF2_FileType fileType, 00177 OTF2_LocationRef location, 00178 void** perBufferData, 00179 bool final ); 00180 00181 00186 typedef struct OTF2_MemoryCallbacks 00187 { 00189 OTF2_MemoryAllocate otf2_allocate; 00191 OTF2_MemoryFreeAll otf2_free_all; 00192 } OTF2_MemoryCallbacks; 00193 00194 00213 typedef int 00214 ( *OTF2_FileSionOpen )( void* userData, 00215 OTF2_FileType fileType, 00216 OTF2_LocationRef location, 00217 const char* fname, 00218 const char* fileMode, 00219 long long int* chunkSize, 00220 int* fsblkSize, 00221 FILE** filePtr ); 00222 00223 00235 typedef int 00236 ( *OTF2_FileSionClose )( void* userData, 00237 OTF2_FileType fileType, 00238 OTF2_LocationRef location, 00239 int sid ); 00240 00241 00257 typedef OTF2_ErrorCode 00258 ( *OTF2_FileSionGetRank )( void* userData, 00259 OTF2_FileType fileType, 00260 OTF2_LocationRef location, 00261 int32_t* rank ); 00262 00263 00268 typedef struct OTF2_FileSionCallbacks 00269 { 00271 OTF2_FileSionOpen otf2_file_sion_open; 00273 OTF2_FileSionClose otf2_file_sion_close; 00275 OTF2_FileSionGetRank otf2_file_sion_get_rank; 00276 } OTF2_FileSionCallbacks; 00277 00278 00279 #ifdef __cplusplus 00280 } 00281 #endif /* __cplusplus */ 00282 00283 00284 #endif /* !OTF2_CALLBACKS_H */