OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Typedefs | Functions
OTF_FileManager.h File Reference
File Manager Interface

Manages file handles. More...

`#include "OTF_inttypes.h"`

Go to the source code of this file.

## Typedefs
typedef struct struct_OTF_File | OTF_File
typedef struct struct_OTF_FileManager | OTF_FileManager
| file manager object

## Functions
OTF_FileManager * | OTF_FileManager_open (uint32_t number)
| Generates a new file manager with a maximum number of files that are allowed to be open simultaneously. More...
void | OTF_FileManager_close (OTF_FileManager *m)
| Closes the file manager.
uint32_t | OTF_FileManager_getCount (OTF_FileManager *m)
| Returns the number of files currently open. More...
uint32_t | OTF_FileManager_getNumber (OTF_FileManager *m)
| Returns the numbner of files allowed to be open simultaneously. More...
uint32_t | OTF_FileManager_setNumber (OTF_FileManager *m, uint32_t number)
| Sets the number of files allowed to be open simultaneously. More...
int | OTF_FileManager_guaranteeFile (OTF_FileManager *m)
| Ensure there is a free file handle available after this call. More...
int | OTF_FileManager_registerFile (OTF_FileManager *m, OTF_File *file)
| Registers the 'file' as open. More...
int | OTF_FileManager_touchFile (OTF_FileManager *m, OTF_File *file)
| Marks currently opened 'file' as used which is important for the scheduling strategy, i.e. More...
int | OTF_FileManager_suspendFile (OTF_FileManager *m, OTF_File *file)
| Suspend an open file explicitly. More...

## Detailed Description

Manages file handles.

i.e. Opens, closes and suspends files, if there are not enough filehandles available.

## Function Documentation

uint32_t OTF_FileManager_getCount | ( | OTF_FileManager * | m | ) |

Returns the number of files currently open.

References struct_OTF_FileManager::count.

uint32_t OTF_FileManager_getNumber | ( | OTF_FileManager * | m | ) |

Returns the numbner of files allowed to be open simultaneously.

References struct_OTF_FileManager::number.

int OTF_FileManager_guaranteeFile | ( | OTF_FileManager * | m | ) |

Ensure there is a free file handle available after this call.

return 1 on success, 0 otherwise (which is not supposed to happen)

Ensure there is a free file handle available after this call.

return 1 on success, 0 otherwise (which is not supposed to happen)

References struct_OTF_FileManager::count, struct_OTF_FileManager::list, struct_OTF_FileManager::number, and OTF_FileManager_suspendFile().

Referenced by OTF_File_revive().

int OTF_FileManager_registerFile | ( | OTF_FileManager * | m,
|  | OTF_File * | file
| ) |  |

Registers the 'file' as open.

Return 1 on success, 0 otherwise.

Registers the 'file' as open.

return 1 on success, 0 otherwise.

References struct_OTF_FileManager::count, struct_OTF_FileManager::list, struct_OTF_FileManager::number, and OTF_File_status().

Referenced by OTF_File_revive().

uint32_t OTF_FileManager_setNumber | ( | OTF_FileManager * | m,
|  | uint32_t | number
| ) |  |

Sets the number of files allowed to be open simultaneously.

References struct_OTF_FileManager::number.

Referenced by OTF_FileManager_open().

int OTF_FileManager_suspendFile | ( | OTF_FileManager * | m,
|  | OTF_File * | file
| ) |  |

Suspend an open file explicitly.

this may be called externaly or internally. Return 1 on success, 0 otherwise.

Suspend an open file explicitly.

this may be called externaly or internally. return 1 on success, 0 otherwise.

References struct_OTF_FileManager::count, struct_OTF_FileManager::list, OTF_File_status(), and OTF_File_suspend().

Referenced by OTF_File_close(), and OTF_FileManager_guaranteeFile().

int OTF_FileManager_touchFile | ( | OTF_FileManager * | m,
|  | OTF_File * | file
| ) |  |

Marks currently opened 'file' as used which is important for the scheduling strategy, i.e.

the internal decision which file to suspend next. return 1 on success or 0 for an suspended file.

Marks currently opened 'file' as used which is important for the scheduling strategy, i.e.

the internal decision which file to suspend next. return 1 on success or 0 for an suspended file.

References struct_OTF_FileManager::list, and OTF_File_status().

Referenced by OTF_File_revive().