SIONlib  1.7.6
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
_sion_vcdtovcon
void * _sion_vcdtovcon(int sid)
Definition: sion_fd.c:52
_sion_reassign_fd
int _sion_reassign_fd(sion_fddata *fdd, int fd, void *data, int type, char *text)
Definition: sion_fd.c:314
_sion_freevcd
int _sion_freevcd(int sid)
Definition: sion_fd.c:47
_sion_fd_size
int _sion_fd_size(sion_fddata *fdd)
Definition: sion_fd.c:338
_sion_new_fd
int _sion_new_fd(sion_fddata *fdd, void *data, int type)
Definition: sion_fd.c:75
_sion_fd
Definition: sion_fd.h:31
_sion_reassignvcd
int _sion_reassignvcd(int sid, void *data, int type)
Definition: sion_fd.c:62
_sion_fd2type
int _sion_fd2type(sion_fddata *fdd, int fd, char *text)
Definition: sion_fd.c:264
_sion_set_fd
int _sion_set_fd(sion_fddata *fdd, int fd, void *data, int type, char *text)
Definition: sion_fd.c:147
_sion_newvcd
int _sion_newvcd(void *data, int type)
Definition: sion_fd.c:42
_sion_fd2ptr
void * _sion_fd2ptr(sion_fddata *fdd, int fd)
Definition: sion_fd.c:246
_sion_ptr2fd
int _sion_ptr2fd(sion_fddata *fdd, void *ptr, char *text)
Definition: sion_fd.c:288
_sion_vcdtype
int _sion_vcdtype(int sid)
Definition: sion_fd.c:57
_sion_free_fd
int _sion_free_fd(sion_fddata *fdd, int fd, char *text)
Definition: sion_fd.c:212