DMTCP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions
restore_libc.h File Reference
#include "ldt.h"
#include "protectedfds.h"
#include "mtcp_header.h"

Go to the source code of this file.

Macros

#define CLEAN_FOR_64_BIT(args...)   "CLEAN_FOR_64_BIT_undefined"
 
#define PRINTF(fmt,...)
 
#define DPRINTF(args...)
 
#define ASSERT(condition)
 
#define ASSERT_NOT_REACHED()
 

Functions

int TLSInfo_GetTidOffset ()
 
int TLSInfo_GetPidOffset ()
 
void TLSInfo_PostRestart ()
 
void TLSInfo_VerifyPidTid (pid_t pid, pid_t tid)
 
void TLSInfo_UpdatePid ()
 
void TLSInfo_SaveTLSState (ThreadTLSInfo *tlsInfo)
 
void TLSInfo_RestoreTLSState (ThreadTLSInfo *tlsInfo)
 
void TLSInfo_SetThreadSysinfo (void *sysinfo)
 
void * TLSInfo_GetThreadSysinfo ()
 
int TLSInfo_HaveThreadSysinfoOffset ()
 
void Thread_RestoreAllThreads (void)
 

Macro Definition Documentation

#define ASSERT (   condition)
Value:
do { \
if (! (condition)) { \
PRINTF("Assertion failed: %s\n", #condition); \
_exit(0); \
} \
} while (0);

Definition at line 66 of file restore_libc.h.

#define ASSERT_NOT_REACHED ( )
Value:
do { \
PRINTF("NOT_REACHED Assertion failed.\n"); \
_exit(0); \
} while (0);

Definition at line 74 of file restore_libc.h.

#define CLEAN_FOR_64_BIT (   args...)    "CLEAN_FOR_64_BIT_undefined"

Definition at line 44 of file restore_libc.h.

#define DPRINTF (   args...)

Definition at line 63 of file restore_libc.h.

#define PRINTF (   fmt,
  ... 
)
Value:
do { \
/* In some cases, the user stack may be very small (less than 10KB). */ \
/* We will overrun the buffer with just two extra stack frames. */ \
char buf[256]; \
int c = snprintf(buf, sizeof(buf) - 1, "[%d] %s:%d in %s; REASON= " fmt, \
getpid(), __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); \
if (c == sizeof(buf) - 1) buf[c] = '\n'; \
/* assign to rc in order to avoid 'unused result' compiler warnings */ \
ssize_t rc __attribute__((unused)); \
rc = write(PROTECTED_STDERR_FD, buf, c + 1); \
} while (0);

Definition at line 47 of file restore_libc.h.

Function Documentation

void Thread_RestoreAllThreads ( void  )
int TLSInfo_GetPidOffset ( )

Definition at line 222 of file restore_libc.c.

void* TLSInfo_GetThreadSysinfo ( )

Definition at line 408 of file restore_libc.c.

int TLSInfo_GetTidOffset ( )

Definition at line 158 of file restore_libc.c.

int TLSInfo_HaveThreadSysinfoOffset ( )

Definition at line 380 of file restore_libc.c.

void TLSInfo_PostRestart ( )
void TLSInfo_RestoreTLSState ( ThreadTLSInfo tlsInfo)

Definition at line 508 of file restore_libc.c.

void TLSInfo_SaveTLSState ( ThreadTLSInfo tlsInfo)

Definition at line 469 of file restore_libc.c.

void TLSInfo_SetThreadSysinfo ( void *  sysinfo)

Definition at line 425 of file restore_libc.c.

void TLSInfo_UpdatePid ( )

Definition at line 456 of file restore_libc.c.

void TLSInfo_VerifyPidTid ( pid_t  pid,
pid_t  tid 
)

Definition at line 442 of file restore_libc.c.