SIONlib  1.7.1
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-2016 **
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 
25 int _sion_newvcd(void *data, int type);
26 int _sion_freevcd(int sid);
27 void *_sion_vcdtovcon(int sid);
28 int _sion_vcdtype(int sid);
29 int _sion_reassignvcd(int sid, void *data, int type);
30 
31 
32  /* SION_FD INTERNAL */
33 #define SION_FD_CHUNK 2
34 struct _sion_fd {
35  int state; /* 0: fresh, 1: in use, 2: used before, now free */
36  int type;
37  void *data;
38 };
39 
40 typedef struct _sion_fddata sion_fddata;
41 
42 int _sion_new_fd(sion_fddata *fdd, void *data, int type);
43 int _sion_set_fd(sion_fddata *fdd, int fd, void *data,
44  int type, char *text);
45 void *_sion_fd2ptr(sion_fddata *fdd, int fd);
46 int _sion_fd2type(sion_fddata *fdd, int fd, char *text);
47 int _sion_ptr2fd(sion_fddata *fdd, void *ptr, char *text);
48 int _sion_free_fd(sion_fddata *fdd, int fd, char *text);
49 int _sion_reassign_fd(sion_fddata *fdd, int fd, void *data, int type, char *text);
50 int _sion_fd_size(sion_fddata *fdd);
51 
52 
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif
int _sion_free_fd(sion_fddata *fdd, int fd, char *text)
Definition: sion_fd.c:211
int _sion_new_fd(sion_fddata *fdd, void *data, int type)
Definition: sion_fd.c:74
int _sion_vcdtype(int sid)
Definition: sion_fd.c:56
int _sion_newvcd(void *data, int type)
Definition: sion_fd.c:41
int _sion_ptr2fd(sion_fddata *fdd, void *ptr, char *text)
Definition: sion_fd.c:287
int _sion_set_fd(sion_fddata *fdd, int fd, void *data, int type, char *text)
Definition: sion_fd.c:146
void * _sion_vcdtovcon(int sid)
Definition: sion_fd.c:51
int _sion_fd2type(sion_fddata *fdd, int fd, char *text)
Definition: sion_fd.c:263
int _sion_reassign_fd(sion_fddata *fdd, int fd, void *data, int type, char *text)
Definition: sion_fd.c:313
int _sion_fd_size(sion_fddata *fdd)
Definition: sion_fd.c:337
void * _sion_fd2ptr(sion_fddata *fdd, int fd)
Definition: sion_fd.c:245
int _sion_reassignvcd(int sid, void *data, int type)
Definition: sion_fd.c:61
int _sion_freevcd(int sid)
Definition: sion_fd.c:46