[Xenomai-git] Philippe Gerum : cobalt/kernel: introduce kernel/misc.h, drop kernel/types. h
Module: xenomai-forge Branch: master Commit: 05c388be46e97f5fa017615c510a3f28385c1aa8 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=05c388be46e97f5fa017615c510a3f28385c1aa8 Author: Philippe Gerum r...@xenomai.org Date: Sat Jun 29 18:22:16 2013 +0200 cobalt/kernel: introduce kernel/misc.h, drop kernel/types.h kernel/types.h used to be a kitchen-sink, and stopped making any sense once actual type definitions have gone to uapi/sys/types.h. kernel/misc.h is introduced to contain the few orphaned definitions which don't fit in any existing header. --- include/cobalt/kernel/Makefile.am |1 - include/cobalt/kernel/Makefile.in |1 - include/cobalt/kernel/clock.h |1 + include/cobalt/kernel/heap.h | 18 -- include/cobalt/kernel/intr.h |1 - include/cobalt/kernel/{types.h = misc.h} | 10 -- include/cobalt/kernel/registry.h |2 -- include/cobalt/kernel/thread.h|1 - kernel/cobalt/intr.c |1 + 9 files changed, 14 insertions(+), 22 deletions(-) diff --git a/include/cobalt/kernel/Makefile.am b/include/cobalt/kernel/Makefile.am index 87eef94..540e02c 100644 --- a/include/cobalt/kernel/Makefile.am +++ b/include/cobalt/kernel/Makefile.am @@ -29,7 +29,6 @@ noinst_HEADERS = \ thread.h\ timer.h \ trace.h \ - types.h \ vdso.h \ vfile.h diff --git a/include/cobalt/kernel/Makefile.in b/include/cobalt/kernel/Makefile.in index 3846e5c..9f11791 100644 --- a/include/cobalt/kernel/Makefile.in +++ b/include/cobalt/kernel/Makefile.in @@ -274,7 +274,6 @@ noinst_HEADERS = \ thread.h\ timer.h \ trace.h \ - types.h \ vdso.h \ vfile.h diff --git a/include/cobalt/kernel/clock.h b/include/cobalt/kernel/clock.h index c1f64ad..ae01bc6 100644 --- a/include/cobalt/kernel/clock.h +++ b/include/cobalt/kernel/clock.h @@ -28,6 +28,7 @@ #include cobalt/kernel/list.h #include cobalt/kernel/vfile.h +#include cobalt/uapi/sys/types.h #include asm-generic/xenomai/timeconv.h #define XNTBLCK 0x0001/* Time base is locked. */ diff --git a/include/cobalt/kernel/heap.h b/include/cobalt/kernel/heap.h index 4c2b8d8..67ab718 100644 --- a/include/cobalt/kernel/heap.h +++ b/include/cobalt/kernel/heap.h @@ -22,9 +22,15 @@ #ifndef _COBALT_KERNEL_HEAP_H #define _COBALT_KERNEL_HEAP_H +#include cobalt/kernel/assert.h +#include cobalt/kernel/lock.h +#include cobalt/kernel/list.h +#include cobalt/kernel/trace.h +#include cobalt/kernel/misc.h +#include cobalt/uapi/sys/types.h +#include cobalt/uapi/sys/heap.h + /* - * CONSTRAINTS: - * * Minimum page size is 2 ** XNHEAP_MINLOG2 (must be large enough to * hold a pointer). * @@ -41,14 +47,6 @@ * XNHEAP_MINLOG2 and XNHEAP_MAXLOG2 inclusive, plus one to honor * requests ranging from the maximum page size to twice this size. */ - -#include cobalt/kernel/assert.h -#include cobalt/kernel/lock.h -#include cobalt/kernel/list.h -#include cobalt/kernel/trace.h -#include cobalt/kernel/types.h -#include cobalt/uapi/sys/heap.h - #define XNHEAP_PAGE_SIZE 512 /* A reasonable value for the xnheap page size */ #define XNHEAP_PAGE_MASK (~(XNHEAP_PAGE_SIZE-1)) #define XNHEAP_PAGE_ALIGN(addr) (((addr)+XNHEAP_PAGE_SIZE-1)XNHEAP_PAGE_MASK) diff --git a/include/cobalt/kernel/intr.h b/include/cobalt/kernel/intr.h index 38bf683..3aecc87 100644 --- a/include/cobalt/kernel/intr.h +++ b/include/cobalt/kernel/intr.h @@ -22,7 +22,6 @@ #ifndef _COBALT_KERNEL_INTR_H #define _COBALT_KERNEL_INTR_H -#include cobalt/kernel/types.h #include cobalt/kernel/stat.h /* Possible return values of ISR. */ diff --git a/include/cobalt/kernel/types.h b/include/cobalt/kernel/misc.h similarity index 81% rename from include/cobalt/kernel/types.h rename to include/cobalt/kernel/misc.h index 72e50da..a2c723a 100644 --- a/include/cobalt/kernel/types.h +++ b/include/cobalt/kernel/misc.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2013 Philippe Gerum r...@xenomai.org. + * Copyright (C) 2013 Philippe Gerum r...@xenomai.org. * * Xenomai is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published @@ -17,13 +17,11 @@ * 02111-1307, USA. */ -#ifndef _COBALT_KERNEL_TYPES_H -#define _COBALT_KERNEL_TYPES_H - -#include cobalt/uapi/sys/types.h +#ifndef _COBALT_KERNEL_MISC_H +#define _COBALT_KERNEL_MISC_H #define XENO_INFO KERN_INFO[Xenomai] #define XENO_WARN KERN_WARNING [Xenomai] #define XENO_ERR KERN_ERR [Xenomai] -#endif /* !_COBALT_KERNEL_TYPES_H */ +#endif /* !_COBALT_KERNEL_MISC_H */ diff --git a/include/cobalt/kernel/registry.h b/include/cobalt/kernel/registry.h index 669f10f..fd472ee 100644 --- a/include/cobalt/kernel/registry.h +++ b/include/cobalt/kernel/registry.h @@
[Xenomai-git] Philippe Gerum : cobalt/kernel: introduce kernel/misc.h, drop kernel/types. h
Module: xenomai-forge Branch: next Commit: 05c388be46e97f5fa017615c510a3f28385c1aa8 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=05c388be46e97f5fa017615c510a3f28385c1aa8 Author: Philippe Gerum r...@xenomai.org Date: Sat Jun 29 18:22:16 2013 +0200 cobalt/kernel: introduce kernel/misc.h, drop kernel/types.h kernel/types.h used to be a kitchen-sink, and stopped making any sense once actual type definitions have gone to uapi/sys/types.h. kernel/misc.h is introduced to contain the few orphaned definitions which don't fit in any existing header. --- include/cobalt/kernel/Makefile.am |1 - include/cobalt/kernel/Makefile.in |1 - include/cobalt/kernel/clock.h |1 + include/cobalt/kernel/heap.h | 18 -- include/cobalt/kernel/intr.h |1 - include/cobalt/kernel/{types.h = misc.h} | 10 -- include/cobalt/kernel/registry.h |2 -- include/cobalt/kernel/thread.h|1 - kernel/cobalt/intr.c |1 + 9 files changed, 14 insertions(+), 22 deletions(-) diff --git a/include/cobalt/kernel/Makefile.am b/include/cobalt/kernel/Makefile.am index 87eef94..540e02c 100644 --- a/include/cobalt/kernel/Makefile.am +++ b/include/cobalt/kernel/Makefile.am @@ -29,7 +29,6 @@ noinst_HEADERS = \ thread.h\ timer.h \ trace.h \ - types.h \ vdso.h \ vfile.h diff --git a/include/cobalt/kernel/Makefile.in b/include/cobalt/kernel/Makefile.in index 3846e5c..9f11791 100644 --- a/include/cobalt/kernel/Makefile.in +++ b/include/cobalt/kernel/Makefile.in @@ -274,7 +274,6 @@ noinst_HEADERS = \ thread.h\ timer.h \ trace.h \ - types.h \ vdso.h \ vfile.h diff --git a/include/cobalt/kernel/clock.h b/include/cobalt/kernel/clock.h index c1f64ad..ae01bc6 100644 --- a/include/cobalt/kernel/clock.h +++ b/include/cobalt/kernel/clock.h @@ -28,6 +28,7 @@ #include cobalt/kernel/list.h #include cobalt/kernel/vfile.h +#include cobalt/uapi/sys/types.h #include asm-generic/xenomai/timeconv.h #define XNTBLCK 0x0001/* Time base is locked. */ diff --git a/include/cobalt/kernel/heap.h b/include/cobalt/kernel/heap.h index 4c2b8d8..67ab718 100644 --- a/include/cobalt/kernel/heap.h +++ b/include/cobalt/kernel/heap.h @@ -22,9 +22,15 @@ #ifndef _COBALT_KERNEL_HEAP_H #define _COBALT_KERNEL_HEAP_H +#include cobalt/kernel/assert.h +#include cobalt/kernel/lock.h +#include cobalt/kernel/list.h +#include cobalt/kernel/trace.h +#include cobalt/kernel/misc.h +#include cobalt/uapi/sys/types.h +#include cobalt/uapi/sys/heap.h + /* - * CONSTRAINTS: - * * Minimum page size is 2 ** XNHEAP_MINLOG2 (must be large enough to * hold a pointer). * @@ -41,14 +47,6 @@ * XNHEAP_MINLOG2 and XNHEAP_MAXLOG2 inclusive, plus one to honor * requests ranging from the maximum page size to twice this size. */ - -#include cobalt/kernel/assert.h -#include cobalt/kernel/lock.h -#include cobalt/kernel/list.h -#include cobalt/kernel/trace.h -#include cobalt/kernel/types.h -#include cobalt/uapi/sys/heap.h - #define XNHEAP_PAGE_SIZE 512 /* A reasonable value for the xnheap page size */ #define XNHEAP_PAGE_MASK (~(XNHEAP_PAGE_SIZE-1)) #define XNHEAP_PAGE_ALIGN(addr) (((addr)+XNHEAP_PAGE_SIZE-1)XNHEAP_PAGE_MASK) diff --git a/include/cobalt/kernel/intr.h b/include/cobalt/kernel/intr.h index 38bf683..3aecc87 100644 --- a/include/cobalt/kernel/intr.h +++ b/include/cobalt/kernel/intr.h @@ -22,7 +22,6 @@ #ifndef _COBALT_KERNEL_INTR_H #define _COBALT_KERNEL_INTR_H -#include cobalt/kernel/types.h #include cobalt/kernel/stat.h /* Possible return values of ISR. */ diff --git a/include/cobalt/kernel/types.h b/include/cobalt/kernel/misc.h similarity index 81% rename from include/cobalt/kernel/types.h rename to include/cobalt/kernel/misc.h index 72e50da..a2c723a 100644 --- a/include/cobalt/kernel/types.h +++ b/include/cobalt/kernel/misc.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2013 Philippe Gerum r...@xenomai.org. + * Copyright (C) 2013 Philippe Gerum r...@xenomai.org. * * Xenomai is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published @@ -17,13 +17,11 @@ * 02111-1307, USA. */ -#ifndef _COBALT_KERNEL_TYPES_H -#define _COBALT_KERNEL_TYPES_H - -#include cobalt/uapi/sys/types.h +#ifndef _COBALT_KERNEL_MISC_H +#define _COBALT_KERNEL_MISC_H #define XENO_INFO KERN_INFO[Xenomai] #define XENO_WARN KERN_WARNING [Xenomai] #define XENO_ERR KERN_ERR [Xenomai] -#endif /* !_COBALT_KERNEL_TYPES_H */ +#endif /* !_COBALT_KERNEL_MISC_H */ diff --git a/include/cobalt/kernel/registry.h b/include/cobalt/kernel/registry.h index 669f10f..fd472ee 100644 --- a/include/cobalt/kernel/registry.h +++ b/include/cobalt/kernel/registry.h @@