Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/stack.h
Show All 25 Lines | |||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _SYS_STACK_H_ | #ifndef _SYS_STACK_H_ | ||||
#define _SYS_STACK_H_ | #define _SYS_STACK_H_ | ||||
#include <sys/_stack.h> | #include <sys/_stack.h> | ||||
imp: This file could be done separately since it's a bit orthogonal to this change (the extern isn't… | |||||
Done Inline ActionsI found that few other headers are missing that \#ifdef, i'll do it in separate patch. kaktus: I found that few other headers are missing that \#ifdef, i'll do it in separate patch. | |||||
#ifdef _SYS_MALLOC_H_ | #ifdef _SYS_MALLOC_H_ | ||||
MALLOC_DECLARE(M_STACK); | MALLOC_DECLARE(M_STACK); | ||||
#endif | #endif | ||||
struct sbuf; | struct sbuf; | ||||
enum stack_sbuf_fmt { | |||||
STACK_SBUF_FMT_NONE = 0, | |||||
STACK_SBUF_FMT_LONG = 1, | |||||
STACK_SBUF_FMT_COMPACT = 2, | |||||
}; | |||||
/* MI Routines. */ | /* MI Routines. */ | ||||
struct stack *stack_create(int); | struct stack *stack_create(int); | ||||
void stack_destroy(struct stack *); | void stack_destroy(struct stack *); | ||||
int stack_put(struct stack *, vm_offset_t); | int stack_put(struct stack *, vm_offset_t); | ||||
void stack_copy(const struct stack *, struct stack *); | void stack_copy(const struct stack *, struct stack *); | ||||
void stack_zero(struct stack *); | void stack_zero(struct stack *); | ||||
void stack_print(const struct stack *); | void stack_print(const struct stack *); | ||||
void stack_print_ddb(const struct stack *); | void stack_print_ddb(const struct stack *); | ||||
void stack_print_short(const struct stack *); | void stack_print_short(const struct stack *); | ||||
void stack_print_short_ddb(const struct stack *); | void stack_print_short_ddb(const struct stack *); | ||||
void stack_sbuf_print(struct sbuf *, const struct stack *); | void stack_sbuf_print(struct sbuf *, const struct stack *); | ||||
void stack_sbuf_print_ddb(struct sbuf *, const struct stack *); | void stack_sbuf_print_ddb(struct sbuf *, const struct stack *); | ||||
int stack_sbuf_print_flags(struct sbuf *, const struct stack *, | int stack_sbuf_print_flags(struct sbuf *, const struct stack *, | ||||
int); | int, enum stack_sbuf_fmt); | ||||
#ifdef KTR | #ifdef KTR | ||||
void stack_ktr(u_int, const char *, int, const struct stack *, | void stack_ktr(u_int, const char *, int, const struct stack *, | ||||
u_int); | u_int); | ||||
#define CTRSTACK(m, st, depth) do { \ | #define CTRSTACK(m, st, depth) do { \ | ||||
if (KTR_COMPILE & (m)) \ | if (KTR_COMPILE & (m)) \ | ||||
stack_ktr((m), __FILE__, __LINE__, st, depth); \ | stack_ktr((m), __FILE__, __LINE__, st, depth); \ | ||||
} while(0) | } while(0) | ||||
#else | #else | ||||
Show All 9 Lines |
This file could be done separately since it's a bit orthogonal to this change (the extern isn't, but the _KERNEL part is).