Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
darshan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
72
Issues
72
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
darshan
darshan
Commits
0461e398
Commit
0461e398
authored
May 23, 2016
by
Philip Carns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
freopen64 wrapper
parent
6c43ebe8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
darshan-runtime/lib/darshan-stdio.c
darshan-runtime/lib/darshan-stdio.c
+22
-1
darshan-runtime/share/ld-opts/darshan-stdio-ld-opts
darshan-runtime/share/ld-opts/darshan-stdio-ld-opts
+1
-0
No files found.
darshan-runtime/lib/darshan-stdio.c
View file @
0461e398
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
* FILE *fopen(const char *, const char *); DONE
* FILE *fopen(const char *, const char *); DONE
* FILE *fopen64(const char *, const char *); DONE
* FILE *fopen64(const char *, const char *); DONE
* FILE *freopen(const char *, const char *, FILE *); DONE
* FILE *freopen(const char *, const char *, FILE *); DONE
* FILE *freopen64(const char *, const char *, FILE *);
* FILE *freopen64(const char *, const char *, FILE *);
DONE
*
*
* functions for closing streams
* functions for closing streams
* --------------
* --------------
...
@@ -103,6 +103,7 @@ DARSHAN_FORWARD_DECL(fopen, FILE*, (const char *path, const char *mode));
...
@@ -103,6 +103,7 @@ DARSHAN_FORWARD_DECL(fopen, FILE*, (const char *path, const char *mode));
DARSHAN_FORWARD_DECL
(
fopen64
,
FILE
*
,
(
const
char
*
path
,
const
char
*
mode
));
DARSHAN_FORWARD_DECL
(
fopen64
,
FILE
*
,
(
const
char
*
path
,
const
char
*
mode
));
DARSHAN_FORWARD_DECL
(
fdopen
,
FILE
*
,
(
int
fd
,
const
char
*
mode
));
DARSHAN_FORWARD_DECL
(
fdopen
,
FILE
*
,
(
int
fd
,
const
char
*
mode
));
DARSHAN_FORWARD_DECL
(
freopen
,
FILE
*
,
(
const
char
*
path
,
const
char
*
mode
,
FILE
*
stream
));
DARSHAN_FORWARD_DECL
(
freopen
,
FILE
*
,
(
const
char
*
path
,
const
char
*
mode
,
FILE
*
stream
));
DARSHAN_FORWARD_DECL
(
freopen64
,
FILE
*
,
(
const
char
*
path
,
const
char
*
mode
,
FILE
*
stream
));
DARSHAN_FORWARD_DECL
(
fclose
,
int
,
(
FILE
*
fp
));
DARSHAN_FORWARD_DECL
(
fclose
,
int
,
(
FILE
*
fp
));
DARSHAN_FORWARD_DECL
(
fflush
,
int
,
(
FILE
*
fp
));
DARSHAN_FORWARD_DECL
(
fflush
,
int
,
(
FILE
*
fp
));
DARSHAN_FORWARD_DECL
(
fwrite
,
size_t
,
(
const
void
*
ptr
,
size_t
size
,
size_t
nmemb
,
FILE
*
stream
));
DARSHAN_FORWARD_DECL
(
fwrite
,
size_t
,
(
const
void
*
ptr
,
size_t
size
,
size_t
nmemb
,
FILE
*
stream
));
...
@@ -357,6 +358,26 @@ FILE* DARSHAN_DECL(freopen)(const char *path, const char *mode, FILE *stream)
...
@@ -357,6 +358,26 @@ FILE* DARSHAN_DECL(freopen)(const char *path, const char *mode, FILE *stream)
return
(
ret
);
return
(
ret
);
}
}
FILE
*
DARSHAN_DECL
(
freopen64
)(
const
char
*
path
,
const
char
*
mode
,
FILE
*
stream
)
{
FILE
*
ret
;
double
tm1
,
tm2
;
MAP_OR_FAIL
(
freopen64
);
tm1
=
darshan_core_wtime
();
ret
=
__real_freopen64
(
path
,
mode
,
stream
);
tm2
=
darshan_core_wtime
();
STDIO_LOCK
();
stdio_runtime_initialize
();
STDIO_RECORD_OPEN
(
ret
,
path
,
tm1
,
tm2
);
STDIO_UNLOCK
();
return
(
ret
);
}
int
DARSHAN_DECL
(
fflush
)(
FILE
*
fp
)
int
DARSHAN_DECL
(
fflush
)(
FILE
*
fp
)
{
{
double
tm1
,
tm2
;
double
tm1
,
tm2
;
...
...
darshan-runtime/share/ld-opts/darshan-stdio-ld-opts
View file @
0461e398
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
--wrap=fopen64
--wrap=fopen64
--wrap=fdopen
--wrap=fdopen
--wrap=freopen
--wrap=freopen
--wrap=freopen64
--wrap=fflush
--wrap=fflush
--wrap=fclose
--wrap=fclose
--wrap=fwrite
--wrap=fwrite
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment