ia64/xen-unstable

annotate xen/include/xen/lib.h @ 2635:0174982516f6

bitkeeper revision 1.1159.1.229 (416d3ad1BpCS1RVPjkX14HUpsanlGw)

Shadow pagetable walkthrough.
author kaf24@freefall.cl.cam.ac.uk
date Wed Oct 13 14:25:21 2004 +0000 (2004-10-13)
parents 46859bdc5411
children 4b44501cd54c 597555bad4b5
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@1210 17 #define reserve_bootmem(_p,_l) \
kaf24@1210 18 printk("Memory Reservation 0x%lx, %lu bytes\n", (_p), (_l))
kaf24@1210 19
cl349@2448 20 struct domain;
cl349@2448 21
kaf24@1210 22 /* kernel.c */
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__ */