Skip to content

Commit cfcfb58

Browse files
committed
make getcallerpcs() and callsites use 64bit friendly types
1 parent 58b0dc2 commit cfcfb58

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

include/defs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void swtch(struct context**, struct context*);
122122

123123
// spinlock.c
124124
void acquire(struct spinlock*);
125-
void getcallerpcs(void*, uint*);
125+
void getcallerpcs(void*, uintp*);
126126
int holding(struct spinlock*);
127127
void initlock(struct spinlock*, char*);
128128
void release(struct spinlock*);

include/spinlock.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ struct spinlock {
55
// For debugging:
66
char *name; // Name of lock.
77
struct cpu *cpu; // The cpu holding the lock.
8-
uint pcs[10]; // The call stack (an array of program counters)
8+
uintp pcs[10]; // The call stack (an array of program counters)
99
// that locked the lock.
1010
};
1111

kernel/console.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void
119119
panic(char *s)
120120
{
121121
int i;
122-
uint pcs[10];
122+
uintp pcs[10];
123123

124124
cli();
125125
cons.locking = 0;

kernel/spinlock.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ release(struct spinlock *lk)
6565

6666
// Record the current call stack in pcs[] by following the %ebp chain.
6767
void
68-
getcallerpcs(void *v, uint pcs[])
68+
getcallerpcs(void *v, uintp pcs[])
6969
{
7070
uintp *ebp;
7171
int i;

0 commit comments

Comments
 (0)