diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-01-20 00:47:55 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-01-20 00:47:55 +0100 |
commit | 6c2e983d328874ea41cb35bacb510bf2709a229f (patch) | |
tree | e2a5c596a3fcd1af3ed792494b78f2d503911b44 /sys/src/9/port/taslock.c | |
parent | b99ecee6cd8c7c9fce1ff2cfa56d5a6807a0fc7c (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/taslock.c')
-rw-r--r-- | sys/src/9/port/taslock.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/src/9/port/taslock.c b/sys/src/9/port/taslock.c index b93aaf832..641b84d16 100644 --- a/sys/src/9/port/taslock.c +++ b/sys/src/9/port/taslock.c @@ -51,12 +51,12 @@ dumplockmem(char *tag, Lock *l) } void -lockloop(Lock *l, ulong pc) +lockloop(Lock *l, uintptr pc) { Proc *p; p = l->p; - print("lock %#p loop key %#lux pc %#lux held by pc %#lux proc %lud\n", + print("lock %#p loop key %#lux pc %#p held by pc %#p proc %lud\n", l, l->key, pc, l->pc, p ? p->pid : 0); dumpaproc(up); if(p != nil) @@ -67,7 +67,7 @@ int lock(Lock *l) { int i; - ulong pc; + uintptr pc; pc = getcallerpc(&l); @@ -98,7 +98,7 @@ lock(Lock *l) * Priority inversion, yield on a uniprocessor; on a * multiprocessor, the other processor will unlock */ - print("inversion %#p pc %#lux proc %lud held by pc %#lux proc %lud\n", + print("inversion %#p pc %#p proc %lud held by pc %#p proc %lud\n", l, pc, up ? up->pid : 0, l->pc, l->p ? l->p->pid : 0); up->edf->d = todget(nil); /* yield to process with lock */ } @@ -129,7 +129,7 @@ void ilock(Lock *l) { ulong x; - ulong pc; + uintptr pc; pc = getcallerpc(&l); lockstats.locks++; @@ -203,9 +203,9 @@ unlock(Lock *l) if(l->key == 0) print("unlock: not locked: pc %#p\n", getcallerpc(&l)); if(l->isilock) - print("unlock of ilock: pc %lux, held by %lux\n", getcallerpc(&l), l->pc); + print("unlock of ilock: pc %#p, held by %#p\n", getcallerpc(&l), l->pc); if(l->p != up) - print("unlock: up changed: pc %#p, acquired at pc %lux, lock p %#p, unlock up %#p\n", getcallerpc(&l), l->pc, l->p, up); + print("unlock: up changed: pc %#p, acquired at pc %#p, lock p %#p, unlock up %#p\n", getcallerpc(&l), l->pc, l->p, up); l->m = nil; l->key = 0; coherence(); @@ -240,9 +240,9 @@ iunlock(Lock *l) if(l->key == 0) print("iunlock: not locked: pc %#p\n", getcallerpc(&l)); if(!l->isilock) - print("iunlock of lock: pc %#p, held by %#lux\n", getcallerpc(&l), l->pc); + print("iunlock of lock: pc %#p, held by %#p\n", getcallerpc(&l), l->pc); if(islo()) - print("iunlock while lo: pc %#p, held by %#lux\n", getcallerpc(&l), l->pc); + print("iunlock while lo: pc %#p, held by %#p\n", getcallerpc(&l), l->pc); sr = l->sr; l->m = nil; |