debuggers.hg

view xen/include/xen/lib.h @ 3658:0ef6e8e6e85d

bitkeeper revision 1.1159.212.71 (4200f0afX_JumfbEHQex6TdFENULMQ)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/iap10/xeno-clone/xen-unstable.bk
author iap10@labyrinth.cl.cam.ac.uk
date Wed Feb 02 15:24:31 2005 +0000 (2005-02-02)
parents d1e0d9a8fde0 552dd1f1c64c
children bbe8541361dd
line source
1 #ifndef __LIB_H__
2 #define __LIB_H__
4 #include <stdarg.h>
5 #include <xen/types.h>
6 #include <xen/string.h>
8 #ifndef NDEBUG
9 #define ASSERT(_p) if ( !(_p) ) { printk("Assertion '%s' failed, line %d, file %s\n", #_p , __LINE__, __FILE__); *(int*)0=0; }
10 #else
11 #define ASSERT(_p) ((void)0)
12 #endif
14 #define SWAP(_a, _b) \
15 do { typeof(_a) _t = (_a); (_a) = (_b); (_b) = _t; } while ( 0 )
17 #define reserve_bootmem(_p,_l) ((void)0)
19 struct domain;
21 void cmdline_parse(char *cmdline);
23 #define printk printf
24 void printf(const char *format, ...);
25 void panic(const char *format, ...);
26 long vm_assist(struct domain *, unsigned int, unsigned int);
28 /* vsprintf.c */
29 extern int sprintf(char * buf, const char * fmt, ...)
30 __attribute__ ((format (printf, 2, 3)));
31 extern int vsprintf(char *buf, const char *, va_list);
32 extern int snprintf(char * buf, size_t size, const char * fmt, ...)
33 __attribute__ ((format (printf, 3, 4)));
34 extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
36 long simple_strtol(const char *cp,char **endp,unsigned int base);
37 unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base);
38 long long simple_strtoll(const char *cp,char **endp,unsigned int base);
40 #endif /* __LIB_H__ */