#else
#define DCL_FUNC_VER(REAL_DCL, sym, ver) \
SYMVER_ATTRIBUTE (__collector_ ## sym, ver) \
- REAL_DCL (__collector_ ## sym, CALL_REAL (sym))
+ REAL_DCL (__collector_ ## sym)
#endif
extern hrtime_t __collector_start_time;
__real_pthread_sigmask_2_17 = dlvsym (dlflag, "pthread_sigmask", "GLIBC_2.17");
__real_pthread_sigmask_2_2_5 = dlvsym (dlflag, "pthread_sigmask", "GLIBC_2.2.5");
__real_pthread_sigmask_2_0 = dlvsym (dlflag, "pthread_sigmask", "GLIBC_2.0");
- __real_pthread_sigmask = dlsym (dlflag, "pthread_sigmask");
+ if (__real_pthread_sigmask_2_32)
+ __real_pthread_sigmask = __real_pthread_sigmask_2_32;
+ else if (__real_pthread_sigmask_2_17)
+ __real_pthread_sigmask = __real_pthread_sigmask_2_17;
+ else if (__real_pthread_sigmask_2_2_5)
+ __real_pthread_sigmask = __real_pthread_sigmask_2_2_5;
+ else if (__real_pthread_sigmask_2_0)
+ __real_pthread_sigmask = __real_pthread_sigmask_2_0;
+ else
+ __real_pthread_sigmask = dlsym (dlflag, "pthread_sigmask");
__real_pthread_create_2_34 = dlvsym (dlflag, "pthread_create", "GLIBC_2.34");
__real_pthread_create_2_17 = dlvsym (dlflag, "pthread_create", "GLIBC_2.17");
return -1;
}
-#define DCL_TIMER_CREATE(dcl_f, real_f) \
+#define DCL_TIMER_CREATE(dcl_f) \
int dcl_f (clockid_t clockid, struct sigevent *sevp, timer_t *timerid) \
{ \
- if ((real_f) == NULL) \
+ if (__real_timer_create == NULL) \
init_interposition_intf (); \
- return gprofng_timer_create (real_f, clockid, sevp, timerid); \
+ return gprofng_timer_create (__real_timer_create, clockid, sevp, timerid); \
}
DCL_FUNC_VER (DCL_TIMER_CREATE, timer_create_2_34, timer_create@GLIBC_2.34)
DCL_FUNC_VER (DCL_TIMER_CREATE, timer_create_2_3_3, timer_create@GLIBC_2.3.3)
DCL_FUNC_VER (DCL_TIMER_CREATE, timer_create_2_2_5, timer_create@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_TIMER_CREATE, timer_create_2_2, timer_create@GLIBC_2.2)
-DCL_TIMER_CREATE (timer_create, CALL_REAL (timer_create))
+DCL_TIMER_CREATE (timer_create)
/*------------------------------------------------------------- setitimer */
int
}
-#define DCL_PTHREAD_SIGMASK(dcl_f, real_f) \
+#define DCL_PTHREAD_SIGMASK(dcl_f) \
int dcl_f (int how, const sigset_t *iset, sigset_t* oset) \
{ \
- if ((real_f) == NULL) \
+ if (__real_pthread_sigmask == NULL) \
init_interposition_intf (); \
- return gprofng_pthread_sigmask (real_f, how, iset, oset); \
+ return gprofng_pthread_sigmask (__real_pthread_sigmask, how, iset, oset); \
}
DCL_FUNC_VER (DCL_PTHREAD_SIGMASK, pthread_sigmask_2_32, pthread_sigmask@GLIBC_2.32)
DCL_FUNC_VER (DCL_PTHREAD_SIGMASK, pthread_sigmask_2_17, pthread_sigmask@GLIBC_2.17)
DCL_FUNC_VER (DCL_PTHREAD_SIGMASK, pthread_sigmask_2_2_5, pthread_sigmask@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_PTHREAD_SIGMASK, pthread_sigmask_2_0, pthread_sigmask@GLIBC_2.0)
-DCL_PTHREAD_SIGMASK (pthread_sigmask, CALL_REAL(pthread_sigmask))
+DCL_PTHREAD_SIGMASK (pthread_sigmask)
/*----------------------------------------------------------- pthread_create */
typedef struct _CollectorArgs
}
-#define DCL_PTHREAD_CREATE(dcl_f, real_f) \
+#define DCL_PTHREAD_CREATE(dcl_f) \
int dcl_f (pthread_t *thread, const pthread_attr_t *attr, \
void *(*func)(void*), void *arg) \
{ \
- if ((real_f) == NULL) \
+ if (__real_pthread_create == NULL) \
init_interposition_intf (); \
- return gprofng_pthread_create (real_f, thread, attr, func, arg); \
+ return gprofng_pthread_create (__real_pthread_create, thread, attr, func, arg); \
}
DCL_FUNC_VER (DCL_PTHREAD_CREATE, pthread_create_2_34, pthread_create@GLIBC_2.34)
DCL_FUNC_VER (DCL_PTHREAD_CREATE, pthread_create_2_2_5, pthread_create@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_PTHREAD_CREATE, pthread_create_2_1, pthread_create@GLIBC_2.1)
DCL_FUNC_VER (DCL_PTHREAD_CREATE, pthread_create_2_0, pthread_create@GLIBC_2.0)
-DCL_PTHREAD_CREATE (pthread_create, CALL_REAL (pthread_create))
+DCL_PTHREAD_CREATE (pthread_create)
int
__collector_ext_clone_pthread (int (*fn)(void *), void *child_stack, int flags, void *arg,
else
__real_fgetpos64 = dlsym (dlflag, "fgetpos64");
+ __real_fsetpos64_2_17 = dlvsym (dlflag, "fsetpos64", "GLIBC_2.17");
+ __real_fsetpos64_2_2_5 = dlvsym (dlflag, "fsetpos64", "GLIBC_2.2.5");
+ __real_fsetpos64_2_2 = dlvsym (dlflag, "fsetpos64", "GLIBC_2.2");
+ __real_fsetpos64_2_1 = dlvsym (dlflag, "fsetpos64", "GLIBC_2.1");
+ if (__real_fsetpos64_2_17)
+ __real_fsetpos64 = __real_fsetpos64_2_17;
+ else if (__real_fsetpos64_2_2_5)
+ __real_fsetpos64 = __real_fsetpos64_2_2_5;
+ else if (__real_fsetpos64_2_2)
+ __real_fsetpos64 = __real_fsetpos64_2_2;
+ else if (__real_fsetpos64_2_1)
+ __real_fsetpos64 = __real_fsetpos64_2_1;
+ else
+ __real_fsetpos64 = dlsym (dlflag, "fsetpos64");
+
__real_pread_2_2 = dlvsym (dlflag, "pread", "GLIBC_2.2");
if (__real_pread_2_2)
__real_pread = __real_pread_2_2;
return fd;
}
-#define DCL_OPEN64(dcl_f, real_f) \
+#define DCL_OPEN64(dcl_f) \
int dcl_f (const char *path, int oflag, ...) \
{ \
- if ((real_f) == NULL) \
+ if (__real_open64 == NULL) \
init_io_intf (); \
mode_t mode; \
va_list ap; \
va_start (ap, oflag); \
mode = va_arg (ap, mode_t); \
va_end (ap); \
- return gprofng_open64 (real_f, path, oflag, mode); \
+ return gprofng_open64 (__real_open64, path, oflag, mode); \
}
DCL_FUNC_VER (DCL_OPEN64, open64_2_2, open64@GLIBC_2.2)
-DCL_OPEN64 (open64, CALL_REAL(open64))
+DCL_OPEN64 (open64)
#define F_ERROR_ARG 0
return fp;
}
-#define DCL_FOPEN(dcl_f, real_f) \
+#define DCL_FOPEN(dcl_f) \
FILE *dcl_f (const char *filename, const char *mode) \
{ \
- if ((real_f) == NULL) \
+ if (__real_fopen == NULL) \
init_io_intf (); \
- return gprofng_fopen (real_f, filename, mode); \
+ return gprofng_fopen (__real_fopen, filename, mode); \
}
DCL_FUNC_VER (DCL_FOPEN, fopen_2_17, fopen@GLIBC_2.17)
DCL_FUNC_VER (DCL_FOPEN, fopen_2_2_5, fopen@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_FOPEN, fopen_2_1, fopen@GLIBC_2.1)
DCL_FUNC_VER (DCL_FOPEN, fopen_2_0, fopen@GLIBC_2.0)
-DCL_FOPEN (fopen, CALL_REAL(fopen))
+DCL_FOPEN (fopen)
/*------------------------------------------------------------- fclose */
static int
return stat;
}
-#define DCL_FCLOSE(dcl_f, real_f) \
+#define DCL_FCLOSE(dcl_f) \
int dcl_f (FILE *stream) \
{ \
- if ((real_f) == NULL) \
+ if (__real_fclose == NULL) \
init_io_intf (); \
- return gprofng_fclose (real_f, stream); \
+ return gprofng_fclose (__real_fclose, stream); \
}
DCL_FUNC_VER (DCL_FCLOSE, fclose_2_17, fclose@GLIBC_2.17)
DCL_FUNC_VER (DCL_FCLOSE, fclose_2_2_5, fclose@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_FCLOSE, fclose_2_1, fclose@GLIBC_2.1)
DCL_FUNC_VER (DCL_FCLOSE, fclose_2_0, fclose@GLIBC_2.0)
-DCL_FCLOSE (fclose, CALL_REAL(fclose))
+DCL_FCLOSE (fclose)
/*------------------------------------------------------------- fflush */
int
return fp;
}
-#define DCL_FDOPEN(dcl_f, real_f) \
+#define DCL_FDOPEN(dcl_f) \
FILE *dcl_f (int fildes, const char *mode) \
{ \
- if ((real_f) == NULL) \
+ if (__real_fdopen == NULL) \
init_io_intf (); \
- return gprofng_fdopen (real_f, fildes, mode); \
+ return gprofng_fdopen (__real_fdopen, fildes, mode); \
}
DCL_FUNC_VER (DCL_FDOPEN, fdopen_2_17, fdopen@GLIBC_2.17)
DCL_FUNC_VER (DCL_FDOPEN, fdopen_2_2_5, fdopen@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_FDOPEN, fdopen_2_1, fdopen@GLIBC_2.1)
DCL_FUNC_VER (DCL_FDOPEN, fdopen_2_0, fdopen@GLIBC_2.0)
-DCL_FDOPEN (fdopen, CALL_REAL(fdopen))
+DCL_FDOPEN (fdopen)
/*------------------------------------------------------------- dup */
int
return ret;
}
-#define DCL_PREAD(dcl_f, real_f) \
+#define DCL_PREAD(dcl_f) \
ssize_t dcl_f (int fildes, void *buf, size_t nbyte, off_t offset) \
{ \
- if ((real_f) == NULL) \
+ if (__real_pread == NULL) \
init_io_intf (); \
- return gprofng_pread (real_f, fildes, buf, nbyte, offset); \
+ return gprofng_pread (__real_pread, fildes, buf, nbyte, offset); \
}
DCL_FUNC_VER (DCL_PREAD, pread_2_2, pread@GLIBC_2.2)
-DCL_PREAD (pread, CALL_REAL(pread))
+DCL_PREAD (pread)
/*------------------------------------------------------------- pwrite */
return ret;
}
-#define DCL_FGETPOS(dcl_f, real_f) \
+#define DCL_FGETPOS(dcl_f) \
int dcl_f (FILE *stream, fpos_t *pos) \
{ \
- if ((real_f) == NULL) \
+ if (__real_fgetpos == NULL) \
init_io_intf (); \
- return gprofng_fgetpos (real_f, stream, pos); \
+ return gprofng_fgetpos (__real_fgetpos, stream, pos); \
}
DCL_FUNC_VER (DCL_FGETPOS, fgetpos_2_17, fgetpos@GLIBC_2.17)
DCL_FUNC_VER (DCL_FGETPOS, fgetpos_2_2_5, fgetpos@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_FGETPOS, fgetpos_2_2, fgetpos@GLIBC_2.2)
DCL_FUNC_VER (DCL_FGETPOS, fgetpos_2_0, fgetpos@GLIBC_2.0)
-DCL_FGETPOS (fgetpos, CALL_REAL(fgetpos))
+DCL_FGETPOS (fgetpos)
/*------------------------------------------------------------- fgetpos64 */
static int
return ret;
}
-#define DCL_FGETPOS64(dcl_f, real_f) \
+#define DCL_FGETPOS64(dcl_f) \
int dcl_f (FILE *stream, fpos64_t *pos) \
{ \
- if ((real_f) == NULL) \
+ if (__real_fgetpos64 == NULL) \
init_io_intf (); \
- return gprofng_fgetpos64 (real_f, stream, pos); \
+ return gprofng_fgetpos64 (__real_fgetpos64, stream, pos); \
}
DCL_FUNC_VER (DCL_FGETPOS64, fgetpos64_2_17, fgetpos64@GLIBC_2.17)
DCL_FUNC_VER (DCL_FGETPOS64, fgetpos64_2_2_5, fgetpos64@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_FGETPOS64, fgetpos64_2_2, fgetpos64@GLIBC_2.2)
DCL_FUNC_VER (DCL_FGETPOS64, fgetpos64_2_1, fgetpos64@GLIBC_2.1)
-DCL_FGETPOS64 (fgetpos64, CALL_REAL(fgetpos64))
+DCL_FGETPOS64 (fgetpos64)
/*------------------------------------------------------------- fsetpos */
static int
return ret;
}
-#define DCL_FSETPOS(dcl_f, real_f) \
+#define DCL_FSETPOS(dcl_f) \
int dcl_f (FILE *stream, const fpos_t *pos) \
{ \
- if ((real_f) == NULL) \
+ if (__real_fsetpos == NULL) \
init_io_intf (); \
- return gprofng_fsetpos (real_f, stream, pos); \
+ return gprofng_fsetpos (__real_fsetpos, stream, pos); \
}
DCL_FUNC_VER (DCL_FSETPOS, fsetpos_2_17, fsetpos@GLIBC_2.17)
DCL_FUNC_VER (DCL_FSETPOS, fsetpos_2_2_5, fsetpos@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_FSETPOS, fsetpos_2_2, fsetpos@GLIBC_2.2)
DCL_FUNC_VER (DCL_FSETPOS, fsetpos_2_0, fsetpos@GLIBC_2.0)
-DCL_FSETPOS (fsetpos, CALL_REAL(fsetpos))
+DCL_FSETPOS (fsetpos)
/*------------------------------------------------------------- fsetpos64 */
static int
return ret;
}
-#define DCL_FSETPOS64(dcl_f, real_f) \
+#define DCL_FSETPOS64(dcl_f) \
int dcl_f (FILE *stream, const fpos64_t *pos) \
{ \
- if ((real_f) == NULL) \
+ if (__real_fsetpos64 == NULL) \
init_io_intf (); \
- return gprofng_fsetpos64 (real_f, stream, pos); \
+ return gprofng_fsetpos64 (__real_fsetpos64, stream, pos); \
}
DCL_FUNC_VER (DCL_FSETPOS64, fsetpos64_2_17, fsetpos64@GLIBC_2.17)
DCL_FUNC_VER (DCL_FSETPOS64, fsetpos64_2_2_5, fsetpos64@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_FSETPOS64, fsetpos64_2_2, fsetpos64@GLIBC_2.2)
DCL_FUNC_VER (DCL_FSETPOS64, fsetpos64_2_1, fsetpos64@GLIBC_2.1)
-DCL_FSETPOS64 (fsetpos64, CALL_REAL(fsetpos64))
+DCL_FSETPOS64 (fsetpos64)
/*------------------------------------------------------------- fsync */
int
__real_execlp = dlsym (dlflag, "execlp");
__real_execl = dlsym (dlflag, "execl");
__real_clone = dlsym (dlflag, "clone");
- __real_posix_spawn = dlsym (dlflag, "posix_spawn");
- __real_posix_spawnp = dlsym (dlflag, "posix_spawnp");
__real_popen_2_17 = dlvsym (dlflag, "popen", "GLIBC_2.17");
__real_popen_2_2_5 = dlvsym (dlflag, "popen", "GLIBC_2.2.5");
__real_posix_spawn_2_15 = dlvsym (dlflag, "posix_spawn", "GLIBC_2.15");
__real_posix_spawn_2_2_5 = dlvsym (dlflag, "posix_spawn", "GLIBC_2.2.5");
__real_posix_spawn_2_2 = dlvsym (dlflag, "posix_spawn", "GLIBC_2.2");
+ if (__real_posix_spawn_2_17)
+ __real_posix_spawn = __real_posix_spawn_2_17;
+ else if (__real_posix_spawn_2_15)
+ __real_posix_spawn = __real_posix_spawn_2_15;
+ else if (__real_posix_spawn_2_2_5)
+ __real_posix_spawn = __real_posix_spawn_2_2_5;
+ else if (__real_posix_spawn_2_2)
+ __real_posix_spawn = __real_posix_spawn_2_2;
+ else
+ __real_posix_spawn = dlsym (dlflag, "posix_spawn");
__real_posix_spawnp_2_17 = dlvsym (dlflag, "posix_spawnp", "GLIBC_2.17");
__real_posix_spawnp_2_15 = dlvsym (dlflag, "posix_spawnp", "GLIBC_2.15");
__real_posix_spawnp_2_2_5 = dlvsym (dlflag, "posix_spawnp", "GLIBC_2.2.5");
__real_posix_spawnp_2_2 = dlvsym (dlflag, "posix_spawnp", "GLIBC_2.2");
+ if (__real_posix_spawnp_2_17)
+ __real_posix_spawnp = __real_posix_spawnp_2_17;
+ else if (__real_posix_spawnp_2_15)
+ __real_posix_spawnp = __real_posix_spawnp_2_15;
+ else if (__real_posix_spawnp_2_2_5)
+ __real_posix_spawnp = __real_posix_spawnp_2_2_5;
+ else if (__real_posix_spawnp_2_2)
+ __real_posix_spawnp = __real_posix_spawnp_2_2;
+ else
+ __real_posix_spawnp = dlsym (dlflag, "posix_spawnp");
__real_grantpt = dlsym (dlflag, "grantpt");
__real_ptsname = dlsym (dlflag, "ptsname");
return ret;
}
-#define DCL_POSIX_SPAWN(dcl_f, real_f) \
+#define DCL_POSIX_SPAWN(dcl_f) \
int dcl_f (pid_t *pidp, const char *path, \
const posix_spawn_file_actions_t *file_actions, \
const posix_spawnattr_t *attrp, \
char *const argv[], char *const envp[]) \
{ \
- if ((real_f) == NULL) \
+ if (__real_posix_spawn == NULL) \
init_lineage_intf (); \
- return gprofng_posix_spawn (real_f, pidp, path, file_actions, attrp, \
- argv, envp); \
+ return gprofng_posix_spawn (__real_posix_spawn, pidp, path, file_actions, \
+ attrp, argv, envp); \
}
DCL_FUNC_VER (DCL_POSIX_SPAWN, posix_spawn_2_15, posix_spawn@GLIBC_2.15)
DCL_FUNC_VER (DCL_POSIX_SPAWN, posix_spawn_2_2_5, posix_spawn@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_POSIX_SPAWN, posix_spawn_2_2, posix_spawn@GLIBC_2.2)
-DCL_POSIX_SPAWN (posix_spawn, CALL_REAL (posix_spawn))
+DCL_POSIX_SPAWN (posix_spawn)
/*-------------------------------------------------------- posix_spawnp */
static int
return ret;
}
-#define DCL_POSIX_SPAWNP(dcl_f, real_f) \
+#define DCL_POSIX_SPAWNP(dcl_f) \
int dcl_f (pid_t *pidp, const char *path, \
const posix_spawn_file_actions_t *file_actions, \
const posix_spawnattr_t *attrp, \
char *const argv[], char *const envp[]) \
{ \
- if ((real_f) == NULL) \
+ if (__real_posix_spawnp == NULL) \
init_lineage_intf (); \
- return gprofng_posix_spawnp (real_f, pidp, path, \
+ return gprofng_posix_spawnp (__real_posix_spawnp, pidp, path, \
file_actions, attrp, argv, envp); \
}
DCL_FUNC_VER (DCL_POSIX_SPAWNP, posix_spawnp_2_15, posix_spawnp@GLIBC_2.15)
DCL_FUNC_VER (DCL_POSIX_SPAWNP, posix_spawnp_2_2_5, posix_spawnp@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_POSIX_SPAWNP, posix_spawnp_2_2, posix_spawnp@GLIBC_2.2)
-DCL_POSIX_SPAWNP (posix_spawnp, CALL_REAL (posix_spawnp))
+DCL_POSIX_SPAWNP (posix_spawnp)
/*------------------------------------------------------------- system */
int system () __attribute__ ((weak, alias ("__collector_system")));
/*------------------------------------------------------------- popen */
// map interposed symbol versions
-#define DCL_POPEN(dcl_f, real_f) \
+#define DCL_POPEN(dcl_f) \
FILE *dcl_f (const char *cmd, const char *mode) \
{ \
- if ((real_f) == NULL) \
+ if (__real_popen == NULL) \
init_lineage_intf (); \
TprintfT (DBG_LT0, #dcl_f " (%s) interposing: line_mode=%d combo=%d\n", \
cmd ? cmd : "NULL", line_mode, get_combo_flag ()); \
if (line_mode == LM_TRACK_LINEAGE) \
INIT_REENTRANCE (guard); \
if (guard == NULL) \
- return (real_f) (cmd, mode); \
+ return __real_popen (cmd, mode); \
int following_combo = 0; \
linetrace_ext_combo_prologue ("popen", cmd, &following_combo); \
PUSH_REENTRANCE (guard); \
- FILE *ret = (real_f) (cmd, mode); \
+ FILE *ret = __real_popen (cmd, mode); \
POP_REENTRANCE (guard); \
linetrace_ext_combo_epilogue ("popen", ret == NULL ? -1 : 0, \
&following_combo); \
DCL_FUNC_VER (DCL_POPEN, popen_2_2_5, popen@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_POPEN, popen_2_1, popen@GLIBC_2.1)
DCL_FUNC_VER (DCL_POPEN, popen_2_0, popen@GLIBC_2.0)
-DCL_POPEN (popen, CALL_REAL (popen))
+DCL_POPEN (popen)
/*------------------------------------------------------------- grantpt */
int grantpt () __attribute__ ((weak, alias ("__collector_grantpt")));
return ret;
}
-#define DCL_DLOPEN(dcl_f, real_f) \
+#define DCL_DLOPEN(dcl_f) \
void *dcl_f (const char *pathname, int mode) \
{ \
- if ((real_f) == NULL) \
+ if (__real_dlopen == NULL) \
init_mmap_intf (); \
void *caller = __builtin_return_address (0); \
- return gprofng_dlopen (real_f, caller, pathname, mode); \
+ return gprofng_dlopen (__real_dlopen, caller, pathname, mode); \
}
DCL_FUNC_VER (DCL_DLOPEN, dlopen_2_34, dlopen@GLIBC_2.34)
DCL_FUNC_VER (DCL_DLOPEN, dlopen_2_2_5, dlopen@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_DLOPEN, dlopen_2_1, dlopen@GLIBC_2.1)
DCL_FUNC_VER (DCL_DLOPEN, dlopen_2_0, dlopen@GLIBC_2.0)
-DCL_DLOPEN (dlopen, CALL_REAL (dlopen))
+DCL_DLOPEN (dlopen)
/*------------------------------------------------------------- dlclose */
static int
return ret;
}
-#define DCL_DLCLOSE(dcl_f, real_f) \
+#define DCL_DLCLOSE(dcl_f) \
int dcl_f (void *handle) \
{ \
- if ((real_f) == NULL) \
+ if (__real_dlclose == NULL) \
init_mmap_intf (); \
- return gprofng_dlclose (real_f, handle); \
+ return gprofng_dlclose (__real_dlclose, handle); \
}
DCL_FUNC_VER (DCL_DLCLOSE, dlclose_2_34, dlclose@GLIBC_2.34)
DCL_FUNC_VER (DCL_DLCLOSE, dlclose_2_17, dlclose@GLIBC_2.17)
DCL_FUNC_VER (DCL_DLCLOSE, dlclose_2_2_5, dlclose@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_DLCLOSE, dlclose_2_0, dlclose@GLIBC_2.0)
-DCL_DLCLOSE (dlclose, CALL_REAL (dlclose))
+DCL_DLCLOSE (dlclose)
return ret;
}
-#define DCL_PTHREAD_MUTEX_LOCK(dcl_f, real_f) \
+#define DCL_PTHREAD_MUTEX_LOCK(dcl_f) \
int dcl_f (pthread_mutex_t *mp) \
{ \
- if ((real_f) == NULL) \
+ if (__real_pthread_mutex_lock == NULL) \
init_thread_intf (); \
- return gprofng_pthread_mutex_lock (real_f, mp); \
+ return gprofng_pthread_mutex_lock (__real_pthread_mutex_lock, mp); \
}
DCL_FUNC_VER (DCL_PTHREAD_MUTEX_LOCK, pthread_mutex_lock_2_17, pthread_mutex_lock@GLIBC_2.17)
DCL_FUNC_VER (DCL_PTHREAD_MUTEX_LOCK, pthread_mutex_lock_2_2_5, pthread_mutex_lock@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_PTHREAD_MUTEX_LOCK, pthread_mutex_lock_2_0, pthread_mutex_lock@GLIBC_2.0)
-DCL_PTHREAD_MUTEX_LOCK (pthread_mutex_lock, CALL_REAL (pthread_mutex_lock))
+DCL_PTHREAD_MUTEX_LOCK (pthread_mutex_lock)
/*------------------------------------------------------------- pthread_cond_wait */
static int
return ret;
}
-#define DCL_PTHREAD_COND_WAIT(dcl_f, real_f) \
+#define DCL_PTHREAD_COND_WAIT(dcl_f) \
int dcl_f (pthread_cond_t *cond, pthread_mutex_t *mutex) \
{ \
- if ((real_f) == NULL) \
+ if (__real_pthread_cond_wait == NULL) \
init_thread_intf (); \
- return gprofng_pthread_cond_wait (real_f, cond, mutex); \
+ return gprofng_pthread_cond_wait (__real_pthread_cond_wait, cond, mutex); \
}
DCL_FUNC_VER (DCL_PTHREAD_COND_WAIT, pthread_cond_wait_2_17, pthread_cond_wait@GLIBC_2.17)
DCL_FUNC_VER (DCL_PTHREAD_COND_WAIT, pthread_cond_wait_2_3_2, pthread_cond_wait@GLIBC_2.3.2)
DCL_FUNC_VER (DCL_PTHREAD_COND_WAIT, pthread_cond_wait_2_2_5, pthread_cond_wait@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_PTHREAD_COND_WAIT, pthread_cond_wait_2_0, pthread_cond_wait@GLIBC_2.0)
-DCL_PTHREAD_COND_WAIT (pthread_cond_wait, CALL_REAL (pthread_cond_wait))
+DCL_PTHREAD_COND_WAIT (pthread_cond_wait)
/*---------------------------------------------------- pthread_cond_timedwait */
static int
return ret;
}
-#define DCL_PTHREAD_COND_TIMEDWAIT(dcl_f, real_f) \
+#define DCL_PTHREAD_COND_TIMEDWAIT(dcl_f) \
int dcl_f (pthread_cond_t *cond, pthread_mutex_t *mutex, \
const struct timespec *abstime) \
{ \
- if ((real_f) == NULL) \
+ if (__real_pthread_cond_timedwait == NULL) \
init_thread_intf (); \
- return gprofng_pthread_cond_timedwait (real_f, cond, mutex, abstime); \
+ return gprofng_pthread_cond_timedwait (__real_pthread_cond_timedwait, cond, mutex, abstime); \
}
DCL_FUNC_VER (DCL_PTHREAD_COND_TIMEDWAIT, pthread_cond_timedwait_2_17, pthread_cond_timedwait@GLIBC_2.17)
DCL_FUNC_VER (DCL_PTHREAD_COND_TIMEDWAIT, pthread_cond_timedwait_2_3_2, pthread_cond_timedwait@GLIBC_2.3.2)
DCL_FUNC_VER (DCL_PTHREAD_COND_TIMEDWAIT, pthread_cond_timedwait_2_2_5, pthread_cond_timedwait@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_PTHREAD_COND_TIMEDWAIT, pthread_cond_timedwait_2_0, pthread_cond_timedwait@GLIBC_2.0)
-DCL_PTHREAD_COND_TIMEDWAIT (pthread_cond_timedwait, CALL_REAL (pthread_cond_timedwait))
+DCL_PTHREAD_COND_TIMEDWAIT (pthread_cond_timedwait)
/*------------------------------------------------------------- pthread_join */
return ret;
}
-#define DCL_PTHREAD_JOIN(dcl_f, real_f) \
+#define DCL_PTHREAD_JOIN(dcl_f) \
int dcl_f (pthread_t target_thread, void **status) \
{ \
- if ((real_f) == NULL) \
+ if (__real_pthread_join == NULL) \
init_thread_intf (); \
- return gprofng_pthread_join (real_f, target_thread, status); \
+ return gprofng_pthread_join (__real_pthread_join, target_thread, status); \
}
DCL_FUNC_VER (DCL_PTHREAD_JOIN, pthread_join_2_34, pthread_join@GLIBC_2.34)
DCL_FUNC_VER (DCL_PTHREAD_JOIN, pthread_join_2_17, pthread_join@GLIBC_2.17)
DCL_FUNC_VER (DCL_PTHREAD_JOIN, pthread_join_2_2_5, pthread_join@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_PTHREAD_JOIN, pthread_join_2_0, pthread_join@GLIBC_2.0)
-DCL_PTHREAD_JOIN (pthread_join, CALL_REAL (pthread_join))
+DCL_PTHREAD_JOIN (pthread_join)
/*------------------------------------------------------------- sem_wait */
static int
return ret;
}
-#define DCL_SEM_WAIT(dcl_f, real_f) \
+#define DCL_SEM_WAIT(dcl_f) \
int dcl_f (sem_t *sp) \
{ \
- if ((real_f) == NULL) \
+ if (__real_sem_wait == NULL) \
init_thread_intf (); \
- return gprofng_sem_wait (real_f, sp); \
+ return gprofng_sem_wait (__real_sem_wait, sp); \
}
DCL_FUNC_VER (DCL_SEM_WAIT, sem_wait_2_34, sem_wait@GLIBC_2.34)
DCL_FUNC_VER (DCL_SEM_WAIT, sem_wait_2_2_5, sem_wait@GLIBC_2.2.5)
DCL_FUNC_VER (DCL_SEM_WAIT, sem_wait_2_0, sem_wait@GLIBC_2.0)
DCL_FUNC_VER (DCL_SEM_WAIT, sem_wait_2_1, sem_wait@GLIBC_2.1)
-DCL_SEM_WAIT (sem_wait, CALL_REAL (sem_wait))
+DCL_SEM_WAIT (sem_wait)