ia64/xen-unstable

view xen/include/xen/lib.h @ 3762:0a4b76b6b5a0

bitkeeper revision 1.1161 (420b5ed6DpcotfvpA5TTxShadFd_MQ)

Merge with non-ancient version of Xen.
author sos22@douglas.cl.cam.ac.uk
date Thu Feb 10 13:17:10 2005 +0000 (2005-02-10)
parents b6006dac0b1a bbe8541361dd
children 33647e6b3f4e
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__ */