Index: sys/sys/stack.h =================================================================== --- sys/sys/stack.h (wersja 226179) +++ sys/sys/stack.h (kopia robocza) @@ -37,16 +37,17 @@ struct stack *stack_create(void); void stack_destroy(struct stack *); int stack_put(struct stack *, vm_offset_t); -void stack_copy(struct stack *, struct stack *); +void stack_copy(const struct stack *, struct stack *); void stack_zero(struct stack *); -void stack_print(struct stack *); -void stack_print_ddb(struct stack *); -void stack_print_short(struct stack *); -void stack_print_short_ddb(struct stack *); -void stack_sbuf_print(struct sbuf *, struct stack *); -void stack_sbuf_print_ddb(struct sbuf *, struct stack *); +void stack_print(const struct stack *); +void stack_print_ddb(const struct stack *); +void stack_print_short(const struct stack *); +void stack_print_short_ddb(const struct stack *); +void stack_sbuf_print(struct sbuf *, const struct stack *); +void stack_sbuf_print_ddb(struct sbuf *, const struct stack *); #ifdef KTR -void stack_ktr(u_int, const char *, int, struct stack *, u_int, int); +void stack_ktr(u_int, const char *, int, const struct stack *, + u_int, int); #define CTRSTACK(m, st, depth, cheap) do { \ if (KTR_COMPILE & (m)) \ stack_ktr((m), __FILE__, __LINE__, st, depth, cheap); \ Index: sys/kern/subr_stack.c =================================================================== --- sys/kern/subr_stack.c (wersja 226230) +++ sys/kern/subr_stack.c (kopia robocza) @@ -77,7 +77,7 @@ } void -stack_copy(struct stack *src, struct stack *dst) +stack_copy(const struct stack *src, struct stack *dst) { *dst = *src; @@ -91,7 +91,7 @@ } void -stack_print(struct stack *st) +stack_print(const struct stack *st) { char namebuf[64]; long offset; @@ -107,7 +107,7 @@ } void -stack_print_short(struct stack *st) +stack_print_short(const struct stack *st) { char namebuf[64]; long offset; @@ -127,7 +127,7 @@ } void -stack_print_ddb(struct stack *st) +stack_print_ddb(const struct stack *st) { const char *name; long offset; @@ -143,7 +143,7 @@ #ifdef DDB void -stack_print_short_ddb(struct stack *st) +stack_print_short_ddb(const struct stack *st) { const char *name; long offset; @@ -167,7 +167,7 @@ * other for use in the live kernel. */ void -stack_sbuf_print(struct sbuf *sb, struct stack *st) +stack_sbuf_print(struct sbuf *sb, const struct stack *st) { char namebuf[64]; long offset; @@ -184,7 +184,7 @@ #ifdef DDB void -stack_sbuf_print_ddb(struct sbuf *sb, struct stack *st) +stack_sbuf_print_ddb(struct sbuf *sb, const struct stack *st) { const char *name; long offset; @@ -201,8 +201,8 @@ #ifdef KTR void -stack_ktr(u_int mask, const char *file, int line, struct stack *st, u_int depth, - int cheap) +stack_ktr(u_int mask, const char *file, int line, const struct stack *st, + u_int depth, int cheap) { #ifdef DDB const char *name;