vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

dat.ed (1593B)


      1 /BIOS32ci/,/BIOS32ci;/d
      2 /^#define up/c
      3 #define up (machp[0]->externup)
      4 .
      5 v/typedef/ s!Lock;!Lock lk;!g
      6 /^struct PMMU/+2;/^}/-1c
      7 	struct vxproc *vxproc;	// Plan 9 VX
      8 	struct vxmem vxmem;
      9 	struct vxmmap vxmm;	// Plan 9 VX
     10 	Uspace *us;
     11 	uchar *uzero;
     12 .
     13 g/mmufree/d
     14 g/mmuused/d
     15 g/lastkmap/d
     16 g/kmaptable/d
     17 g/nkmap/d
     18 /	Mach	\*m/s/m/m_/
     19 /^struct Label/+2;/^}/-1c
     20 	uint64	bp;  // Plan 9 VX
     21 	uint64	bx;
     22 	uint64	si;
     23 	uint64	di;
     24 	uint64	sp;
     25 	uint64	pc;
     26 	uint64	r12;
     27 	uint64	r13;
     28 	uint64	r14;
     29 	uint64	r15;
     30 .
     31 g/BIOS32ci/d
     32 1i
     33 #include <ucontext.h>
     34 #include "libvx32/vx32.h"
     35 
     36 .
     37 /	ulong\*	pdb/d
     38 /	Tss\*	tss/d
     39 /	Proc\*	externup/d
     40 /	ulong	ticks/d
     41 /	Lock	alarmlock/d
     42 /	void\*	alarm/d
     43 /	int	inclockintr/d
     44 /	int	loopconst/d
     45 g/^	vlong	mtrr/d
     46 /	int	stack\[1\]/i
     47 	int	spl;	// Plan 9 VX
     48 	void	*sigstack;
     49 .
     50 /^extern Mach	\*m/c
     51 #ifdef TLS
     52 	extern __thread Mach	*m;	// Plan 9 VX
     53 	extern __thread Proc	*up;	// Plan 9 VX
     54 #	define thismach m
     55 #	define setmach(x) (m = (x))
     56 #else
     57 	extern Mach *getmach(void);
     58 	extern void setmach(Mach*);
     59 #	define up getmach()->externup
     60 #	ifdef WANT_M
     61 #		define m getmach()
     62 #	endif
     63 #endif
     64 .
     65 /^struct Mach/+1a
     66 #ifndef TLS
     67 	Proc*	externup;
     68 #endif
     69 	int	new;
     70 .
     71 /^struct PMMU/i
     72 typedef struct Uspace Uspace;
     73 .
     74 /^#define up/d
     75 $a
     76 
     77 // Plan 9 VX
     78 extern int traceprocs;
     79 extern int tracesyscalls;
     80 extern int doabort;
     81 
     82 /* Pthreads-based sleep and wakeup. */
     83 typedef struct Psleep Psleep;
     84 typedef struct Pwaiter Pwaiter;
     85 struct Psleep
     86 {
     87 	int init;
     88 	pthread_mutex_t mutex;
     89 	Pwaiter *waiter;
     90 };
     91 
     92 struct Uspace
     93 {
     94 	Proc *p;	// proc currently mapped
     95 	uchar *uzero;
     96 	ulong lo;
     97 	ulong hi;
     98 };
     99 .
    100 g/^	u32int	e..;$/d