DMTCP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros | Typedefs | Enumerations | Functions
threadinfo.h File Reference
#include <ucontext.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/syscall.h>
#include <linux/version.h>
#include "syscallwrappers.h"
#include "protectedfds.h"
#include "mtcp/restore_libc.h"

Go to the source code of this file.

Classes

struct  Thread
 

Macros

#define GETTID()   (pid_t)_real_syscall(SYS_gettid)
 
#define TGKILL(pid, tid, sig)   _real_syscall(SYS_tgkill, pid, tid, sig)
 
#define THREAD_REAL_PID()   (dmtcp_get_real_pid != NULL ? dmtcp_get_real_pid() : getpid())
 
#define THREAD_REAL_TID()   (dmtcp_get_real_tid != NULL ? dmtcp_get_real_tid() : GETTID())
 
#define THREAD_TGKILL(pid, tid, sig)
 

Typedefs

typedef int(* fptr )(void *)
 
typedef enum ThreadState ThreadState
 
typedef struct Thread Thread
 

Enumerations

enum  ThreadState {
  ST_RUNNING, ST_SIGNALED, ST_SUSPINPROG, ST_SUSPENDED,
  ST_ZOMBIE, ST_CKPNTHREAD
}
 

Functions

pid_t dmtcp_get_real_tid () __attribute((weak))
 
pid_t dmtcp_get_real_pid () __attribute((weak))
 
int dmtcp_real_tgkill (pid_t pid, pid_t tid, int sig) __attribute((weak))
 

Macro Definition Documentation

#define GETTID ( )    (pid_t)_real_syscall(SYS_gettid)

Definition at line 33 of file threadinfo.h.

#define TGKILL (   pid,
  tid,
  sig 
)    _real_syscall(SYS_tgkill, pid, tid, sig)

Definition at line 34 of file threadinfo.h.

#define THREAD_REAL_PID ( )    (dmtcp_get_real_pid != NULL ? dmtcp_get_real_pid() : getpid())

Definition at line 40 of file threadinfo.h.

#define THREAD_REAL_TID ( )    (dmtcp_get_real_tid != NULL ? dmtcp_get_real_tid() : GETTID())

Definition at line 43 of file threadinfo.h.

#define THREAD_TGKILL (   pid,
  tid,
  sig 
)
Value:
(dmtcp_real_tgkill != NULL ? dmtcp_real_tgkill(pid,tid,sig) \
: TGKILL(pid, tid, sig))

Definition at line 46 of file threadinfo.h.

Typedef Documentation

typedef int(* fptr)(void *)

Definition at line 50 of file threadinfo.h.

typedef struct Thread Thread

Definition at line 61 of file threadinfo.h.

typedef enum ThreadState ThreadState

Enumeration Type Documentation

Enumerator
ST_RUNNING 
ST_SIGNALED 
ST_SUSPINPROG 
ST_SUSPENDED 
ST_ZOMBIE 
ST_CKPNTHREAD 

Definition at line 52 of file threadinfo.h.

Function Documentation

pid_t dmtcp_get_real_pid ( )

Definition at line 51 of file pid.cpp.

pid_t dmtcp_get_real_tid ( )

Definition at line 57 of file pid.cpp.

int dmtcp_real_tgkill ( pid_t  pid,
pid_t  tid,
int  sig 
)

Definition at line 63 of file pid.cpp.