diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-07-05 11:27:58 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-07-05 11:27:58 +0100 |
commit | 79700a5ce7f1aec65cf219fd53c9532fdd1d2188 (patch) | |
tree | b78a2a29817aa65269f822a8deea407c9a7bb475 /extras/mini-os/include/lib.h | |
parent | c5f5756de82e6b64d956a85d7b5a8e629b623083 (diff) | |
download | xen-79700a5ce7f1aec65cf219fd53c9532fdd1d2188.tar.gz xen-79700a5ce7f1aec65cf219fd53c9532fdd1d2188.tar.bz2 xen-79700a5ce7f1aec65cf219fd53c9532fdd1d2188.zip |
[MINIOS]Events handling cleaned up. The interface extended to provide
void* pointer to handlers.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Diffstat (limited to 'extras/mini-os/include/lib.h')
-rw-r--r-- | extras/mini-os/include/lib.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/extras/mini-os/include/lib.h b/extras/mini-os/include/lib.h index 473a059705..809c429789 100644 --- a/extras/mini-os/include/lib.h +++ b/extras/mini-os/include/lib.h @@ -89,6 +89,7 @@ size_t strlen(const char *s); char *strchr(const char *s, int c); char *strstr(const char *s1, const char *s2); char * strcat(char * dest, const char * src); +char *strdup(const char *s); #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) @@ -98,6 +99,18 @@ struct kvec { size_t iov_len; }; +#define ASSERT(x) \ +do { \ + if (!(x)) { \ + printk("ASSERTION FAILED: %s at %s:%d.\n", \ + # x , \ + __FILE__, \ + __LINE__); \ + BUG(); \ + } \ +} while(0) +/* Consistency check as much as possible. */ +void sanity_check(void); #endif /* _LIB_H_ */ |