machdep.h File Reference

#include <machdep/asm.h>
#include <machdep/param.h>
#include <machdep/stdarg.h>
#include <machdep/segments.h>
#include <machdep/cpufunc.h>
#include <machdep/tss.h>
#include <machdep/limits.h>
#include <machdep/kinfo.h>
#include <machdep/pte.h>
#include <machdep/npx.h>
#include <machdep/lock.h>
#include <machdep/psl.h>
#include <machdep/specialreg.h>
#include <machdep/frame.h>
#include <machdep/byte_swap.h>
#include <machdep/ieeefp.h>
#include <machdep/conio.h>
#include <machdep/gates.h>
#include <machdep/gatesdef.h>
#include <machdep/setjmp.h>

Go to the source code of this file.

Data Structures

struct  s_pinfo
struct  s_fdesc

Defines

#define __MACHDEP_MACHDEP_H__   1
#define ntohl(x)   ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
#define ntohs(x)   ((in_port_t)__byte_swap_word((in_port_t)(x)))
#define htonl(x)   ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
#define htons(x)   ((in_port_t)__byte_swap_word((in_port_t)(x)))
#define QUAD_HIGH(Quad)   ((int32_t) (((quad_t)(Quad)) >> 32))
#define QUAD_LOW(Quad)   ((int32_t) (((quad_t)(Quad)) & 0xffffffffLL))
#define QUAD_MAKE(High, Low)
#define PROGOPT_EXECVE_BOOTFS   (1<<0u)
#define PROGOPT_EXECVE_SHOW_ERRMSG   (1<<1u)
#define PROGOPT_EMULATE_VFS   (1<<2u)
#define PROGOPT_RT_MALLOC   (1<<3u)
#define PROGOPT_SHARE_BINARIES   (1<<4u)
#define PROGOPT_THREAD_WITH_IOMAP   (1<<5u)
#define PINFO_VADDR   (MAX_UADDR - sizeof (t_pinfo))
#define CORE_SYSCALL5(RetVal, Arg0, Arg1, Arg2, Arg3, Arg4, Arg5)
#define EC_DECL   int __errno_save, __suberrno_save
#define EC_SAVE   __errno_save = errno;__suberrno_save = suberrno
#define EC_RESTORE   errno = __errno_save;suberrno = __suberrno_save
#define TRACE_IN(Str, Tcb)
#define TRACE_OUT(Str, Tcb)
#define EMULATE_VFS()   (progopts & PROGOPT_EMULATE_VFS)
#define RT_MALLOC()   (progopts & PROGOPT_RT_MALLOC)
#define EXECVE_BOOTFS()   (progopts & PROGOPT_EXECVE_BOOTFS)
#define EXECVE_SHOW_ERRMSG()   (progopts & PROGOPT_EXECVE_SHOW_ERRMSG)
#define SHARE_BINARIES()   (progopts & PROGOPT_SHARE_BINARIES)

Typedefs

typedef s_pinfo t_pinfo
typedef s_fdesc t_fdesc
typedef void(* t_nmi_fn )()

Functions

static __inline void nope (void)
int core_syscall (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
int gate_syscall (int gate, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
int rtr (void)
int ltr (int tr)
void * alloca (size_t size)
void nmi_0 ()
void nmi_1 ()
void nmi_2 ()
void nmi_3 ()
void nmi_4 ()
void nmi_5 ()
void nmi_6 ()
void nmi_7 ()
void nmi_8 ()
void nmi_9 ()
void nmi_10 ()
void nmi_11 ()
void nmi_12 ()
void nmi_13 ()
void nmi_14 ()
void nmi_15 ()
void nmi_16 ()
void nmi_17 ()
void nmi_18 ()
void nmi_19 ()

Variables

t_nmi_fn nmi_fns []
int nb_nmi_fns
int fs_gate
int nb_fdescs
t_fdescfdescs
char ** environ
int errno
int suberrno
const char *const sys_errlist []
const int sys_nerr
u_int32_t progopts
u_int32_t execve_nbstkpgs


Define Documentation

#define __MACHDEP_MACHDEP_H__   1
 

#define CORE_SYSCALL5 RetVal,
Arg0,
Arg1,
Arg2,
Arg3,
Arg4,
Arg5   ) 
 

Value:

asm volatile ("int $0x81" \
        : "=a" (RetVal), "=c" (suberrno), "=b" (errno) \
        : "a" (Arg0), "b" ((long)(Arg1)), "c" ((long)(Arg2)), \
          "d" ((long)(Arg3)), "S" ((long)(Arg4)), "D" ((long)(Arg5)))

#define EC_DECL   int __errno_save, __suberrno_save
 

#define EC_RESTORE   errno = __errno_save;suberrno = __suberrno_save
 

#define EC_SAVE   __errno_save = errno;__suberrno_save = suberrno
 

 
#define EMULATE_VFS  )     (progopts & PROGOPT_EMULATE_VFS)
 

 
#define EXECVE_BOOTFS  )     (progopts & PROGOPT_EXECVE_BOOTFS)
 

 
#define EXECVE_SHOW_ERRMSG  )     (progopts & PROGOPT_EXECVE_SHOW_ERRMSG)
 

#define htonl  )     ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
 

#define htons  )     ((in_port_t)__byte_swap_word((in_port_t)(x)))
 

#define ntohl  )     ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
 

#define ntohs  )     ((in_port_t)__byte_swap_word((in_port_t)(x)))
 

#define PINFO_VADDR   (MAX_UADDR - sizeof (t_pinfo))
 

#define PROGOPT_EMULATE_VFS   (1<<2u)
 

#define PROGOPT_EXECVE_BOOTFS   (1<<0u)
 

#define PROGOPT_EXECVE_SHOW_ERRMSG   (1<<1u)
 

#define PROGOPT_RT_MALLOC   (1<<3u)
 

#define PROGOPT_SHARE_BINARIES   (1<<4u)
 

#define PROGOPT_THREAD_WITH_IOMAP   (1<<5u)
 

#define QUAD_HIGH Quad   )     ((int32_t) (((quad_t)(Quad)) >> 32))
 

#define QUAD_LOW Quad   )     ((int32_t) (((quad_t)(Quad)) & 0xffffffffLL))
 

#define QUAD_MAKE High,
Low   ) 
 

Value:

((((quad_t)(High)) << 32)|\
                                (((quad_t)(Low)) & 0xffffffffLL))

 
#define RT_MALLOC  )     (progopts & PROGOPT_RT_MALLOC)
 

 
#define SHARE_BINARIES  )     (progopts & PROGOPT_SHARE_BINARIES)
 

#define TRACE_IN Str,
Tcb   ) 
 

Value:

if ((Tcb)->flags & TCBF_TRACED) \
    { \
      dprintf("%s: (%s) pid 0x%qx 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n", \
             (Str), (Tcb)->name, (Tcb)->pid, \
             (Tcb)->tss.eax, (Tcb)->tss.ebx, (Tcb)->tss.ecx, \
             (Tcb)->tss.edx, (Tcb)->tss.esi, (Tcb)->tss.edi); \
    }

#define TRACE_OUT Str,
Tcb   ) 
 

Value:

if ((Tcb)->flags & TCBF_TRACED) \
    { \
      dprintf("%s: =0x%x 0x%x 0x%x\n", \
             (Str), \
             (Tcb)->tss.eax, (Tcb)->tss.ebx, (Tcb)->tss.ecx); \
    }


Typedef Documentation

typedef struct s_fdesc t_fdesc
 

typedef void(* t_nmi_fn)()
 

typedef struct s_pinfo t_pinfo
 


Function Documentation

void* alloca size_t  size  ) 
 

int core_syscall int  arg1,
int  arg2,
int  arg3,
int  arg4,
int  arg5,
int  arg6
 

int gate_syscall int  gate,
int  arg1,
int  arg2,
int  arg3,
int  arg4,
int  arg5,
int  arg6
 

int ltr int  tr  ) 
 

void nmi_0  ) 
 

void nmi_1  ) 
 

void nmi_10  ) 
 

void nmi_11  ) 
 

void nmi_12  ) 
 

void nmi_13  ) 
 

void nmi_14  ) 
 

void nmi_15  ) 
 

void nmi_16  ) 
 

void nmi_17  ) 
 

void nmi_18  ) 
 

void nmi_19  ) 
 

void nmi_2  ) 
 

void nmi_3  ) 
 

void nmi_4  ) 
 

void nmi_5  ) 
 

void nmi_6  ) 
 

void nmi_7  ) 
 

void nmi_8  ) 
 

void nmi_9  ) 
 

static __inline void nope void   )  [static]
 

int rtr void   ) 
 


Variable Documentation

char** environ
 

int errno
 

u_int32_t execve_nbstkpgs
 

t_fdesc* fdescs
 

int fs_gate
 

int nb_fdescs
 

int nb_nmi_fns
 

t_nmi_fn nmi_fns[]
 

u_int32_t progopts
 

int suberrno
 

const char* const sys_errlist[]
 

const int sys_nerr
 


Generated on Wed May 24 23:05:55 2006 for LSE/OS by  doxygen 1.4.6