SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
sion_fd.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** SIONLIB http://www.fz-juelich.de/jsc/sionlib **
3 *****************************************************************************
4 ** Copyright (c) 2008-2019 **
5 ** Forschungszentrum Juelich, Juelich Supercomputing Centre **
6 ** **
7 ** See the file COPYRIGHT in the package base directory for details **
8 ****************************************************************************/
9 
14 #ifndef SION_SION_FD_H
15 #define SION_SION_FD_H
16 
17 #define SION_FILEDESCRIPTOR 11
18 #define SION_APIDESCRIPTOR 12
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 int _sion_newvcd(void *data, int type);
25 int _sion_freevcd(int sid);
26 void *_sion_vcdtovcon(int sid);
27 int _sion_vcdtype(int sid);
28 int _sion_reassignvcd(int sid, void *data, int type);
29 
30  /* SION_FD INTERNAL */
31 #define SION_FD_CHUNK 2
32 struct _sion_fd {
33  int state; /* 0: fresh, 1: in use, 2: used before, now free */
34  int type;
35  void *data;
36 };
37 
38 typedef struct _sion_fddata sion_fddata;
39 
40 int _sion_new_fd(sion_fddata *fdd, void *data, int type);
41 int _sion_set_fd(sion_fddata *fdd, int fd, void *data,
42  int type, char *text);
43 void *_sion_fd2ptr(sion_fddata *fdd, int fd);
44 int _sion_fd2type(sion_fddata *fdd, int fd, char *text);
45 int _sion_ptr2fd(sion_fddata *fdd, void *ptr, char *text);
46 int _sion_free_fd(sion_fddata *fdd, int fd, char *text);
47 int _sion_reassign_fd(sion_fddata *fdd, int fd, void *data, int type, char *text);
48 int _sion_fd_size(sion_fddata *fdd);
49 
50 #ifdef __cplusplus
51 }
52 #endif
53 
54 #endif
int _sion_reassignvcd(int sid, void *data, int type)
Definition: sion_fd.c:63
int _sion_free_fd(sion_fddata *fdd, int fd, char *text)
Definition: sion_fd.c:213
int _sion_ptr2fd(sion_fddata *fdd, void *ptr, char *text)
Definition: sion_fd.c:289
void * _sion_vcdtovcon(int sid)
Definition: sion_fd.c:53
int _sion_vcdtype(int sid)
Definition: sion_fd.c:58
int _sion_newvcd(void *data, int type)
Definition: sion_fd.c:43
int _sion_reassign_fd(sion_fddata *fdd, int fd, void *data, int type, char *text)
Definition: sion_fd.c:315
void * _sion_fd2ptr(sion_fddata *fdd, int fd)
Definition: sion_fd.c:247
int _sion_new_fd(sion_fddata *fdd, void *data, int type)
Definition: sion_fd.c:76
int _sion_fd_size(sion_fddata *fdd)
Definition: sion_fd.c:339
int _sion_freevcd(int sid)
Definition: sion_fd.c:48
int _sion_set_fd(sion_fddata *fdd, int fd, void *data, int type, char *text)
Definition: sion_fd.c:148
int _sion_fd2type(sion_fddata *fdd, int fd, char *text)
Definition: sion_fd.c:265