Coda Distributed File System
Macros | Typedefs | Functions | Variables
lwp.h File Reference
#include <sys/time.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <stdio.h>
Include dependency graph for lwp.h:

Go to the source code of this file.

Macros

#define LWP_VERSION   210888002 /* old lwp */
 
#define LWP_SUCCESS   0
 
#define LWP_EBADPID   -1
 
#define LWP_EBLOCKED   -2
 
#define LWP_EINIT   -3
 
#define LWP_EMAXPROC   -4
 
#define LWP_ENOBLOCK   -5
 
#define LWP_ENOMEM   -6
 
#define LWP_ENOPROCESS   -7
 
#define LWP_ENOWAIT   -8
 
#define LWP_EBADCOUNT   -9
 
#define LWP_EBADEVENT   -10
 
#define LWP_EBADPRI   -11
 
#define LWP_NO_STACK   -12
 
#define LWP_EBADSIG   -13 /* bad signal number */
 
#define LWP_ESYSTEM   -14 /* system call failed */
 
#define LWP_ENOROCKS   -15 /* all rocks are in use */
 
#define LWP_EBADROCK   -16 /* the specified rock does not exist */
 
#define LWP_MAX_PRIORITY   4
 
#define LWP_NORMAL_PRIORITY   (LWP_MAX_PRIORITY - 1)
 
#define LWP_SOQUIET   1 /* do nothing */
 
#define LWP_SOABORT   2 /* abort the program */
 
#define LWP_SOMESSAGE   3 /* print a message and be quiet */
 
#define LWP_SignalProcess(event)   LWP_INTERNALSIGNAL(event, 1)
 
#define LWP_NoYieldSignal(event)   LWP_INTERNALSIGNAL(event, 0)
 

Typedefs

typedef struct lwp_pcbPROCESS
 

Functions

void LWP_SetLog (FILE *file, int level)
 
int LWP_QWait ()
 
int LWP_QSignal (PROCESS pid)
 
int LWP_Init (int version, int priority, PROCESS *pid)
 
int LWP_TerminateProcessSupport ()
 
int LWP_CreateProcess (void(*ep)(void *), int stacksize, int priority, void *parm, const char *name, PROCESS *pid)
 
int LWP_CurrentProcess (PROCESS *pid)
 
PROCESS LWP_ThisProcess ()
 
int LWP_DestroyProcess (PROCESS pid)
 
int LWP_DispatchProcess ()
 
int LWP_GetProcessPriority (PROCESS pid, int *priority)
 
int LWP_INTERNALSIGNAL (const void *event, int yield)
 
int LWP_WaitProcess (const void *event)
 
int LWP_MwaitProcess (int wcount, const void *evlist[])
 
int LWP_StackUsed (PROCESS pid, int *max, int *used)
 
int LWP_NewRock (int Tag, char *Value)
 
int LWP_GetRock (int Tag, char **Value)
 
char * LWP_Name ()
 
int LWP_Index ()
 
int LWP_HighestIndex ()
 
void LWP_UnProtectStacks ()
 
void LWP_ProtectStacks ()
 
void PRE_Concurrent (int on)
 
void PRE_BeginCritical (void)
 
void PRE_EndCritical (void)
 
int IOMGR_SoftSig (void(*aproc)(void *), char *arock)
 
int IOMGR_Initialize ()
 
int IOMGR_Finalize ()
 
int IOMGR_Poll ()
 
int IOMGR_Select (int fds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
 
int IOMGR_Cancel (PROCESS pid)
 
int IOMGR_Signal (int signo, char *event)
 
int IOMGR_CancelSignal (int signo)
 
int FT_Init (int printErrors, int notReally)
 
int FT_GetTimeOfDay (struct timeval *tv, struct timezone *tz)
 
int TM_GetTimeOfDay (struct timeval *tv, struct timezone *tz)
 
int FT_AGetTimeOfDay (struct timeval *tv, struct timezone *tz)
 
unsigned int FT_ApproxTime ()
 

Variables

int lwp_debug
 
int lwp_overflowAction
 
int lwp_stackUseEnabled
 
struct timeval last_context_switch
 
struct timeval cont_sw_threshold
 
struct timeval run_wait_threshold
 

Macro Definition Documentation

◆ LWP_EBADCOUNT

#define LWP_EBADCOUNT   -9

◆ LWP_EBADEVENT

#define LWP_EBADEVENT   -10

◆ LWP_EBADPID

#define LWP_EBADPID   -1

◆ LWP_EBADPRI

#define LWP_EBADPRI   -11

◆ LWP_EBADROCK

#define LWP_EBADROCK   -16 /* the specified rock does not exist */

◆ LWP_EBADSIG

#define LWP_EBADSIG   -13 /* bad signal number */

◆ LWP_EBLOCKED

#define LWP_EBLOCKED   -2

◆ LWP_EINIT

#define LWP_EINIT   -3

◆ LWP_EMAXPROC

#define LWP_EMAXPROC   -4

◆ LWP_ENOBLOCK

#define LWP_ENOBLOCK   -5

◆ LWP_ENOMEM

#define LWP_ENOMEM   -6

◆ LWP_ENOPROCESS

#define LWP_ENOPROCESS   -7

◆ LWP_ENOROCKS

#define LWP_ENOROCKS   -15 /* all rocks are in use */

◆ LWP_ENOWAIT

#define LWP_ENOWAIT   -8

◆ LWP_ESYSTEM

#define LWP_ESYSTEM   -14 /* system call failed */

◆ LWP_MAX_PRIORITY

#define LWP_MAX_PRIORITY   4

◆ LWP_NO_STACK

#define LWP_NO_STACK   -12

◆ LWP_NORMAL_PRIORITY

#define LWP_NORMAL_PRIORITY   (LWP_MAX_PRIORITY - 1)

◆ LWP_NoYieldSignal

#define LWP_NoYieldSignal (   event)    LWP_INTERNALSIGNAL(event, 0)

◆ LWP_SignalProcess

#define LWP_SignalProcess (   event)    LWP_INTERNALSIGNAL(event, 1)

◆ LWP_SOABORT

#define LWP_SOABORT   2 /* abort the program */

◆ LWP_SOMESSAGE

#define LWP_SOMESSAGE   3 /* print a message and be quiet */

◆ LWP_SOQUIET

#define LWP_SOQUIET   1 /* do nothing */

◆ LWP_SUCCESS

#define LWP_SUCCESS   0

◆ LWP_VERSION

#define LWP_VERSION   210888002 /* old lwp */

Typedef Documentation

◆ PROCESS

typedef struct lwp_pcb* PROCESS

Function Documentation

◆ FT_AGetTimeOfDay()

int FT_AGetTimeOfDay ( struct timeval *  tv,
struct timezone *  tz 
)

◆ FT_ApproxTime()

unsigned int FT_ApproxTime ( )

◆ FT_GetTimeOfDay()

int FT_GetTimeOfDay ( struct timeval *  tv,
struct timezone *  tz 
)

◆ FT_Init()

int FT_Init ( int  printErrors,
int  notReally 
)

◆ IOMGR_Cancel()

int IOMGR_Cancel ( PROCESS  pid)

◆ IOMGR_CancelSignal()

int IOMGR_CancelSignal ( int  signo)

◆ IOMGR_Finalize()

int IOMGR_Finalize ( )

◆ IOMGR_Initialize()

int IOMGR_Initialize ( )

◆ IOMGR_Poll()

int IOMGR_Poll ( )

◆ IOMGR_Select()

int IOMGR_Select ( int  fds,
fd_set *  readfds,
fd_set *  writefds,
fd_set *  exceptfds,
struct timeval *  timeout 
)

◆ IOMGR_Signal()

int IOMGR_Signal ( int  signo,
char *  event 
)

◆ IOMGR_SoftSig()

int IOMGR_SoftSig ( void(*)(void *)  aproc,
char *  arock 
)

◆ LWP_CreateProcess()

int LWP_CreateProcess ( void(*)(void *)  ep,
int  stacksize,
int  priority,
void *  parm,
const char *  name,
PROCESS pid 
)

◆ LWP_CurrentProcess()

int LWP_CurrentProcess ( PROCESS pid)

◆ LWP_DestroyProcess()

int LWP_DestroyProcess ( PROCESS  pid)

◆ LWP_DispatchProcess()

int LWP_DispatchProcess ( )

◆ LWP_GetProcessPriority()

int LWP_GetProcessPriority ( PROCESS  pid,
int *  priority 
)

◆ LWP_GetRock()

int LWP_GetRock ( int  Tag,
char **  Value 
)

◆ LWP_HighestIndex()

int LWP_HighestIndex ( )

◆ LWP_Index()

int LWP_Index ( )

◆ LWP_Init()

int LWP_Init ( int  version,
int  priority,
PROCESS pid 
)

◆ LWP_INTERNALSIGNAL()

int LWP_INTERNALSIGNAL ( const void *  event,
int  yield 
)

◆ LWP_MwaitProcess()

int LWP_MwaitProcess ( int  wcount,
const void *  evlist[] 
)

◆ LWP_Name()

char * LWP_Name ( )

◆ LWP_NewRock()

int LWP_NewRock ( int  Tag,
char *  Value 
)

◆ LWP_ProtectStacks()

void LWP_ProtectStacks ( )

◆ LWP_QSignal()

int LWP_QSignal ( PROCESS  pid)

◆ LWP_QWait()

int LWP_QWait ( )

◆ LWP_SetLog()

void LWP_SetLog ( FILE *  file,
int  level 
)

◆ LWP_StackUsed()

int LWP_StackUsed ( PROCESS  pid,
int *  max,
int *  used 
)

◆ LWP_TerminateProcessSupport()

int LWP_TerminateProcessSupport ( )

◆ LWP_ThisProcess()

PROCESS LWP_ThisProcess ( )

◆ LWP_UnProtectStacks()

void LWP_UnProtectStacks ( )

◆ LWP_WaitProcess()

int LWP_WaitProcess ( const void *  event)

◆ PRE_BeginCritical()

void PRE_BeginCritical ( void  )

◆ PRE_Concurrent()

void PRE_Concurrent ( int  on)

◆ PRE_EndCritical()

void PRE_EndCritical ( void  )

◆ TM_GetTimeOfDay()

int TM_GetTimeOfDay ( struct timeval *  tv,
struct timezone *  tz 
)

Variable Documentation

◆ cont_sw_threshold

struct timeval cont_sw_threshold
extern

◆ last_context_switch

struct timeval last_context_switch
extern

◆ lwp_debug

int lwp_debug
extern

◆ lwp_overflowAction

int lwp_overflowAction
extern

◆ lwp_stackUseEnabled

int lwp_stackUseEnabled
extern

◆ run_wait_threshold

struct timeval run_wait_threshold
extern