ia64/xen-unstable

view xen/include/xen/lib.h @ 3339:597555bad4b5

bitkeeper revision 1.1159.1.509 (41d2caf2cGsHkns4vKFDopvGUuM4BQ)

Merge
author kaf24@scramble.cl.cam.ac.uk
date Wed Dec 29 15:19:14 2004 +0000 (2004-12-29)
parents 0174982516f6 4b44501cd54c
children d1e0d9a8fde0
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) \
18 printk("Memory Reservation 0x%lx, %lu bytes\n", (_p), (_l))
20 struct domain;
22 void cmdline_parse(char *cmdline);
24 #define printk printf
25 void printf(const char *format, ...);
26 void panic(const char *format, ...);
27 long vm_assist(struct domain *, unsigned int, unsigned int);
29 /* vsprintf.c */
30 extern int sprintf(char * buf, const char * fmt, ...)
31 __attribute__ ((format (printf, 2, 3)));
32 extern int vsprintf(char *buf, const char *, va_list);
33 extern int snprintf(char * buf, size_t size, const char * fmt, ...)
34 __attribute__ ((format (printf, 3, 4)));
35 extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
37 long simple_strtol(const char *cp,char **endp,unsigned int base);
38 unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base);
39 long long simple_strtoll(const char *cp,char **endp,unsigned int base);
41 #endif /* __LIB_H__ */