[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/8] include: add a fixed-size string type for debugging purp
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 5/8] include: add a fixed-size string type for debugging purposes |
Date: |
Sat, 1 Feb 2014 15:26:48 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Sat 01 Feb 2014 15:09:25 +0100, a écrit :
> * include/mach/debug.defs: New file.
> * include/mach/debug.h: Likewise.
Ack.
> ---
> include/mach_debug/mach_debug_types.defs | 2 ++
> include/mach_debug/mach_debug_types.h | 11 +++++++++++
> 2 files changed, 13 insertions(+)
>
> diff --git a/include/mach_debug/mach_debug_types.defs
> b/include/mach_debug/mach_debug_types.defs
> index f60125a..d24b6f9 100644
> --- a/include/mach_debug/mach_debug_types.defs
> +++ b/include/mach_debug/mach_debug_types.defs
> @@ -57,6 +57,8 @@ type vm_page_info_array_t = array[] of vm_page_info_t;
>
> type symtab_name_t = (MACH_MSG_TYPE_STRING_C, 8*32);
>
> +type kernel_debug_name_t = c_string[*: 64];
> +
> import <mach_debug/mach_debug_types.h>;
>
> #endif /* _MACH_DEBUG_MACH_DEBUG_TYPES_DEFS_ */
> diff --git a/include/mach_debug/mach_debug_types.h
> b/include/mach_debug/mach_debug_types.h
> index 5d4efcd..9c7d1fd 100644
> --- a/include/mach_debug/mach_debug_types.h
> +++ b/include/mach_debug/mach_debug_types.h
> @@ -37,4 +37,15 @@
>
> typedef char symtab_name_t[32];
>
> +/*
> + * A fixed-length string data type intended for names given to
> + * kernel objects.
> + *
> + * Note that it is not guaranteed that the in-kernel data
> + * structure will hold KERNEL_DEBUG_NAME_MAX bytes. The given
> + * name will be truncated to fit into the target data structure.
> + */
> +#define KERNEL_DEBUG_NAME_MAX (64)
> +typedef char kernel_debug_name_t[KERNEL_DEBUG_NAME_MAX];
> +
> #endif /* _MACH_DEBUG_MACH_DEBUG_TYPES_H_ */
> --
> 1.8.5.2
>
--
Samuel
> dvips -o $@ $<
Faut faire gffe de pas te couper avec ton truc, t'as mis des ciseaux ($<)
partout :))
-+- Dom in Guide du linuxien pervers - "J'aime pas les Makefile !" -+-
- [PATCH 1/8] kern: fix printing of kmem_cache names, Justus Winter, 2014/02/01
- [PATCH 2/8] kern: add snprintf, Justus Winter, 2014/02/01
- [PATCH 4/8] ipc: use the name of the task for error messages, Justus Winter, 2014/02/01
- [PATCH 3/8] kern: add a name field to struct task, Justus Winter, 2014/02/01
- [PATCH 7/8] include: add task_set_name, Justus Winter, 2014/02/01
- [PATCH 5/8] include: add a fixed-size string type for debugging purposes, Justus Winter, 2014/02/01
- Re: [PATCH 5/8] include: add a fixed-size string type for debugging purposes,
Samuel Thibault <=
- [PATCH 6/8] kern: implement task_set_name, Justus Winter, 2014/02/01
[PATCH 8/8] doc: document task_set_name, Justus Winter, 2014/02/01
Re: [PATCH 1/8] kern: fix printing of kmem_cache names, Samuel Thibault, 2014/02/01