DMTCP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Typedefs | Functions | Variables
syscallsreal.c File Reference
#include <malloc.h>
#include <pthread.h>
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <poll.h>
#include <fcntl.h>
#include "constants.h"
#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/syscall.h>
#include <sys/mman.h>
#include <unistd.h>
#include <ctype.h>
#include <assert.h>
#include "syscallwrappers.h"
#include "trampolines.h"

Go to the source code of this file.

Macros

#define _GNU_SOURCE
 
#define _XOPEN_SOURCE   500
 
#define GET_FUNC_ADDR(name)   _real_func_addr[ENUM(name)] = _real_dlsym(RTLD_NEXT, #name);
 
#define GET_LIBPTHREAD_FUNC_ADDR(name)   _real_func_addr[ENUM(name)] = dlvsym(RTLD_NEXT, #name, pthread_sym_ver);
 
#define REAL_FUNC_PASSTHROUGH(name)   REAL_FUNC_PASSTHROUGH_TYPED(int, name)
 
#define REAL_FUNC_PASSTHROUGH_WORK(name)
 
#define REAL_FUNC_PASSTHROUGH_TYPED(type, name)
 
#define REAL_FUNC_PASSTHROUGH_VOID(name)
 
#define REAL_FUNC_PASSTHROUGH_NORETURN(name)
 
#define IPC_64
 
#define IPC64_FLAG   0
 

Typedefs

typedef int(* funcptr_t )()
 
typedef pid_t(* funcptr_pid_t )()
 
typedef funcptr_t(* signal_funcptr_t )()
 
typedef void *(* dlsym_fnptr_t )(void *handle, const char *symbol)
 

Functions

LIB_PRIVATE pid_t dmtcp_gettid ()
 
LIB_PRIVATE int dmtcp_tkill (int tid, int sig)
 
LIB_PRIVATE int dmtcp_tgkill (int tgid, int tid, int sig)
 
void _dmtcp_lock ()
 
void _dmtcp_unlock ()
 
void _dmtcp_remutex_on_fork ()
 
void dmtcp_prepare_wrappers ()
 
void * __pthread_getspecific (pthread_key_t key)
 
void * pthread_getspecific (pthread_key_t key)
 
LIB_PRIVATE void initialize_libc_wrappers ()
 
LIB_PRIVATE void initialize_libpthread_wrappers ()
 
void * dmtcp_get_libc_dlsym_addr (void)
 
LIB_PRIVATE void * _real_dlsym (void *handle, const char *symbol)
 
LIB_PRIVATE int _dmtcp_unsetenv (const char *name)
 
LIB_PRIVATE void * _real_dlopen (const char *filename, int flag)
 
LIB_PRIVATE int _real_dlclose (void *handle)
 
LIB_PRIVATE int _real_pthread_mutex_lock (pthread_mutex_t *mutex)
 
LIB_PRIVATE int _real_pthread_mutex_trylock (pthread_mutex_t *mutex)
 
LIB_PRIVATE int _real_pthread_mutex_unlock (pthread_mutex_t *mutex)
 
LIB_PRIVATE int _real_pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
 
LIB_PRIVATE int _real_pthread_rwlock_rdlock (pthread_rwlock_t *rwlock)
 
LIB_PRIVATE int _real_pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock)
 
LIB_PRIVATE int _real_pthread_rwlock_wrlock (pthread_rwlock_t *rwlock)
 
LIB_PRIVATE int _real_pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock)
 
LIB_PRIVATE int _real_pthread_cond_broadcast (pthread_cond_t *cond)
 
LIB_PRIVATE int _real_pthread_cond_destroy (pthread_cond_t *cond)
 
LIB_PRIVATE int _real_pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t *attr)
 
LIB_PRIVATE int _real_pthread_cond_signal (pthread_cond_t *cond)
 
LIB_PRIVATE int _real_pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime)
 
LIB_PRIVATE int _real_pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)
 
LIB_PRIVATE ssize_t _real_read (int fd, void *buf, size_t count)
 
LIB_PRIVATE ssize_t _real_write (int fd, const void *buf, size_t count)
 
LIB_PRIVATE int _real_select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
 
LIB_PRIVATE int _real_socket (int domain, int type, int protocol)
 call the libc version of this function via dlopen/dlsym More...
 
LIB_PRIVATE int _real_connect (int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen)
 call the libc version of this function via dlopen/dlsym More...
 
LIB_PRIVATE int _real_bind (int sockfd, const struct sockaddr *my_addr, socklen_t addrlen)
 call the libc version of this function via dlopen/dlsym More...
 
LIB_PRIVATE int _real_listen (int sockfd, int backlog)
 call the libc version of this function via dlopen/dlsym More...
 
LIB_PRIVATE int _real_accept (int sockfd, struct sockaddr *addr, socklen_t *addrlen)
 call the libc version of this function via dlopen/dlsym More...
 
LIB_PRIVATE int _real_accept4 (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)
 
LIB_PRIVATE int _real_setsockopt (int s, int level, int optname, const void *optval, socklen_t optlen)
 call the libc version of this function via dlopen/dlsym More...
 
LIB_PRIVATE int _real_getsockopt (int s, int level, int optname, void *optval, socklen_t *optlen)
 
LIB_PRIVATE int _real_fexecve (int fd, char *const argv[], char *const envp[])
 
LIB_PRIVATE int _real_execve (const char *filename, char *const argv[], char *const envp[])
 
LIB_PRIVATE int _real_execv (const char *path, char *const argv[])
 
LIB_PRIVATE int _real_execvp (const char *file, char *const argv[])
 
LIB_PRIVATE int _real_execvpe (const char *file, char *const argv[], char *const envp[])
 
LIB_PRIVATE int _real_system (const char *cmd)
 
LIB_PRIVATE FILE * _real_popen (const char *command, const char *mode)
 
LIB_PRIVATE int _real_pclose (FILE *fp)
 
LIB_PRIVATE pid_t _real_fork (void)
 
LIB_PRIVATE int _real_close (int fd)
 
LIB_PRIVATE int _real_fclose (FILE *fp)
 
LIB_PRIVATE int _real_dup (int oldfd)
 
LIB_PRIVATE int _real_dup2 (int oldfd, int newfd)
 
LIB_PRIVATE int _real_dup3 (int oldfd, int newfd, int flags)
 
LIB_PRIVATE void _real_exit (int status)
 
LIB_PRIVATE int _real_fcntl (int fd, int cmd, void *arg)
 
LIB_PRIVATE int _real_getpt (void)
 
LIB_PRIVATE int _real_posix_openpt (int flags)
 
LIB_PRIVATE int _real_ptsname_r (int fd, char *buf, size_t buflen)
 
int _real_ttyname_r (int fd, char *buf, size_t buflen)
 
LIB_PRIVATE int _real_socketpair (int d, int type, int protocol, int sv[2])
 
LIB_PRIVATE void _real_openlog (const char *ident, int option, int facility)
 
LIB_PRIVATE void _real_closelog (void)
 
LIB_PRIVATE sighandler_t _real_signal (int signum, sighandler_t handler)
 
LIB_PRIVATE int _real_sigaction (int signum, const struct sigaction *act, struct sigaction *oldact)
 
LIB_PRIVATE int _real_sigvec (int signum, const struct sigvec *vec, struct sigvec *ovec)
 
LIB_PRIVATE int _real_sigblock (int mask)
 
LIB_PRIVATE int _real_sigsetmask (int mask)
 
LIB_PRIVATE int _real_siggetmask (void)
 
LIB_PRIVATE int _real_sigprocmask (int how, const sigset_t *a, sigset_t *b)
 
LIB_PRIVATE int _real_pthread_sigmask (int how, const sigset_t *a, sigset_t *b)
 
LIB_PRIVATE void * _real_pthread_getspecific (pthread_key_t key)
 
LIB_PRIVATE int _real_sigsuspend (const sigset_t *mask)
 
LIB_PRIVATE sighandler_t _real_sigset (int sig, sighandler_t disp)
 
LIB_PRIVATE int _real_sighold (int sig)
 
LIB_PRIVATE int _real_sigignore (int sig)
 
LIB_PRIVATE int _real__sigpause (int __sig_or_mask, int __is_sig)
 
LIB_PRIVATE int _real_sigpause (int sig)
 
LIB_PRIVATE int _real_sigrelse (int sig)
 
LIB_PRIVATE int _real_sigwait (const sigset_t *set, int *sig)
 
LIB_PRIVATE int _real_sigwaitinfo (const sigset_t *set, siginfo_t *info)
 
LIB_PRIVATE int _real_sigtimedwait (const sigset_t *set, siginfo_t *info, const struct timespec *timeout)
 
LIB_PRIVATE int _real_open (const char *pathname, int flags,...)
 
LIB_PRIVATE int _real_waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options)
 
LIB_PRIVATE pid_t _real_wait4 (pid_t pid, __WAIT_STATUS status, int options, struct rusage *rusage)
 
LIB_PRIVATE int _real_open64 (const char *pathname, int flags,...)
 
LIB_PRIVATE FILE * _real_fopen (const char *path, const char *mode)
 
LIB_PRIVATE FILE * _real_fopen64 (const char *path, const char *mode)
 
LIB_PRIVATE int _real_openat (int dirfd, const char *pathname, int flags, mode_t mode)
 
LIB_PRIVATE int _real_openat64 (int dirfd, const char *pathname, int flags, mode_t mode)
 
LIB_PRIVATE DIR * _real_opendir (const char *name)
 
LIB_PRIVATE int _real_closedir (DIR *dir)
 
LIB_PRIVATE int _real_mkstemp (char *template)
 
LIB_PRIVATE long _real_syscall (long sys_num,...)
 
LIB_PRIVATE int _real_xstat (int vers, const char *path, struct stat *buf)
 
LIB_PRIVATE int _real_xstat64 (int vers, const char *path, struct stat64 *buf)
 
LIB_PRIVATE int _real_lxstat (int vers, const char *path, struct stat *buf)
 
LIB_PRIVATE int _real_lxstat64 (int vers, const char *path, struct stat64 *buf)
 
LIB_PRIVATE ssize_t _real_readlink (const char *path, char *buf, size_t bufsiz)
 
LIB_PRIVATE int _real_clone (int(*function)(void *), void *child_stack, int flags, void *arg, int *parent_tidptr, struct user_desc *newtls, int *child_tidptr)
 
LIB_PRIVATE int _real_pthread_tryjoin_np (pthread_t thread, void **retval)
 
LIB_PRIVATE int _real_pthread_timedjoin_np (pthread_t thread, void **retval, const struct timespec *abstime)
 
LIB_PRIVATE int _real_pthread_create (pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
 
LIB_PRIVATE void _real_pthread_exit (void *retval)
 
LIB_PRIVATE int _real_shmget (int key, size_t size, int shmflg)
 
LIB_PRIVATE void * _real_shmat (int shmid, const void *shmaddr, int shmflg)
 
LIB_PRIVATE int _real_shmdt (const void *shmaddr)
 
LIB_PRIVATE int _real_shmctl (int shmid, int cmd, struct shmid_ds *buf)
 
LIB_PRIVATE int _real_semget (key_t key, int nsems, int semflg)
 
LIB_PRIVATE int _real_semop (int semid, struct sembuf *sops, size_t nsops)
 
LIB_PRIVATE int _real_semtimedop (int semid, struct sembuf *sops, size_t nsops, const struct timespec *timeout)
 
LIB_PRIVATE int _real_semctl (int semid, int semnum, int cmd,...)
 
LIB_PRIVATE int _real_msgget (key_t key, int msgflg)
 
LIB_PRIVATE int _real_msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg)
 
LIB_PRIVATE ssize_t _real_msgrcv (int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg)
 
LIB_PRIVATE int _real_msgctl (int msqid, int cmd, struct msqid_ds *buf)
 
LIB_PRIVATE mqd_t _real_mq_open (const char *name, int oflag, mode_t mode, struct mq_attr *attr)
 
LIB_PRIVATE int _real_mq_close (mqd_t mqdes)
 
LIB_PRIVATE int _real_mq_notify (mqd_t mqdes, const struct sigevent *sevp)
 
LIB_PRIVATE ssize_t _real_mq_timedreceive (mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abs_timeout)
 
LIB_PRIVATE int _real_mq_timedsend (mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout)
 
LIB_PRIVATE void * _real_mmap (void *addr, size_t length, int prot, int flags, int fd, off_t offset)
 
LIB_PRIVATE void * _real_mmap64 (void *addr, size_t length, int prot, int flags, int fd, __off64_t offset)
 
LIB_PRIVATE void * _real_mremap (void *old_address, size_t old_size, size_t new_size, int flags)
 
LIB_PRIVATE int _real_munmap (void *addr, size_t length)
 
LIB_PRIVATE int _real_poll (struct pollfd *fds, nfds_t nfds, int timeout)
 

Variables

int dmtcp_wrappers_initializing
 

Macro Definition Documentation

#define _GNU_SOURCE

Definition at line 22 of file syscallsreal.c.

#define _XOPEN_SOURCE   500

Definition at line 23 of file syscallsreal.c.

#define GET_FUNC_ADDR (   name)    _real_func_addr[ENUM(name)] = _real_dlsym(RTLD_NEXT, #name);

Definition at line 248 of file syscallsreal.c.

#define GET_LIBPTHREAD_FUNC_ADDR (   name)    _real_func_addr[ENUM(name)] = dlvsym(RTLD_NEXT, #name, pthread_sym_ver);

Definition at line 286 of file syscallsreal.c.

#define IPC64_FLAG   0

Definition at line 977 of file syscallsreal.c.

#define IPC_64
Value:
0x0100 /* New version (support 32-bit UIDs, bigger
message sizes, etc. */

Definition at line 971 of file syscallsreal.c.

#define REAL_FUNC_PASSTHROUGH (   name)    REAL_FUNC_PASSTHROUGH_TYPED(int, name)

Definition at line 319 of file syscallsreal.c.

#define REAL_FUNC_PASSTHROUGH_NORETURN (   name)
Value:
static void (*fn)() __attribute__ ((__noreturn__)) = NULL; \
REAL_FUNC_PASSTHROUGH_WORK(name) \
(*fn)

Definition at line 344 of file syscallsreal.c.

#define REAL_FUNC_PASSTHROUGH_TYPED (   type,
  name 
)
Value:
static type (*fn)() = NULL; \
REAL_FUNC_PASSTHROUGH_WORK(name) \
return (*fn)

Definition at line 334 of file syscallsreal.c.

#define REAL_FUNC_PASSTHROUGH_VOID (   name)
Value:
static void (*fn)() = NULL; \
REAL_FUNC_PASSTHROUGH_WORK(name) \
(*fn)

Definition at line 339 of file syscallsreal.c.

#define REAL_FUNC_PASSTHROUGH_WORK (   name)
Value:
if (fn == NULL) { \
if (_real_func_addr[ENUM(name)] == NULL) dmtcp_prepare_wrappers(); \
fn = _real_func_addr[ENUM(name)]; \
if (fn == NULL) { \
fprintf(stderr, "*** DMTCP: Error: lookup failed for %s.\n" \
" The symbol wasn't found in current library" \
" loading sequence.\n" \
" Aborting.\n", #name); \
abort(); \
} \
}

Definition at line 321 of file syscallsreal.c.

Typedef Documentation

typedef void*(* dlsym_fnptr_t)(void *handle, const char *symbol)

Definition at line 349 of file syscallsreal.c.

typedef pid_t(* funcptr_pid_t)()

Definition at line 50 of file syscallsreal.c.

typedef int(* funcptr_t)()

Definition at line 49 of file syscallsreal.c.

typedef funcptr_t(* signal_funcptr_t)()

Definition at line 51 of file syscallsreal.c.

Function Documentation

void* __pthread_getspecific ( pthread_key_t  key)

Definition at line 226 of file syscallsreal.c.

void _dmtcp_lock ( )

Definition at line 67 of file syscallsreal.c.

void _dmtcp_remutex_on_fork ( )

Definition at line 70 of file syscallsreal.c.

void _dmtcp_unlock ( )

Definition at line 68 of file syscallsreal.c.

LIB_PRIVATE int _dmtcp_unsetenv ( const char *  name)

Definition at line 382 of file syscallsreal.c.

LIB_PRIVATE int _real__sigpause ( int  __sig_or_mask,
int  __is_sig 
)

Definition at line 776 of file syscallsreal.c.

LIB_PRIVATE int _real_accept ( int  sockfd,
struct sockaddr *  addr,
socklen_t *  addrlen 
)

call the libc version of this function via dlopen/dlsym

Definition at line 552 of file syscallsreal.c.

LIB_PRIVATE int _real_accept4 ( int  sockfd,
struct sockaddr *  addr,
socklen_t *  addrlen,
int  flags 
)

Definition at line 558 of file syscallsreal.c.

LIB_PRIVATE int _real_bind ( int  sockfd,
const struct sockaddr *  my_addr,
socklen_t  addrlen 
)

call the libc version of this function via dlopen/dlsym

Definition at line 539 of file syscallsreal.c.

LIB_PRIVATE int _real_clone ( int(*)(void *)  function,
void *  child_stack,
int  flags,
void *  arg,
int *  parent_tidptr,
struct user_desc newtls,
int *  child_tidptr 
)

Definition at line 918 of file syscallsreal.c.

LIB_PRIVATE int _real_close ( int  fd)

Definition at line 630 of file syscallsreal.c.

LIB_PRIVATE int _real_closedir ( DIR *  dir)

Definition at line 865 of file syscallsreal.c.

LIB_PRIVATE void _real_closelog ( void  )

Definition at line 707 of file syscallsreal.c.

LIB_PRIVATE int _real_connect ( int  sockfd,
const struct sockaddr *  serv_addr,
socklen_t  addrlen 
)

call the libc version of this function via dlopen/dlsym

Definition at line 532 of file syscallsreal.c.

LIB_PRIVATE int _real_dlclose ( void *  handle)

Definition at line 397 of file syscallsreal.c.

LIB_PRIVATE void* _real_dlopen ( const char *  filename,
int  flag 
)

Definition at line 392 of file syscallsreal.c.

LIB_PRIVATE void* _real_dlsym ( void *  handle,
const char *  symbol 
)

Definition at line 353 of file syscallsreal.c.

LIB_PRIVATE int _real_dup ( int  oldfd)

Definition at line 642 of file syscallsreal.c.

LIB_PRIVATE int _real_dup2 ( int  oldfd,
int  newfd 
)

Definition at line 648 of file syscallsreal.c.

LIB_PRIVATE int _real_dup3 ( int  oldfd,
int  newfd,
int  flags 
)

Definition at line 654 of file syscallsreal.c.

LIB_PRIVATE int _real_execv ( const char *  path,
char *const  argv[] 
)

Definition at line 592 of file syscallsreal.c.

LIB_PRIVATE int _real_execve ( const char *  filename,
char *const  argv[],
char *const  envp[] 
)

Definition at line 585 of file syscallsreal.c.

LIB_PRIVATE int _real_execvp ( const char *  file,
char *const  argv[] 
)

Definition at line 598 of file syscallsreal.c.

LIB_PRIVATE int _real_execvpe ( const char *  file,
char *const  argv[],
char *const  envp[] 
)

Definition at line 603 of file syscallsreal.c.

LIB_PRIVATE void _real_exit ( int  status)

Definition at line 660 of file syscallsreal.c.

LIB_PRIVATE int _real_fclose ( FILE *  fp)

Definition at line 636 of file syscallsreal.c.

LIB_PRIVATE int _real_fcntl ( int  fd,
int  cmd,
void *  arg 
)

Definition at line 666 of file syscallsreal.c.

LIB_PRIVATE int _real_fexecve ( int  fd,
char *const  argv[],
char *const  envp[] 
)

Definition at line 579 of file syscallsreal.c.

LIB_PRIVATE FILE* _real_fopen ( const char *  path,
const char *  mode 
)

Definition at line 840 of file syscallsreal.c.

LIB_PRIVATE FILE* _real_fopen64 ( const char *  path,
const char *  mode 
)

Definition at line 845 of file syscallsreal.c.

LIB_PRIVATE pid_t _real_fork ( void  )

Definition at line 624 of file syscallsreal.c.

LIB_PRIVATE int _real_getpt ( void  )

Definition at line 672 of file syscallsreal.c.

LIB_PRIVATE int _real_getsockopt ( int  s,
int  level,
int  optname,
void *  optval,
socklen_t *  optlen 
)

Definition at line 572 of file syscallsreal.c.

LIB_PRIVATE int _real_listen ( int  sockfd,
int  backlog 
)

call the libc version of this function via dlopen/dlsym

Definition at line 546 of file syscallsreal.c.

LIB_PRIVATE int _real_lxstat ( int  vers,
const char *  path,
struct stat *  buf 
)

Definition at line 903 of file syscallsreal.c.

LIB_PRIVATE int _real_lxstat64 ( int  vers,
const char *  path,
struct stat64 *  buf 
)

Definition at line 908 of file syscallsreal.c.

LIB_PRIVATE int _real_mkstemp ( char *  template)

Definition at line 870 of file syscallsreal.c.

LIB_PRIVATE void* _real_mmap ( void *  addr,
size_t  length,
int  prot,
int  flags,
int  fd,
off_t  offset 
)

Definition at line 1067 of file syscallsreal.c.

LIB_PRIVATE void* _real_mmap64 ( void *  addr,
size_t  length,
int  prot,
int  flags,
int  fd,
__off64_t  offset 
)

Definition at line 1073 of file syscallsreal.c.

LIB_PRIVATE int _real_mq_close ( mqd_t  mqdes)

Definition at line 1040 of file syscallsreal.c.

LIB_PRIVATE int _real_mq_notify ( mqd_t  mqdes,
const struct sigevent *  sevp 
)

Definition at line 1045 of file syscallsreal.c.

LIB_PRIVATE mqd_t _real_mq_open ( const char *  name,
int  oflag,
mode_t  mode,
struct mq_attr *  attr 
)

Definition at line 1034 of file syscallsreal.c.

LIB_PRIVATE ssize_t _real_mq_timedreceive ( mqd_t  mqdes,
char *  msg_ptr,
size_t  msg_len,
unsigned int *  msg_prio,
const struct timespec *  abs_timeout 
)

Definition at line 1050 of file syscallsreal.c.

LIB_PRIVATE int _real_mq_timedsend ( mqd_t  mqdes,
const char *  msg_ptr,
size_t  msg_len,
unsigned int  msg_prio,
const struct timespec *  abs_timeout 
)

Definition at line 1059 of file syscallsreal.c.

LIB_PRIVATE void* _real_mremap ( void *  old_address,
size_t  old_size,
size_t  new_size,
int  flags 
)

Definition at line 1096 of file syscallsreal.c.

LIB_PRIVATE int _real_msgctl ( int  msqid,
int  cmd,
struct msqid_ds *  buf 
)

Definition at line 1028 of file syscallsreal.c.

LIB_PRIVATE int _real_msgget ( key_t  key,
int  msgflg 
)

Definition at line 1012 of file syscallsreal.c.

LIB_PRIVATE ssize_t _real_msgrcv ( int  msqid,
void *  msgp,
size_t  msgsz,
long  msgtyp,
int  msgflg 
)

Definition at line 1022 of file syscallsreal.c.

LIB_PRIVATE int _real_msgsnd ( int  msqid,
const void *  msgp,
size_t  msgsz,
int  msgflg 
)

Definition at line 1017 of file syscallsreal.c.

LIB_PRIVATE int _real_munmap ( void *  addr,
size_t  length 
)

Definition at line 1104 of file syscallsreal.c.

LIB_PRIVATE int _real_open ( const char *  pathname,
int  flags,
  ... 
)

Definition at line 803 of file syscallsreal.c.

LIB_PRIVATE int _real_open64 ( const char *  pathname,
int  flags,
  ... 
)

Definition at line 827 of file syscallsreal.c.

LIB_PRIVATE int _real_openat ( int  dirfd,
const char *  pathname,
int  flags,
mode_t  mode 
)

Definition at line 850 of file syscallsreal.c.

LIB_PRIVATE int _real_openat64 ( int  dirfd,
const char *  pathname,
int  flags,
mode_t  mode 
)

Definition at line 855 of file syscallsreal.c.

LIB_PRIVATE DIR* _real_opendir ( const char *  name)

Definition at line 860 of file syscallsreal.c.

LIB_PRIVATE void _real_openlog ( const char *  ident,
int  option,
int  facility 
)

Definition at line 701 of file syscallsreal.c.

LIB_PRIVATE int _real_pclose ( FILE *  fp)

Definition at line 619 of file syscallsreal.c.

LIB_PRIVATE int _real_poll ( struct pollfd *  fds,
nfds_t  nfds,
int  timeout 
)

Definition at line 1109 of file syscallsreal.c.

LIB_PRIVATE FILE* _real_popen ( const char *  command,
const char *  mode 
)

Definition at line 614 of file syscallsreal.c.

LIB_PRIVATE int _real_posix_openpt ( int  flags)

Definition at line 678 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_cond_broadcast ( pthread_cond_t *  cond)

Definition at line 442 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_cond_destroy ( pthread_cond_t *  cond)

Definition at line 453 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_cond_init ( pthread_cond_t *  cond,
const pthread_condattr_t *  attr 
)

Definition at line 464 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_cond_signal ( pthread_cond_t *  cond)

Definition at line 476 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_cond_timedwait ( pthread_cond_t *  cond,
pthread_mutex_t *  mutex,
const struct timespec *  abstime 
)

Definition at line 487 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_cond_wait ( pthread_cond_t *  cond,
pthread_mutex_t *  mutex 
)

Definition at line 499 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_create ( pthread_t *  thread,
const pthread_attr_t *  attr,
void *(*)(void *)  start_routine,
void *  arg 
)

Definition at line 936 of file syscallsreal.c.

LIB_PRIVATE void _real_pthread_exit ( void *  retval)

Definition at line 944 of file syscallsreal.c.

LIB_PRIVATE void* _real_pthread_getspecific ( pthread_key_t  key)

Definition at line 752 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_mutex_lock ( pthread_mutex_t *  mutex)

Definition at line 402 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_mutex_trylock ( pthread_mutex_t *  mutex)

Definition at line 407 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_mutex_unlock ( pthread_mutex_t *  mutex)

Definition at line 412 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_rwlock_rdlock ( pthread_rwlock_t *  rwlock)

Definition at line 422 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_rwlock_tryrdlock ( pthread_rwlock_t *  rwlock)

Definition at line 427 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_rwlock_trywrlock ( pthread_rwlock_t *  rwlock)

Definition at line 437 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_rwlock_unlock ( pthread_rwlock_t *  rwlock)

Definition at line 417 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_rwlock_wrlock ( pthread_rwlock_t *  rwlock)

Definition at line 432 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_sigmask ( int  how,
const sigset_t *  a,
sigset_t *  b 
)

Definition at line 747 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_timedjoin_np ( pthread_t  thread,
void **  retval,
const struct timespec *  abstime 
)

Definition at line 930 of file syscallsreal.c.

LIB_PRIVATE int _real_pthread_tryjoin_np ( pthread_t  thread,
void **  retval 
)

Definition at line 925 of file syscallsreal.c.

LIB_PRIVATE int _real_ptsname_r ( int  fd,
char *  buf,
size_t  buflen 
)

Definition at line 684 of file syscallsreal.c.

LIB_PRIVATE ssize_t _real_read ( int  fd,
void *  buf,
size_t  count 
)

Definition at line 510 of file syscallsreal.c.

LIB_PRIVATE ssize_t _real_readlink ( const char *  path,
char *  buf,
size_t  bufsiz 
)

Definition at line 913 of file syscallsreal.c.

LIB_PRIVATE int _real_select ( int  nfds,
fd_set *  readfds,
fd_set *  writefds,
fd_set *  exceptfds,
struct timeval *  timeout 
)

Definition at line 520 of file syscallsreal.c.

LIB_PRIVATE int _real_semctl ( int  semid,
int  semnum,
int  cmd,
  ... 
)

Definition at line 1002 of file syscallsreal.c.

LIB_PRIVATE int _real_semget ( key_t  key,
int  nsems,
int  semflg 
)

Definition at line 986 of file syscallsreal.c.

LIB_PRIVATE int _real_semop ( int  semid,
struct sembuf *  sops,
size_t  nsops 
)

Definition at line 991 of file syscallsreal.c.

LIB_PRIVATE int _real_semtimedop ( int  semid,
struct sembuf *  sops,
size_t  nsops,
const struct timespec *  timeout 
)

Definition at line 996 of file syscallsreal.c.

LIB_PRIVATE int _real_setsockopt ( int  s,
int  level,
int  optname,
const void *  optval,
socklen_t  optlen 
)

call the libc version of this function via dlopen/dlsym

Definition at line 565 of file syscallsreal.c.

LIB_PRIVATE void* _real_shmat ( int  shmid,
const void *  shmaddr,
int  shmflg 
)

Definition at line 954 of file syscallsreal.c.

LIB_PRIVATE int _real_shmctl ( int  shmid,
int  cmd,
struct shmid_ds *  buf 
)

Definition at line 981 of file syscallsreal.c.

LIB_PRIVATE int _real_shmdt ( const void *  shmaddr)

Definition at line 959 of file syscallsreal.c.

LIB_PRIVATE int _real_shmget ( int  key,
size_t  size,
int  shmflg 
)

Definition at line 949 of file syscallsreal.c.

LIB_PRIVATE int _real_sigaction ( int  signum,
const struct sigaction act,
struct sigaction oldact 
)

Definition at line 718 of file syscallsreal.c.

LIB_PRIVATE int _real_sigblock ( int  mask)

Definition at line 731 of file syscallsreal.c.

LIB_PRIVATE int _real_siggetmask ( void  )

Definition at line 739 of file syscallsreal.c.

LIB_PRIVATE int _real_sighold ( int  sig)

Definition at line 767 of file syscallsreal.c.

LIB_PRIVATE int _real_sigignore ( int  sig)

Definition at line 771 of file syscallsreal.c.

LIB_PRIVATE sighandler_t _real_signal ( int  signum,
sighandler_t  handler 
)

Definition at line 714 of file syscallsreal.c.

LIB_PRIVATE int _real_sigpause ( int  sig)

Definition at line 780 of file syscallsreal.c.

LIB_PRIVATE int _real_sigprocmask ( int  how,
const sigset_t *  a,
sigset_t *  b 
)

Definition at line 743 of file syscallsreal.c.

LIB_PRIVATE int _real_sigrelse ( int  sig)

Definition at line 784 of file syscallsreal.c.

LIB_PRIVATE sighandler_t _real_sigset ( int  sig,
sighandler_t  disp 
)

Definition at line 762 of file syscallsreal.c.

LIB_PRIVATE int _real_sigsetmask ( int  mask)

Definition at line 735 of file syscallsreal.c.

LIB_PRIVATE int _real_sigsuspend ( const sigset_t *  mask)

Definition at line 758 of file syscallsreal.c.

LIB_PRIVATE int _real_sigtimedwait ( const sigset_t *  set,
siginfo_t *  info,
const struct timespec *  timeout 
)

Definition at line 797 of file syscallsreal.c.

LIB_PRIVATE int _real_sigvec ( int  signum,
const struct sigvec vec,
struct sigvec ovec 
)

Definition at line 724 of file syscallsreal.c.

LIB_PRIVATE int _real_sigwait ( const sigset_t *  set,
int *  sig 
)

Definition at line 789 of file syscallsreal.c.

LIB_PRIVATE int _real_sigwaitinfo ( const sigset_t *  set,
siginfo_t *  info 
)

Definition at line 793 of file syscallsreal.c.

LIB_PRIVATE int _real_socket ( int  domain,
int  type,
int  protocol 
)

call the libc version of this function via dlopen/dlsym

Definition at line 526 of file syscallsreal.c.

LIB_PRIVATE int _real_socketpair ( int  d,
int  type,
int  protocol,
int  sv[2] 
)

Definition at line 695 of file syscallsreal.c.

LIB_PRIVATE long _real_syscall ( long  sys_num,
  ... 
)

Definition at line 876 of file syscallsreal.c.

LIB_PRIVATE int _real_system ( const char *  cmd)

Definition at line 608 of file syscallsreal.c.

int _real_ttyname_r ( int  fd,
char *  buf,
size_t  buflen 
)

Definition at line 689 of file syscallsreal.c.

LIB_PRIVATE pid_t _real_wait4 ( pid_t  pid,
__WAIT_STATUS  status,
int  options,
struct rusage *  rusage 
)

Definition at line 821 of file syscallsreal.c.

LIB_PRIVATE int _real_waitid ( idtype_t  idtype,
id_t  id,
siginfo_t *  infop,
int  options 
)

Definition at line 816 of file syscallsreal.c.

LIB_PRIVATE ssize_t _real_write ( int  fd,
const void *  buf,
size_t  count 
)

Definition at line 515 of file syscallsreal.c.

LIB_PRIVATE int _real_xstat ( int  vers,
const char *  path,
struct stat *  buf 
)

Definition at line 893 of file syscallsreal.c.

LIB_PRIVATE int _real_xstat64 ( int  vers,
const char *  path,
struct stat64 *  buf 
)

Definition at line 898 of file syscallsreal.c.

void* dmtcp_get_libc_dlsym_addr ( void  )

Definition at line 408 of file dmtcpplugin.cpp.

LIB_PRIVATE pid_t dmtcp_gettid ( )

Definition at line 56 of file syscallsreal.c.

void dmtcp_prepare_wrappers ( )

Definition at line 145 of file dmtcpworker.cpp.

LIB_PRIVATE int dmtcp_tgkill ( int  tgid,
int  tid,
int  sig 
)

Definition at line 62 of file syscallsreal.c.

LIB_PRIVATE int dmtcp_tkill ( int  tid,
int  sig 
)

Definition at line 59 of file syscallsreal.c.

LIB_PRIVATE void initialize_libc_wrappers ( )

Definition at line 252 of file syscallsreal.c.

LIB_PRIVATE void initialize_libpthread_wrappers ( )

Definition at line 297 of file syscallsreal.c.

void* pthread_getspecific ( pthread_key_t  key)

Definition at line 242 of file syscallsreal.c.

Variable Documentation

int dmtcp_wrappers_initializing

Definition at line 42 of file dmtcpworker.cpp.