Coda Distributed File System
|
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include <fcntl.h>
#include <sys/param.h>
#include <sys/mman.h>
#include <assert.h>
#include <lwp/lwp.h>
#include "lwp.private.h"
#include "lwp_ucontext.h"
#include "lwp_stacktrace.h"
#include "valgrind.h"
Classes | |
struct | QUEUE |
Macros | |
#define | MAP_FAILED ((void *)-1) |
#define | ON 1 |
#define | OFF 0 |
#define | READY 2 |
#define | WAITING 3 |
#define | MINSTACK 32768 /* allocate at least 32KB for stacks */ |
#define | STACKPAD 4096 /* pad any requested stack size to PAGE_SIZE */ |
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
#define | LWPANCHOR (*lwp_init) |
#define | MAX_PRIORITIES (LWP_MAX_PRIORITY + 1) |
#define | REAPER_STACKSIZE 32768 |
#define | TRACER_STACKSIZE 32768 |
#define | timercmp(tvp, uvp, cmp) |
#define | timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) |
#define | timerclear(tvp) |
#define | for_all_elts(var, q, body) |
#define | STACKMAGIC 0xBADBADBA |
Functions | |
int | LWP_TerminateProcessSupport (void) |
int | LWP_GetRock (int Tag, char **Value) |
int | LWP_NewRock (int Tag, char *Value) |
int | LWP_CurrentProcess (PROCESS *pid) |
PROCESS | LWP_ThisProcess () |
void | LWP_SetLog (FILE *file, int level) |
int | LWP_GetProcessPriority (PROCESS pid, int *priority) |
int | LWP_WaitProcess (const void *event) |
char * | LWP_Name () |
int | LWP_Index () |
int | LWP_HighestIndex () |
int | LWP_QWait () |
int | LWP_QSignal (PROCESS pid) |
int | LWP_CreateProcess (void(*ep)(void *), int stacksize, int priority, void *parm, const char *name, PROCESS *pid) |
int | LWP_DestroyProcess (PROCESS pid) |
void | LWP_Print_Processes (void) |
int | LWP_Init (int version, int priority, PROCESS *pid) |
int | LWP_MwaitProcess (int wcount, const void *evlist[]) |
int | LWP_DispatchProcess (void) |
int | LWP_INTERNALSIGNAL (const void *event, int yield) |
int | LWP_StackUsed (PROCESS pid, int *max, int *used) |
void | PRE_Concurrent (int on) |
void | PRE_BeginCritical (void) |
void | PRE_EndCritical (void) |
Variables | |
struct QUEUE | runnable [MAX_PRIORITIES] |
struct QUEUE | blocked [MAX_PRIORITIES] |
FILE * | lwp_logfile = NULL |
int | lwp_debug = 0 |
int | LWP_TraceProcesses = 0 |
PROCESS | lwp_cpptr |
int | lwp_nextindex |
int | Cont_Sws |
struct timeval | last_context_switch |
struct timeval | cont_sw_threshold |
PROCESS | cont_sw_id |
struct timeval | run_wait_threshold |
int | lwp_overflowAction = LWP_SOABORT |
int | lwp_stackUseEnabled = 1 |
#define LWPANCHOR (*lwp_init) |
#define MAP_FAILED ((void *)-1) |
#define MAX | ( | a, | |
b | |||
) | ((a) > (b) ? (a) : (b)) |
#define MAX_PRIORITIES (LWP_MAX_PRIORITY + 1) |
#define OFF 0 |
#define ON 1 |
#define READY 2 |
#define REAPER_STACKSIZE 32768 |
#define STACKMAGIC 0xBADBADBA |
#define timerclear | ( | tvp | ) |
#define timercmp | ( | tvp, | |
uvp, | |||
cmp | |||
) |
#define timerisset | ( | tvp | ) | ((tvp)->tv_sec || (tvp)->tv_usec) |
#define TRACER_STACKSIZE 32768 |
#define WAITING 3 |
int LWP_CreateProcess | ( | void(*)(void *) | ep, |
int | stacksize, | ||
int | priority, | ||
void * | parm, | ||
const char * | name, | ||
PROCESS * | pid | ||
) |
int LWP_CurrentProcess | ( | PROCESS * | pid | ) |
int LWP_DestroyProcess | ( | PROCESS | pid | ) |
int LWP_DispatchProcess | ( | void | ) |
int LWP_GetProcessPriority | ( | PROCESS | pid, |
int * | priority | ||
) |
int LWP_GetRock | ( | int | Tag, |
char ** | Value | ||
) |
int LWP_HighestIndex | ( | ) |
int LWP_Index | ( | ) |
int LWP_Init | ( | int | version, |
int | priority, | ||
PROCESS * | pid | ||
) |
int LWP_INTERNALSIGNAL | ( | const void * | event, |
int | yield | ||
) |
int LWP_MwaitProcess | ( | int | wcount, |
const void * | evlist[] | ||
) |
char * LWP_Name | ( | void | ) |
int LWP_NewRock | ( | int | Tag, |
char * | Value | ||
) |
void LWP_Print_Processes | ( | void | ) |
int LWP_QSignal | ( | PROCESS | pid | ) |
int LWP_QWait | ( | ) |
void LWP_SetLog | ( | FILE * | file, |
int | level | ||
) |
int LWP_StackUsed | ( | PROCESS | pid, |
int * | max, | ||
int * | used | ||
) |
int LWP_TerminateProcessSupport | ( | void | ) |
PROCESS LWP_ThisProcess | ( | void | ) |
int LWP_WaitProcess | ( | const void * | event | ) |
void PRE_BeginCritical | ( | void | ) |
void PRE_Concurrent | ( | int | on | ) |
void PRE_EndCritical | ( | void | ) |
struct QUEUE blocked[MAX_PRIORITIES] |
PROCESS cont_sw_id |
struct timeval cont_sw_threshold |
int Cont_Sws |
struct timeval last_context_switch |
PROCESS lwp_cpptr |
int lwp_debug = 0 |
FILE* lwp_logfile = NULL |
int lwp_nextindex |
int lwp_overflowAction = LWP_SOABORT |
int lwp_stackUseEnabled = 1 |
int LWP_TraceProcesses = 0 |
struct timeval run_wait_threshold |
struct QUEUE runnable[MAX_PRIORITIES] |