kernel: move waserror() macro to port/portfns.h
This commit is contained in:
parent
3e98132fc6
commit
5484260b42
14 changed files with 1 additions and 19 deletions
|
@ -133,8 +133,6 @@ extern void sysprocsetup(Proc*);
|
|||
#define kmapinval()
|
||||
#define countpagerefs(a, b)
|
||||
|
||||
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
|
||||
|
||||
#define KADDR(pa) ((void*)(KZERO | ((uintptr)(pa) & ~KSEGM)))
|
||||
#define PADDR(va) (PHYSDRAM | ((uintptr)(va) & ~KSEGM))
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#include "../port/portfns.h"
|
||||
|
||||
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
|
||||
|
||||
/* l.s */
|
||||
extern void sev(void);
|
||||
extern int tas(void *);
|
||||
|
|
|
@ -16,7 +16,6 @@ void procsetup(Proc *);
|
|||
KMap* kmap(Page *);
|
||||
void kunmap(KMap *);
|
||||
|
||||
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
|
||||
#define getpgcolor(a) 0
|
||||
#define kmapinval()
|
||||
#define KADDR(a) kaddr(a)
|
||||
|
|
|
@ -143,8 +143,6 @@ void vunmap(void*, usize);
|
|||
#define getpgcolor(a) 0
|
||||
#define kmapinval()
|
||||
|
||||
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
|
||||
|
||||
/*
|
||||
* this low-level printing stuff is ugly,
|
||||
* but there appears to be no other way to
|
||||
|
|
|
@ -89,6 +89,5 @@ void tlbflushall(void);
|
|||
#define userureg(ur) (((ur)->status & MSR_PR) != 0)
|
||||
void watchreset(void);
|
||||
|
||||
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
|
||||
#define KADDR(a) ((void*)((ulong)(a)|KZERO))
|
||||
#define PADDR(a) ((ulong)(a)&~KZERO)
|
||||
|
|
|
@ -160,8 +160,6 @@ void vunmap(void*, usize);
|
|||
#define getpgcolor(a) 0
|
||||
#define kmapinval()
|
||||
|
||||
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
|
||||
|
||||
#define KADDR(pa) ((void*)(KZERO | ((uintptr)(pa) & ~KSEGM)))
|
||||
#define PADDR(va) (PHYSDRAM | ((uintptr)(va) & ~KSEGM))
|
||||
|
||||
|
|
|
@ -175,6 +175,5 @@ int xchgw(ushort*, int);
|
|||
void rdrandbuf(void*, ulong);
|
||||
|
||||
#define userureg(ur) (((ur)->cs & 3) == 3)
|
||||
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
|
||||
#define KADDR(a) kaddr(a)
|
||||
#define PADDR(a) paddr((void*)(a))
|
||||
|
|
|
@ -177,6 +177,5 @@ int xchgw(ushort*, int);
|
|||
void rdrandbuf(void*, ulong);
|
||||
|
||||
#define userureg(ur) (((ur)->cs & 3) == 3)
|
||||
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
|
||||
#define KADDR(a) kaddr(a)
|
||||
#define PADDR(a) paddr((void*)(a))
|
||||
|
|
|
@ -230,6 +230,7 @@ ulong perfticks(void);
|
|||
void pexit(char*, int);
|
||||
void pgrpcpy(Pgrp*, Pgrp*);
|
||||
ulong pidalloc(Proc*);
|
||||
#define waserror() setlabel(&up->errlab[up->nerrlab++])
|
||||
#define poperror() up->nerrlab--
|
||||
void portcountpagerefs(ulong*, int);
|
||||
int postnote(Proc*, int, char*, int);
|
||||
|
|
|
@ -100,7 +100,6 @@ void touser(void*);
|
|||
void trapinit(void);
|
||||
void trapvec(void);
|
||||
#define userureg(ur) (((ur)->status & MSR_PR) != 0)
|
||||
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
|
||||
#define KADDR(a) ((void*)((ulong)(a)|KZERO))
|
||||
#define PADDR(a) ((((ulong)(a)&0xf0000000)==0xf0000000)?(ulong)(a):((ulong)(a)&~KZERO))
|
||||
#define coherence() eieio()
|
||||
|
|
|
@ -63,8 +63,6 @@ void wrcount(ulong);
|
|||
#define PTR2UINT(p) ((uintptr)(p))
|
||||
#define UINT2PTR(i) ((void*)(i))
|
||||
|
||||
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
|
||||
|
||||
#define KADDR(a) ((void*)((ulong)(a)|KSEG0))
|
||||
#define PADDR(a) ((ulong)(a)&~KSEGM)
|
||||
|
||||
|
|
|
@ -194,8 +194,6 @@ void vunmap(void*, usize);
|
|||
#define getpgcolor(a) 0
|
||||
#define kmapinval()
|
||||
|
||||
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
|
||||
|
||||
#define KADDR(pa) ((void*)(KZERO | ((uintptr)(pa) & ~KSEGM)))
|
||||
#define PADDR(va) (PHYSDRAM | ((uintptr)(va) & ~KSEGM))
|
||||
|
||||
|
|
|
@ -92,7 +92,6 @@ uint xchgw(ushort*, uint);
|
|||
uint xchgb(uchar*, uint);
|
||||
void rdrandbuf(void*, ulong);
|
||||
|
||||
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
|
||||
#define KADDR(a) ((void*)((ulong)(a)|KZERO))
|
||||
#define PADDR(a) ((ulong)(a)&~KZERO)
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ void procsetup(Proc *);
|
|||
KMap* kmap(Page *);
|
||||
void kunmap(KMap *);
|
||||
|
||||
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
|
||||
#define getpgcolor(a) 0
|
||||
#define kmapinval()
|
||||
#define KADDR(a) kaddr(a)
|
||||
|
|
Loading…
Reference in a new issue