aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2011-11-16 19:06:55 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2011-11-16 19:06:55 +0000
commita20358302ff8936134fa631b20c57baa2f67f108 (patch)
tree20486e4140eaee56872d11216d4c4b77a808e2e3 /sys
parent1859c4740efbe4b5781cdf9560df8fdbd53c8377 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_stack.c18
-rw-r--r--sys/sys/stack.h17
2 files changed, 18 insertions, 17 deletions
diff --git a/sys/kern/subr_stack.c b/sys/kern/subr_stack.c
index c26dad84fe71a..6408aecd453ba 100644
--- a/sys/kern/subr_stack.c
+++ b/sys/kern/subr_stack.c
@@ -77,7 +77,7 @@ stack_put(struct stack *st, vm_offset_t pc)
}
void
-stack_copy(struct stack *src, struct stack *dst)
+stack_copy(const struct stack *src, struct stack *dst)
{
*dst = *src;
@@ -91,7 +91,7 @@ stack_zero(struct stack *st)
}
void
-stack_print(struct stack *st)
+stack_print(const struct stack *st)
{
char namebuf[64];
long offset;
@@ -107,7 +107,7 @@ stack_print(struct stack *st)
}
void
-stack_print_short(struct stack *st)
+stack_print_short(const struct stack *st)
{
char namebuf[64];
long offset;
@@ -127,7 +127,7 @@ stack_print_short(struct stack *st)
}
void
-stack_print_ddb(struct stack *st)
+stack_print_ddb(const struct stack *st)
{
const char *name;
long offset;
@@ -143,7 +143,7 @@ stack_print_ddb(struct stack *st)
#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 @@ stack_print_short_ddb(struct stack *st)
* 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 @@ stack_sbuf_print(struct sbuf *sb, struct stack *st)
#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 @@ stack_sbuf_print_ddb(struct sbuf *sb, struct stack *st)
#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;
diff --git a/sys/sys/stack.h b/sys/sys/stack.h
index 734b967daa36c..5531467e22ff1 100644
--- a/sys/sys/stack.h
+++ b/sys/sys/stack.h
@@ -37,16 +37,17 @@ struct sbuf;
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); \