summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devkprof.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/devkprof.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/devkprof.c')
-rw-r--r--sys/src/9/port/devkprof.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/src/9/port/devkprof.c b/sys/src/9/port/devkprof.c
index 85ca17a58..c6d73a74e 100644
--- a/sys/src/9/port/devkprof.c
+++ b/sys/src/9/port/devkprof.c
@@ -11,8 +11,8 @@
struct
{
- int minpc;
- int maxpc;
+ uintptr minpc;
+ uintptr maxpc;
int nbuf;
int time;
ulong *buf;
@@ -30,7 +30,7 @@ Dirtab kproftab[]={
};
static void
-_kproftimer(ulong pc)
+_kproftimer(uintptr pc)
{
extern void spldone(void);
@@ -40,7 +40,7 @@ _kproftimer(ulong pc)
* if the pc is coming out of spllo or splx,
* use the pc saved when we went splhi.
*/
- if(pc>=(ulong)spllo && pc<=(ulong)spldone)
+ if(pc>=(uintptr)spllo && pc<=(uintptr)spldone)
pc = m->splpc;
kprof.buf[0] += TK2MS(1);
@@ -67,7 +67,7 @@ kprofattach(char *spec)
/* allocate when first used */
kprof.minpc = KTZERO;
- kprof.maxpc = (ulong)etext;
+ kprof.maxpc = (uintptr)etext;
kprof.nbuf = (kprof.maxpc-kprof.minpc) >> LRES;
n = kprof.nbuf*SZ;
if(kprof.buf == 0) {