[Darshan-commits] [Git][darshan/darshan][dev-stdio] fopen64 wrapper

Philip Carns xgitlab at cels.anl.gov
Sun May 1 07:34:28 CDT 2016


Philip Carns pushed to branch dev-stdio at darshan / darshan


Commits:
7e58577d by Phil Carns at 2016-05-01T08:34:19-04:00
fopen64 wrapper

- - - - -


1 changed file:

- darshan-runtime/lib/darshan-stdio.c


Changes:

=====================================
darshan-runtime/lib/darshan-stdio.c
=====================================
--- a/darshan-runtime/lib/darshan-stdio.c
+++ b/darshan-runtime/lib/darshan-stdio.c
@@ -168,8 +168,6 @@ FILE* DARSHAN_DECL(fopen)(const char *path, const char *mode)
     FILE* ret;
     double tm1, tm2;
 
-    fprintf(stderr, "FOO: HELLO WORLD (FOPEN)\n");
-
     MAP_OR_FAIL(fopen);
 
     tm1 = darshan_core_wtime();
@@ -187,12 +185,18 @@ FILE* DARSHAN_DECL(fopen)(const char *path, const char *mode)
 FILE* DARSHAN_DECL(fopen64)(const char *path, const char *mode)
 {
     FILE* ret;
+    double tm1, tm2;
 
-    fprintf(stderr, "FOO: HELLO WORLD (FOPEN64)\n");
-
-    MAP_OR_FAIL(fopen64);
+    MAP_OR_FAIL(fopen);
 
+    tm1 = darshan_core_wtime();
     ret = __real_fopen64(path, mode);
+    tm2 = darshan_core_wtime();
+
+    STDIO_LOCK();
+    stdio_runtime_initialize();
+    STDIO_RECORD_OPEN(ret, path, tm1, tm2);
+    STDIO_UNLOCK();
 
     return(ret);
 }



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/7e58577d8b6099e36197083d18522f8aef3855e5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20160501/7af5da6d/attachment-0001.html>


More information about the Darshan-commits mailing list