summaryrefslogtreecommitdiff
path: root/sys/src/9/teg2/syscall.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2019-04-11 13:51:38 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2019-04-11 13:51:38 +0200
commit37d36fdd7f441aa184c4051d02e50e9e770f20f8 (patch)
treeddcf8928dfcdebf4f029509c6bf2c62a8d294c1d /sys/src/9/teg2/syscall.c
parent753fa51b77869eadcc27c00df34f09c3c9239fe2 (diff)
kernel: get rid of PTR2UINT() and UINT2PTR() macros
Diffstat (limited to 'sys/src/9/teg2/syscall.c')
-rw-r--r--sys/src/9/teg2/syscall.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/src/9/teg2/syscall.c b/sys/src/9/teg2/syscall.c
index be24849b2..4a5ec8559 100644
--- a/sys/src/9/teg2/syscall.c
+++ b/sys/src/9/teg2/syscall.c
@@ -47,7 +47,7 @@ noted(Ureg* cur, uintptr arg0)
nf = up->ureg;
/* sanity clause */
- if(!okaddr(PTR2UINT(nf), sizeof(NFrame), 0)){
+ if(!okaddr((uintptr)nf, sizeof(NFrame), 0)){
qunlock(&up->debug);
pprint("bad ureg in noted %#p\n", nf);
pexit("Suicide", 0);
@@ -83,8 +83,8 @@ noted(Ureg* cur, uintptr arg0)
nf->arg1 = nf->msg;
nf->arg0 = &nf->ureg;
nf->ip = 0;
- cur->sp = PTR2UINT(nf);
- cur->r0 = PTR2UINT(nf->arg0);
+ cur->sp = (uintptr)nf;
+ cur->r0 = (uintptr)nf->arg0;
break;
default:
up->lastnote.flag = NDebug;
@@ -146,7 +146,7 @@ notify(Ureg* ureg)
qunlock(&up->debug);
pexit(n->msg, n->flag != NDebug);
}
- if(!okaddr(PTR2UINT(up->notify), 1, 0)){
+ if(!okaddr((uintptr)up->notify, 1, 0)){
qunlock(&up->debug);
pprint("suicide: notify function address %#p\n", up->notify);
pexit("Suicide", 0);
@@ -159,7 +159,7 @@ notify(Ureg* ureg)
pexit("Suicide", 0);
}
- nf = UINT2PTR(sp);
+ nf = (void*)sp;
memmove(&nf->ureg, ureg, sizeof(Ureg));
nf->old = up->ureg;
up->ureg = nf;
@@ -169,8 +169,8 @@ notify(Ureg* ureg)
nf->ip = 0;
ureg->sp = sp;
- ureg->pc = PTR2UINT(up->notify);
- ureg->r0 = PTR2UINT(nf->arg0);
+ ureg->pc = (uintptr)up->notify;
+ ureg->r0 = (uintptr)nf->arg0;
up->notified = 1;
up->nnote--;