summaryrefslogtreecommitdiff
path: root/sys/src/9/port/swap.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-01-20 00:47:55 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-01-20 00:47:55 +0100
commit6c2e983d328874ea41cb35bacb510bf2709a229f (patch)
treee2a5c596a3fcd1af3ed792494b78f2d503911b44 /sys/src/9/port/swap.c
parentb99ecee6cd8c7c9fce1ff2cfa56d5a6807a0fc7c (diff)
kernel: apply uintptr for ulong when a pointer is stored
this change is in preparation for amd64. the systab calling convention was also changed to return uintptr (as segattach returns a pointer) and the arguments are now passed as va_list which handles amd64 arguments properly (all arguments are passed in 64bit quantities on the stack, tho the upper part will not be initialized when the element is smaller than 8 bytes). this is partial. xalloc needs to be converted in the future.
Diffstat (limited to 'sys/src/9/port/swap.c')
-rw-r--r--sys/src/9/port/swap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/src/9/port/swap.c b/sys/src/9/port/swap.c
index 0340d566b..69d822fc6 100644
--- a/sys/src/9/port/swap.c
+++ b/sys/src/9/port/swap.c
@@ -77,7 +77,7 @@ putswap(Page *p)
uchar *idx;
lock(&swapalloc);
- idx = &swapalloc.swmap[((ulong)p)/BY2PG];
+ idx = &swapalloc.swmap[((uintptr)p)/BY2PG];
if(*idx == 0)
panic("putswap %#p ref == 0", p);
@@ -111,7 +111,7 @@ dupswap(Page *p)
uchar *idx;
lock(&swapalloc);
- idx = &swapalloc.swmap[((ulong)p)/BY2PG];
+ idx = &swapalloc.swmap[((uintptr)p)/BY2PG];
if(*idx == 255)
swapalloc.xref++;
else {
@@ -122,7 +122,7 @@ dupswap(Page *p)
}
int
-swapcount(ulong daddr)
+swapcount(uintptr daddr)
{
return swapalloc.swmap[daddr/BY2PG];
}
@@ -309,7 +309,7 @@ canflush(Proc *p, Segment *s)
static void
pagepte(int type, Page **pg)
{
- ulong daddr;
+ uintptr daddr;
Page *outp;
outp = *pg;