diff options
author | neal <neal> | 2008-08-14 12:25:04 +0000 |
---|---|---|
committer | neal <neal> | 2008-08-14 12:25:04 +0000 |
commit | 868ccb816257ccea6fdb6d99772c8a561d938e22 (patch) | |
tree | 8d92e1c624b40e57079d5cd25180c3282eef60ba /libl4 | |
parent | 67649b8d56047be35d3c015b72f717cbc50a21ef (diff) |
2008-08-14 Neal H. Walfield <neal@gnu.org>
* l4/gnu/kip.h (l4_memory_desc_type_to_string): New function.
Diffstat (limited to 'libl4')
-rw-r--r-- | libl4/ChangeLog | 4 | ||||
-rw-r--r-- | libl4/l4/gnu/kip.h | 25 |
2 files changed, 28 insertions, 1 deletions
diff --git a/libl4/ChangeLog b/libl4/ChangeLog index f18ffdc..2955668 100644 --- a/libl4/ChangeLog +++ b/libl4/ChangeLog @@ -1,3 +1,7 @@ +2008-08-14 Neal H. Walfield <neal@gnu.org> + + * l4/gnu/kip.h (l4_memory_desc_type_to_string): New function. + 2008-06-18 Thomas Schwinge <tschwinge@gnu.org> * ia32/l4/bits/syscall.h (_L4_kernel_interface): Cast return value. diff --git a/libl4/l4/gnu/kip.h b/libl4/l4/gnu/kip.h index 6c230a9..06537cc 100644 --- a/libl4/l4/gnu/kip.h +++ b/libl4/l4/gnu/kip.h @@ -1,5 +1,5 @@ /* l4/gnu/kip.h - Public GNU interface to the L4 kernel interface page. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2008 Free Software Foundation, Inc. Written by Marcus Brinkmann <marcus@gnu.org>. This file is part of the GNU L4 library. @@ -495,6 +495,29 @@ l4_memory_desc_type (l4_memory_desc_t *mem) return _L4_memory_desc_type (mem); } +static inline const char * +l4_memory_desc_type_to_string (l4_word_t type) +{ + switch (type) + { + case L4_MEMDESC_UNDEFINED: + return "undefined"; + case L4_MEMDESC_CONVENTIONAL: + return "conventional"; + case L4_MEMDESC_RESERVED: + return "reserved"; + case L4_MEMDESC_DEDICATED: + return "dedicated"; + case L4_MEMDESC_SHARED: + return "shared"; + case L4_MEMDESC_BOOTLOADER: + return "bootloader"; + case L4_MEMDESC_ARCH: + return "arch"; + default: + return "unknown"; + } +} static inline l4_word_t _L4_attribute_always_inline |