summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devproc.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/devproc.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/devproc.c')
-rw-r--r--sys/src/9/port/devproc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/src/9/port/devproc.c b/sys/src/9/port/devproc.c
index 2207a627a..57ebebb1a 100644
--- a/sys/src/9/port/devproc.c
+++ b/sys/src/9/port/devproc.c
@@ -152,7 +152,7 @@ static char *sname[]={ "Text", "Data", "Bss", "Stack", "Shared", "Phys", };
#define NOTEID(q) ((q).vers)
void procctlreq(Proc*, char*, int);
-int procctlmemio(Proc*, ulong, int, void*, int);
+int procctlmemio(Proc*, uintptr, int, void*, int);
Chan* proctext(Chan*, Proc*);
Segment* txt2data(Proc*, Segment*);
int procstopped(void*);
@@ -699,7 +699,7 @@ procread(Chan *c, void *va, long n, vlong off)
int i, j, m, navail, ne, rsize;
long l;
uchar *rptr;
- ulong offset;
+ uintptr offset;
Confmem *cm;
Mntwalk *mw;
Proc *p;
@@ -766,9 +766,9 @@ procread(Chan *c, void *va, long n, vlong off)
error(Eperm);
/* validate kernel addresses */
- if(offset < (ulong)end) {
- if(offset+n > (ulong)end)
- n = (ulong)end - offset;
+ if(offset < (uintptr)end) {
+ if(offset+n > (uintptr)end)
+ n = (uintptr)end - offset;
memmove(a, (char*)offset, n);
return n;
}
@@ -910,7 +910,7 @@ procread(Chan *c, void *va, long n, vlong off)
sg = p->seg[i];
if(sg == 0)
continue;
- j += sprint(statbuf+j, "%-6s %c%c %.8lux %.8lux %4ld\n",
+ j += sprint(statbuf+j, "%-6s %c%c %p %p %4ld\n",
sname[sg->type&SG_TYPE],
sg->type&SG_RONLY ? 'R' : ' ',
sg->profile ? 'P' : ' ',
@@ -1533,13 +1533,13 @@ procstopped(void *a)
}
int
-procctlmemio(Proc *p, ulong offset, int n, void *va, int read)
+procctlmemio(Proc *p, uintptr offset, int n, void *va, int read)
{
KMap *k;
Pte *pte;
Page *pg;
Segment *s;
- ulong soff, l;
+ uintptr soff, l;
char *a = va, *b;
for(;;) {