ia64/xen-unstable

annotate xen/include/xen/lib.h @ 3354:7f2bf9fecd7e

bitkeeper revision 1.1159.170.74 (41d4488f9fINTxUzyjoq2FnTn5AvMQ)

Improved memory bootstrapping takes into account e820 RAM holes.
author kaf24@scramble.cl.cam.ac.uk
date Thu Dec 30 18:27:27 2004 +0000 (2004-12-30)
parents 4b44501cd54c
children d1e0d9a8fde0
rev   line source
kaf24@1210 1 #ifndef __LIB_H__
kaf24@1210 2 #define __LIB_H__
kaf24@1210 3
kaf24@1210 4 #include <stdarg.h>
kaf24@1210 5 #include <xen/types.h>
kaf24@1486 6 #include <xen/string.h>
kaf24@1210 7
kaf24@1210 8 #ifndef NDEBUG
kaf24@2095 9 #define ASSERT(_p) if ( !(_p) ) { printk("Assertion '%s' failed, line %d, file %s\n", #_p , __LINE__, __FILE__); *(int*)0=0; }
kaf24@1210 10 #else
kaf24@1210 11 #define ASSERT(_p) ((void)0)
kaf24@1210 12 #endif
kaf24@1210 13
kaf24@2635 14 #define SWAP(_a, _b) \
kaf24@2635 15 do { typeof(_a) _t = (_a); (_a) = (_b); (_b) = _t; } while ( 0 )
kaf24@2635 16
kaf24@3354 17 #define reserve_bootmem(_p,_l) ((void)0)
kaf24@1210 18
cl349@2448 19 struct domain;
cl349@2448 20
kaf24@3338 21 void cmdline_parse(char *cmdline);
kaf24@3338 22
kaf24@1210 23 #define printk printf
kaf24@1486 24 void printf(const char *format, ...);
kaf24@1210 25 void panic(const char *format, ...);
cl349@2448 26 long vm_assist(struct domain *, unsigned int, unsigned int);
kaf24@1210 27
kaf24@1210 28 /* vsprintf.c */
kaf24@1210 29 extern int sprintf(char * buf, const char * fmt, ...)
kaf24@1210 30 __attribute__ ((format (printf, 2, 3)));
kaf24@1210 31 extern int vsprintf(char *buf, const char *, va_list);
kaf24@1210 32 extern int snprintf(char * buf, size_t size, const char * fmt, ...)
kaf24@1210 33 __attribute__ ((format (printf, 3, 4)));
kaf24@1210 34 extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
kaf24@1210 35
kaf24@1210 36 long simple_strtol(const char *cp,char **endp,unsigned int base);
kaf24@1210 37 unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base);
kaf24@1210 38 long long simple_strtoll(const char *cp,char **endp,unsigned int base);
kaf24@1210 39
kaf24@1210 40 #endif /* __LIB_H__ */