All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [PATCH] move RTDM headers
@ 2006-01-07 12:22 Jan Kiszka
  2006-01-07 13:41 ` [Xenomai-core] " Philippe Gerum
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jan Kiszka @ 2006-01-07 12:22 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai-core


[-- Attachment #1.1: Type: text/plain, Size: 502 bytes --]

Hi Philippe,

this patches cleans up the include/rtdm folder by moving internal
headers to ksrc/skins/rtdm, leaving only rtdm.h, rtdm_driver.h, the two
profile headers, and syscall.h there. The latter is still only needed
for building Xenomai itself, thus it will not be installed. Successfully
built for 2.4 and 2.6. Additionally, I compiled latest RTnet SVN against
it without problems (x86, PPC is currently being fixed by Wolfgang).

Please apply/move the involved headers and run bootstrap.

Jan


[-- Attachment #1.2: rtdm_headers.patch --]
[-- Type: text/x-patch, Size: 8117 bytes --]

Index: include/rtdm/device.h
===================================================================
--- include/rtdm/device.h	(Revision 380)
+++ include/rtdm/device.h	(Arbeitskopie)
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2005 Jan Kiszka <jan.kiszka@domain.hid>.
- * Copyright (C) 2005 Joerg Langenberg <joerg.langenberg@domain.hid>.
- *
- * Xenomai is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Xenomai is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Xenomai; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef _RTDM_DEVICE_H
-#define _RTDM_DEVICE_H
-
-#include <xenomai/nucleus/pod.h>
-#include <xenomai/rtdm/rtdm_driver.h>
-#include <linux/sem.h>
-
-
-#define DEF_DEVNAME_HASHTAB_SIZE    256 /* entries in name hash table */
-#define DEF_PROTO_HASHTAB_SIZE      256 /* entries in protocol hash table */
-
-
-extern struct semaphore nrt_dev_lock;
-extern xnlock_t         rt_dev_lock;
-
-extern unsigned int     devname_hashtab_size;
-extern unsigned int     protocol_hashtab_size;
-
-extern struct list_head *rtdm_named_devices;
-extern struct list_head *rtdm_protocol_devices;
-
-
-int rtdm_no_support(void);
-
-struct rtdm_device *get_named_device(const char *name);
-struct rtdm_device *get_protocol_device(int protocol_family, int socket_type);
-
-static inline void rtdm_dereference_device(struct rtdm_device *device)
-{
-    atomic_dec(&device->reserved.refcount);
-}
-
-int __init rtdm_dev_init(void);
-
-static inline void rtdm_dev_cleanup(void)
-{
-    kfree(rtdm_named_devices);
-    kfree(rtdm_protocol_devices);
-}
-
-#endif /* _RTDM_DEVICE_H */
Index: include/rtdm/Makefile.am
===================================================================
--- include/rtdm/Makefile.am	(Revision 380)
+++ include/rtdm/Makefile.am	(Arbeitskopie)
@@ -1,11 +1,10 @@
 includedir = $(prefix)/include/rtdm
 
+noinst_HEADERS = \
+	syscall.h
+
 include_HEADERS = \
-	core.h \
-	device.h \
-	proc.h \
 	rtdm.h \
 	rtdm_driver.h \
 	rtserial.h \
-	syscall.h \
 	rtbenchmark.h
Index: include/rtdm/proc.h
===================================================================
--- include/rtdm/proc.h	(Revision 380)
+++ include/rtdm/proc.h	(Arbeitskopie)
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2005 Jan Kiszka <jan.kiszka@domain.hid>.
- * Copyright (C) 2005 Joerg Langenberg <joerg.langenberg@domain.hid>.
- *
- * Xenomai is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Xenomai is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Xenomai; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef _RTDM_PROC_H
-#define _RTDM_PROC_H
-
-extern struct proc_dir_entry *rtdm_proc_root;
-
-
-int rtdm_proc_register_device(struct rtdm_device* device);
-
-int __init rtdm_proc_init(void);
-
-void rtdm_proc_cleanup(void);
-
-#endif /* _RTDM_PROC_H */
Index: include/rtdm/core.h
===================================================================
--- include/rtdm/core.h	(Revision 380)
+++ include/rtdm/core.h	(Arbeitskopie)
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2005 Jan Kiszka <jan.kiszka@domain.hid>.
- * Copyright (C) 2005 Joerg Langenberg <joerg.langenberg@domain.hid>.
- *
- * Xenomai is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Xenomai is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Xenomai; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef _RTDM_CORE_H
-#define _RTDM_CORE_H
-
-#include <xenomai/nucleus/pod.h>
-#include <xenomai/rtdm/rtdm_driver.h>
-
-
-#define DEF_FILDES_COUNT    64  /* default number of file descriptors */
-
-
-struct rtdm_fildes {
-    struct rtdm_fildes                  *next;
-    volatile struct rtdm_dev_context    *context;
-};
-
-
-#ifdef CONFIG_SMP
-extern xnlock_t             rt_fildes_lock;
-#endif /* CONFIG_SMP */
-
-extern unsigned int         fd_count;
-extern struct rtdm_fildes   *fildes_table;
-extern int                  open_fildes;
-
-
-int __init rtdm_core_init(void);
-
-static inline void rtdm_core_cleanup(void)
-{
-    kfree(fildes_table);
-}
-
-#endif /* _RTDM_CORE_H */
Index: ksrc/skins/rtdm/device.c
===================================================================
--- ksrc/skins/rtdm/device.c	(Revision 380)
+++ ksrc/skins/rtdm/device.c	(Arbeitskopie)
@@ -28,8 +28,8 @@
 #include <linux/module.h>
 #include <linux/delay.h>
 
-#include <xenomai/rtdm/device.h>
-#include <xenomai/rtdm/proc.h>
+#include "device.h"
+#include "proc.h"
 
 
 #define SET_DEFAULT_OP(device, operation)                               \
Index: ksrc/skins/rtdm/proc.c
===================================================================
--- ksrc/skins/rtdm/proc.c	(Revision 380)
+++ ksrc/skins/rtdm/proc.c	(Arbeitskopie)
@@ -22,10 +22,11 @@
 #ifdef CONFIG_PROC_FS
 
 #include <linux/proc_fs.h>
-#include <xenomai/rtdm/core.h>
-#include <xenomai/rtdm/device.h>
 
+#include "core.h"
+#include "device.h"
 
+
 /* Derived from Erwin Rol's rtai_proc_fs.h.
    Assumes that output fits into the provided buffer. */
 
Index: ksrc/skins/rtdm/module.c
===================================================================
--- ksrc/skins/rtdm/module.c	(Revision 380)
+++ ksrc/skins/rtdm/module.c	(Arbeitskopie)
@@ -45,10 +45,12 @@
 #include <xenomai/nucleus/core.h>
 #include <xenomai/rtdm/syscall.h>
 #endif /* __KERNEL__ */
-#include <xenomai/rtdm/core.h>
-#include <xenomai/rtdm/device.h>
-#include <xenomai/rtdm/proc.h>
 
+#include "core.h"
+#include "device.h"
+#include "proc.h"
+
+
 MODULE_DESCRIPTION("Real-Time Driver Model");
 MODULE_AUTHOR("jan.kiszka@domain.hid");
 MODULE_LICENSE("GPL");
Index: ksrc/skins/rtdm/core.c
===================================================================
--- ksrc/skins/rtdm/core.c	(Revision 380)
+++ ksrc/skins/rtdm/core.c	(Arbeitskopie)
@@ -30,12 +30,13 @@
 
 #include <xenomai/nucleus/pod.h>
 #include <xenomai/nucleus/heap.h>
+#include <xenomai/rtdm/syscall.h>
 #include <xenomai/rtdm/rtdm_driver.h>
-#include <xenomai/rtdm/core.h>
-#include <xenomai/rtdm/device.h>
-#include <xenomai/rtdm/syscall.h>
 
+#include "core.h"
+#include "device.h"
 
+
 unsigned int                fd_count = DEF_FILDES_COUNT;
 module_param(fd_count, uint, 0400);
 MODULE_PARM_DESC(fd_count, "Maximum number of file descriptors");
Index: ksrc/skins/rtdm/syscall.c
===================================================================
--- ksrc/skins/rtdm/syscall.c	(Revision 380)
+++ ksrc/skins/rtdm/syscall.c	(Arbeitskopie)
@@ -19,10 +19,11 @@
 
 #include <xenomai/nucleus/shadow.h>
 #include <xenomai/rtdm/rtdm_driver.h>
-#include <xenomai/rtdm/core.h>
 #include <xenomai/rtdm/syscall.h>
 
+#include "core.h"
 
+
 int __rtdm_muxid;
 
 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Xenomai-core] Re: [PATCH] move RTDM headers
  2006-01-07 12:22 [Xenomai-core] [PATCH] move RTDM headers Jan Kiszka
@ 2006-01-07 13:41 ` Philippe Gerum
  2006-01-07 13:46 ` Philippe Gerum
  2006-01-07 17:07 ` Philippe Gerum
  2 siblings, 0 replies; 8+ messages in thread
From: Philippe Gerum @ 2006-01-07 13:41 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

Jan Kiszka wrote:
> Hi Philippe,
> 
> this patches cleans up the include/rtdm folder by moving internal
> headers to ksrc/skins/rtdm, leaving only rtdm.h, rtdm_driver.h, the two
> profile headers, and syscall.h there. The latter is still only needed
> for building Xenomai itself, thus it will not be installed. Successfully
> built for 2.4 and 2.6. Additionally, I compiled latest RTnet SVN against
> it without problems (x86, PPC is currently being fixed by Wolfgang).
> 
> Please apply/move the involved headers and run bootstrap.
> 

Applied, thanks.

> Jan
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: include/rtdm/device.h
> ===================================================================
> --- include/rtdm/device.h	(Revision 380)
> +++ include/rtdm/device.h	(Arbeitskopie)
> @@ -1,60 +0,0 @@
> -/*
> - * Copyright (C) 2005 Jan Kiszka <jan.kiszka@domain.hid>.
> - * Copyright (C) 2005 Joerg Langenberg <joerg.langenberg@domain.hid>.
> - *
> - * Xenomai is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * Xenomai is distributed in the hope that it will be useful, but
> - * WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> - * General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with Xenomai; if not, write to the Free Software Foundation,
> - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
> - */
> -
> -#ifndef _RTDM_DEVICE_H
> -#define _RTDM_DEVICE_H
> -
> -#include <xenomai/nucleus/pod.h>
> -#include <xenomai/rtdm/rtdm_driver.h>
> -#include <linux/sem.h>
> -
> -
> -#define DEF_DEVNAME_HASHTAB_SIZE    256 /* entries in name hash table */
> -#define DEF_PROTO_HASHTAB_SIZE      256 /* entries in protocol hash table */
> -
> -
> -extern struct semaphore nrt_dev_lock;
> -extern xnlock_t         rt_dev_lock;
> -
> -extern unsigned int     devname_hashtab_size;
> -extern unsigned int     protocol_hashtab_size;
> -
> -extern struct list_head *rtdm_named_devices;
> -extern struct list_head *rtdm_protocol_devices;
> -
> -
> -int rtdm_no_support(void);
> -
> -struct rtdm_device *get_named_device(const char *name);
> -struct rtdm_device *get_protocol_device(int protocol_family, int socket_type);
> -
> -static inline void rtdm_dereference_device(struct rtdm_device *device)
> -{
> -    atomic_dec(&device->reserved.refcount);
> -}
> -
> -int __init rtdm_dev_init(void);
> -
> -static inline void rtdm_dev_cleanup(void)
> -{
> -    kfree(rtdm_named_devices);
> -    kfree(rtdm_protocol_devices);
> -}
> -
> -#endif /* _RTDM_DEVICE_H */
> Index: include/rtdm/Makefile.am
> ===================================================================
> --- include/rtdm/Makefile.am	(Revision 380)
> +++ include/rtdm/Makefile.am	(Arbeitskopie)
> @@ -1,11 +1,10 @@
>  includedir = $(prefix)/include/rtdm
>  
> +noinst_HEADERS = \
> +	syscall.h
> +
>  include_HEADERS = \
> -	core.h \
> -	device.h \
> -	proc.h \
>  	rtdm.h \
>  	rtdm_driver.h \
>  	rtserial.h \
> -	syscall.h \
>  	rtbenchmark.h
> Index: include/rtdm/proc.h
> ===================================================================
> --- include/rtdm/proc.h	(Revision 380)
> +++ include/rtdm/proc.h	(Arbeitskopie)
> @@ -1,32 +0,0 @@
> -/*
> - * Copyright (C) 2005 Jan Kiszka <jan.kiszka@domain.hid>.
> - * Copyright (C) 2005 Joerg Langenberg <joerg.langenberg@domain.hid>.
> - *
> - * Xenomai is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * Xenomai is distributed in the hope that it will be useful, but
> - * WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> - * General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with Xenomai; if not, write to the Free Software Foundation,
> - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
> - */
> -
> -#ifndef _RTDM_PROC_H
> -#define _RTDM_PROC_H
> -
> -extern struct proc_dir_entry *rtdm_proc_root;
> -
> -
> -int rtdm_proc_register_device(struct rtdm_device* device);
> -
> -int __init rtdm_proc_init(void);
> -
> -void rtdm_proc_cleanup(void);
> -
> -#endif /* _RTDM_PROC_H */
> Index: include/rtdm/core.h
> ===================================================================
> --- include/rtdm/core.h	(Revision 380)
> +++ include/rtdm/core.h	(Arbeitskopie)
> @@ -1,52 +0,0 @@
> -/*
> - * Copyright (C) 2005 Jan Kiszka <jan.kiszka@domain.hid>.
> - * Copyright (C) 2005 Joerg Langenberg <joerg.langenberg@domain.hid>.
> - *
> - * Xenomai is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * Xenomai is distributed in the hope that it will be useful, but
> - * WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> - * General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with Xenomai; if not, write to the Free Software Foundation,
> - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
> - */
> -
> -#ifndef _RTDM_CORE_H
> -#define _RTDM_CORE_H
> -
> -#include <xenomai/nucleus/pod.h>
> -#include <xenomai/rtdm/rtdm_driver.h>
> -
> -
> -#define DEF_FILDES_COUNT    64  /* default number of file descriptors */
> -
> -
> -struct rtdm_fildes {
> -    struct rtdm_fildes                  *next;
> -    volatile struct rtdm_dev_context    *context;
> -};
> -
> -
> -#ifdef CONFIG_SMP
> -extern xnlock_t             rt_fildes_lock;
> -#endif /* CONFIG_SMP */
> -
> -extern unsigned int         fd_count;
> -extern struct rtdm_fildes   *fildes_table;
> -extern int                  open_fildes;
> -
> -
> -int __init rtdm_core_init(void);
> -
> -static inline void rtdm_core_cleanup(void)
> -{
> -    kfree(fildes_table);
> -}
> -
> -#endif /* _RTDM_CORE_H */
> Index: ksrc/skins/rtdm/device.c
> ===================================================================
> --- ksrc/skins/rtdm/device.c	(Revision 380)
> +++ ksrc/skins/rtdm/device.c	(Arbeitskopie)
> @@ -28,8 +28,8 @@
>  #include <linux/module.h>
>  #include <linux/delay.h>
>  
> -#include <xenomai/rtdm/device.h>
> -#include <xenomai/rtdm/proc.h>
> +#include "device.h"
> +#include "proc.h"
>  
>  
>  #define SET_DEFAULT_OP(device, operation)                               \
> Index: ksrc/skins/rtdm/proc.c
> ===================================================================
> --- ksrc/skins/rtdm/proc.c	(Revision 380)
> +++ ksrc/skins/rtdm/proc.c	(Arbeitskopie)
> @@ -22,10 +22,11 @@
>  #ifdef CONFIG_PROC_FS
>  
>  #include <linux/proc_fs.h>
> -#include <xenomai/rtdm/core.h>
> -#include <xenomai/rtdm/device.h>
>  
> +#include "core.h"
> +#include "device.h"
>  
> +
>  /* Derived from Erwin Rol's rtai_proc_fs.h.
>     Assumes that output fits into the provided buffer. */
>  
> Index: ksrc/skins/rtdm/module.c
> ===================================================================
> --- ksrc/skins/rtdm/module.c	(Revision 380)
> +++ ksrc/skins/rtdm/module.c	(Arbeitskopie)
> @@ -45,10 +45,12 @@
>  #include <xenomai/nucleus/core.h>
>  #include <xenomai/rtdm/syscall.h>
>  #endif /* __KERNEL__ */
> -#include <xenomai/rtdm/core.h>
> -#include <xenomai/rtdm/device.h>
> -#include <xenomai/rtdm/proc.h>
>  
> +#include "core.h"
> +#include "device.h"
> +#include "proc.h"
> +
> +
>  MODULE_DESCRIPTION("Real-Time Driver Model");
>  MODULE_AUTHOR("jan.kiszka@domain.hid");
>  MODULE_LICENSE("GPL");
> Index: ksrc/skins/rtdm/core.c
> ===================================================================
> --- ksrc/skins/rtdm/core.c	(Revision 380)
> +++ ksrc/skins/rtdm/core.c	(Arbeitskopie)
> @@ -30,12 +30,13 @@
>  
>  #include <xenomai/nucleus/pod.h>
>  #include <xenomai/nucleus/heap.h>
> +#include <xenomai/rtdm/syscall.h>
>  #include <xenomai/rtdm/rtdm_driver.h>
> -#include <xenomai/rtdm/core.h>
> -#include <xenomai/rtdm/device.h>
> -#include <xenomai/rtdm/syscall.h>
>  
> +#include "core.h"
> +#include "device.h"
>  
> +
>  unsigned int                fd_count = DEF_FILDES_COUNT;
>  module_param(fd_count, uint, 0400);
>  MODULE_PARM_DESC(fd_count, "Maximum number of file descriptors");
> Index: ksrc/skins/rtdm/syscall.c
> ===================================================================
> --- ksrc/skins/rtdm/syscall.c	(Revision 380)
> +++ ksrc/skins/rtdm/syscall.c	(Arbeitskopie)
> @@ -19,10 +19,11 @@
>  
>  #include <xenomai/nucleus/shadow.h>
>  #include <xenomai/rtdm/rtdm_driver.h>
> -#include <xenomai/rtdm/core.h>
>  #include <xenomai/rtdm/syscall.h>
>  
> +#include "core.h"
>  
> +
>  int __rtdm_muxid;
>  
>  
> 


-- 

Philippe.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Xenomai-core] Re: [PATCH] move RTDM headers
  2006-01-07 12:22 [Xenomai-core] [PATCH] move RTDM headers Jan Kiszka
  2006-01-07 13:41 ` [Xenomai-core] " Philippe Gerum
@ 2006-01-07 13:46 ` Philippe Gerum
  2006-01-07 17:07 ` Philippe Gerum
  2 siblings, 0 replies; 8+ messages in thread
From: Philippe Gerum @ 2006-01-07 13:46 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

Jan Kiszka wrote:

  Additionally, I compiled latest RTnet SVN against
> it without problems (x86, PPC is currently being fixed by Wolfgang).
> 

Btw, the moduleparams/ulong/uint issue in the 2.4 wrappers that showed 
up with RTNet has been fixed in Xenomai's trunk too. Normally.

-- 

Philippe.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Xenomai-core] Re: [PATCH] move RTDM headers
  2006-01-07 12:22 [Xenomai-core] [PATCH] move RTDM headers Jan Kiszka
  2006-01-07 13:41 ` [Xenomai-core] " Philippe Gerum
  2006-01-07 13:46 ` Philippe Gerum
@ 2006-01-07 17:07 ` Philippe Gerum
  2006-01-07 17:13   ` Jan Kiszka
  2 siblings, 1 reply; 8+ messages in thread
From: Philippe Gerum @ 2006-01-07 17:07 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

Jan Kiszka wrote:
> Hi Philippe,
> 
> this patches cleans up the include/rtdm folder by moving internal
> headers to ksrc/skins/rtdm, leaving only rtdm.h, rtdm_driver.h, the two
> profile headers, and syscall.h there. The latter is still only needed
> for building Xenomai itself, thus it will not be installed. Successfully
> built for 2.4 and 2.6. Additionally, I compiled latest RTnet SVN against
> it without problems (x86, PPC is currently being fixed by Wolfgang).
> 
> Please apply/move the involved headers and run bootstrap.
> 

This one broke the build here:

--
   CC      kernel/xenomai/skins/rtdm/core.o
kernel/xenomai/skins/rtdm/core.c:36:18: core.h: No such file or directory
kernel/xenomai/skins/rtdm/core.c:37:20: device.h: No such file or directory
--

Additionally, it's a really very bad idea to start including things like 
"core.h" removing the rtdm/ prefix, while other include files like 
nucleus/core.h exist. For the sake of readability, I'm going to revert 
this particular change at least.

> Jan
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: include/rtdm/device.h
> ===================================================================
> --- include/rtdm/device.h	(Revision 380)
> +++ include/rtdm/device.h	(Arbeitskopie)
> @@ -1,60 +0,0 @@
> -/*
> - * Copyright (C) 2005 Jan Kiszka <jan.kiszka@domain.hid>.
> - * Copyright (C) 2005 Joerg Langenberg <joerg.langenberg@domain.hid>.
> - *
> - * Xenomai is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * Xenomai is distributed in the hope that it will be useful, but
> - * WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> - * General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with Xenomai; if not, write to the Free Software Foundation,
> - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
> - */
> -
> -#ifndef _RTDM_DEVICE_H
> -#define _RTDM_DEVICE_H
> -
> -#include <xenomai/nucleus/pod.h>
> -#include <xenomai/rtdm/rtdm_driver.h>
> -#include <linux/sem.h>
> -
> -
> -#define DEF_DEVNAME_HASHTAB_SIZE    256 /* entries in name hash table */
> -#define DEF_PROTO_HASHTAB_SIZE      256 /* entries in protocol hash table */
> -
> -
> -extern struct semaphore nrt_dev_lock;
> -extern xnlock_t         rt_dev_lock;
> -
> -extern unsigned int     devname_hashtab_size;
> -extern unsigned int     protocol_hashtab_size;
> -
> -extern struct list_head *rtdm_named_devices;
> -extern struct list_head *rtdm_protocol_devices;
> -
> -
> -int rtdm_no_support(void);
> -
> -struct rtdm_device *get_named_device(const char *name);
> -struct rtdm_device *get_protocol_device(int protocol_family, int socket_type);
> -
> -static inline void rtdm_dereference_device(struct rtdm_device *device)
> -{
> -    atomic_dec(&device->reserved.refcount);
> -}
> -
> -int __init rtdm_dev_init(void);
> -
> -static inline void rtdm_dev_cleanup(void)
> -{
> -    kfree(rtdm_named_devices);
> -    kfree(rtdm_protocol_devices);
> -}
> -
> -#endif /* _RTDM_DEVICE_H */
> Index: include/rtdm/Makefile.am
> ===================================================================
> --- include/rtdm/Makefile.am	(Revision 380)
> +++ include/rtdm/Makefile.am	(Arbeitskopie)
> @@ -1,11 +1,10 @@
>  includedir = $(prefix)/include/rtdm
>  
> +noinst_HEADERS = \
> +	syscall.h
> +
>  include_HEADERS = \
> -	core.h \
> -	device.h \
> -	proc.h \
>  	rtdm.h \
>  	rtdm_driver.h \
>  	rtserial.h \
> -	syscall.h \
>  	rtbenchmark.h
> Index: include/rtdm/proc.h
> ===================================================================
> --- include/rtdm/proc.h	(Revision 380)
> +++ include/rtdm/proc.h	(Arbeitskopie)
> @@ -1,32 +0,0 @@
> -/*
> - * Copyright (C) 2005 Jan Kiszka <jan.kiszka@domain.hid>.
> - * Copyright (C) 2005 Joerg Langenberg <joerg.langenberg@domain.hid>.
> - *
> - * Xenomai is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * Xenomai is distributed in the hope that it will be useful, but
> - * WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> - * General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with Xenomai; if not, write to the Free Software Foundation,
> - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
> - */
> -
> -#ifndef _RTDM_PROC_H
> -#define _RTDM_PROC_H
> -
> -extern struct proc_dir_entry *rtdm_proc_root;
> -
> -
> -int rtdm_proc_register_device(struct rtdm_device* device);
> -
> -int __init rtdm_proc_init(void);
> -
> -void rtdm_proc_cleanup(void);
> -
> -#endif /* _RTDM_PROC_H */
> Index: include/rtdm/core.h
> ===================================================================
> --- include/rtdm/core.h	(Revision 380)
> +++ include/rtdm/core.h	(Arbeitskopie)
> @@ -1,52 +0,0 @@
> -/*
> - * Copyright (C) 2005 Jan Kiszka <jan.kiszka@domain.hid>.
> - * Copyright (C) 2005 Joerg Langenberg <joerg.langenberg@domain.hid>.
> - *
> - * Xenomai is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * Xenomai is distributed in the hope that it will be useful, but
> - * WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> - * General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with Xenomai; if not, write to the Free Software Foundation,
> - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
> - */
> -
> -#ifndef _RTDM_CORE_H
> -#define _RTDM_CORE_H
> -
> -#include <xenomai/nucleus/pod.h>
> -#include <xenomai/rtdm/rtdm_driver.h>
> -
> -
> -#define DEF_FILDES_COUNT    64  /* default number of file descriptors */
> -
> -
> -struct rtdm_fildes {
> -    struct rtdm_fildes                  *next;
> -    volatile struct rtdm_dev_context    *context;
> -};
> -
> -
> -#ifdef CONFIG_SMP
> -extern xnlock_t             rt_fildes_lock;
> -#endif /* CONFIG_SMP */
> -
> -extern unsigned int         fd_count;
> -extern struct rtdm_fildes   *fildes_table;
> -extern int                  open_fildes;
> -
> -
> -int __init rtdm_core_init(void);
> -
> -static inline void rtdm_core_cleanup(void)
> -{
> -    kfree(fildes_table);
> -}
> -
> -#endif /* _RTDM_CORE_H */
> Index: ksrc/skins/rtdm/device.c
> ===================================================================
> --- ksrc/skins/rtdm/device.c	(Revision 380)
> +++ ksrc/skins/rtdm/device.c	(Arbeitskopie)
> @@ -28,8 +28,8 @@
>  #include <linux/module.h>
>  #include <linux/delay.h>
>  
> -#include <xenomai/rtdm/device.h>
> -#include <xenomai/rtdm/proc.h>
> +#include "device.h"
> +#include "proc.h"
>  
>  
>  #define SET_DEFAULT_OP(device, operation)                               \
> Index: ksrc/skins/rtdm/proc.c
> ===================================================================
> --- ksrc/skins/rtdm/proc.c	(Revision 380)
> +++ ksrc/skins/rtdm/proc.c	(Arbeitskopie)
> @@ -22,10 +22,11 @@
>  #ifdef CONFIG_PROC_FS
>  
>  #include <linux/proc_fs.h>
> -#include <xenomai/rtdm/core.h>
> -#include <xenomai/rtdm/device.h>
>  
> +#include "core.h"
> +#include "device.h"
>  
> +
>  /* Derived from Erwin Rol's rtai_proc_fs.h.
>     Assumes that output fits into the provided buffer. */
>  
> Index: ksrc/skins/rtdm/module.c
> ===================================================================
> --- ksrc/skins/rtdm/module.c	(Revision 380)
> +++ ksrc/skins/rtdm/module.c	(Arbeitskopie)
> @@ -45,10 +45,12 @@
>  #include <xenomai/nucleus/core.h>
>  #include <xenomai/rtdm/syscall.h>
>  #endif /* __KERNEL__ */
> -#include <xenomai/rtdm/core.h>
> -#include <xenomai/rtdm/device.h>
> -#include <xenomai/rtdm/proc.h>
>  
> +#include "core.h"
> +#include "device.h"
> +#include "proc.h"
> +
> +
>  MODULE_DESCRIPTION("Real-Time Driver Model");
>  MODULE_AUTHOR("jan.kiszka@domain.hid");
>  MODULE_LICENSE("GPL");
> Index: ksrc/skins/rtdm/core.c
> ===================================================================
> --- ksrc/skins/rtdm/core.c	(Revision 380)
> +++ ksrc/skins/rtdm/core.c	(Arbeitskopie)
> @@ -30,12 +30,13 @@
>  
>  #include <xenomai/nucleus/pod.h>
>  #include <xenomai/nucleus/heap.h>
> +#include <xenomai/rtdm/syscall.h>
>  #include <xenomai/rtdm/rtdm_driver.h>
> -#include <xenomai/rtdm/core.h>
> -#include <xenomai/rtdm/device.h>
> -#include <xenomai/rtdm/syscall.h>
>  
> +#include "core.h"
> +#include "device.h"
>  
> +
>  unsigned int                fd_count = DEF_FILDES_COUNT;
>  module_param(fd_count, uint, 0400);
>  MODULE_PARM_DESC(fd_count, "Maximum number of file descriptors");
> Index: ksrc/skins/rtdm/syscall.c
> ===================================================================
> --- ksrc/skins/rtdm/syscall.c	(Revision 380)
> +++ ksrc/skins/rtdm/syscall.c	(Arbeitskopie)
> @@ -19,10 +19,11 @@
>  
>  #include <xenomai/nucleus/shadow.h>
>  #include <xenomai/rtdm/rtdm_driver.h>
> -#include <xenomai/rtdm/core.h>
>  #include <xenomai/rtdm/syscall.h>
>  
> +#include "core.h"
>  
> +
>  int __rtdm_muxid;
>  
>  
> 


-- 

Philippe.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Xenomai-core] Re: [PATCH] move RTDM headers
  2006-01-07 17:07 ` Philippe Gerum
@ 2006-01-07 17:13   ` Jan Kiszka
  2006-01-07 17:23     ` Philippe Gerum
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2006-01-07 17:13 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai-core

[-- Attachment #1: Type: text/plain, Size: 1419 bytes --]

Philippe Gerum wrote:
> Jan Kiszka wrote:
> 
>> Hi Philippe,
>>
>> this patches cleans up the include/rtdm folder by moving internal
>> headers to ksrc/skins/rtdm, leaving only rtdm.h, rtdm_driver.h, the two
>> profile headers, and syscall.h there. The latter is still only needed
>> for building Xenomai itself, thus it will not be installed. Successfully
>> built for 2.4 and 2.6. Additionally, I compiled latest RTnet SVN against
>> it without problems (x86, PPC is currently being fixed by Wolfgang).
>>
>> Please apply/move the involved headers and run bootstrap.
>>
> 
> This one broke the build here:
> 
> -- 
>   CC      kernel/xenomai/skins/rtdm/core.o
> kernel/xenomai/skins/rtdm/core.c:36:18: core.h: No such file or directory
> kernel/xenomai/skins/rtdm/core.c:37:20: device.h: No such file or directory
> -- 

Updated your repos? As you forgot to apply the moving, I also got
problems and applied my local versions of core.h, device.h, and proc.h,
also removing the three from their previous location.

> 
> Additionally, it's a really very bad idea to start including things like
> "core.h" removing the rtdm/ prefix, while other include files like
> nucleus/core.h exist. For the sake of readability, I'm going to revert
> this particular change at least.
> 

That's why I use #include "core.h", which -for me- clearly states: "Pick
the local one!" You will now have to tweak the Makefiles again...

Jan

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Xenomai-core] Re: [PATCH] move RTDM headers
  2006-01-07 17:13   ` Jan Kiszka
@ 2006-01-07 17:23     ` Philippe Gerum
  2006-01-07 17:54       ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Philippe Gerum @ 2006-01-07 17:23 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

Jan Kiszka wrote:
> Philippe Gerum wrote:
> 
>>Jan Kiszka wrote:
>>
>>
>>>Hi Philippe,
>>>
>>>this patches cleans up the include/rtdm folder by moving internal
>>>headers to ksrc/skins/rtdm, leaving only rtdm.h, rtdm_driver.h, the two
>>>profile headers, and syscall.h there. The latter is still only needed
>>>for building Xenomai itself, thus it will not be installed. Successfully
>>>built for 2.4 and 2.6. Additionally, I compiled latest RTnet SVN against
>>>it without problems (x86, PPC is currently being fixed by Wolfgang).
>>>
>>>Please apply/move the involved headers and run bootstrap.
>>>
>>
>>This one broke the build here:
>>
>>-- 
>>  CC      kernel/xenomai/skins/rtdm/core.o
>>kernel/xenomai/skins/rtdm/core.c:36:18: core.h: No such file or directory
>>kernel/xenomai/skins/rtdm/core.c:37:20: device.h: No such file or directory
>>-- 
> 
> 
> Updated your repos? As you forgot to apply the moving, I also got
> problems and applied my local versions of core.h, device.h, and proc.h,
> also removing the three from their previous location.
> 

The problem is that the patch does not recreate those files in 
ksrc/skin/rtdm, but only deletes them from include/rtdm.

> 
>>Additionally, it's a really very bad idea to start including things like
>>"core.h" removing the rtdm/ prefix, while other include files like
>>nucleus/core.h exist. For the sake of readability, I'm going to revert
>>this particular change at least.
>>
> 
> 
> That's why I use #include "core.h", which -for me- clearly states: "Pick
> the local one!"

Nope, it "states pick the first one you find outside of the system dirs 
depending on the order of the directories listed by -I in your 
Makefile", which is quite different, and leads to all sort of 
braindamage issues if you happen to screw up your CFLAGS in your Makefile.

  You will now have to tweak the Makefiles again...
> 

That's ok, I will do that. The prefix rule is enforced everywhere for 
internal headers so that nobody gets mad trying to find why the wrong 
one is included, and the best way not to depend on "-I" pecularities is 
to avoid playing with them in the first place. Additionally, this leaves 
no doubt about which header you wanted to include, regardless of the 
sanity of your Makefile.

> Jan


-- 

Philippe.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Xenomai-core] Re: [PATCH] move RTDM headers
  2006-01-07 17:23     ` Philippe Gerum
@ 2006-01-07 17:54       ` Jan Kiszka
  2006-01-07 18:15         ` Philippe Gerum
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2006-01-07 17:54 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai-core

[-- Attachment #1: Type: text/plain, Size: 2805 bytes --]

Philippe Gerum wrote:
> Jan Kiszka wrote:
> 
>> Philippe Gerum wrote:
>>
>>> Jan Kiszka wrote:
>>>
>>>
>>>> Hi Philippe,
>>>>
>>>> this patches cleans up the include/rtdm folder by moving internal
>>>> headers to ksrc/skins/rtdm, leaving only rtdm.h, rtdm_driver.h, the two
>>>> profile headers, and syscall.h there. The latter is still only needed
>>>> for building Xenomai itself, thus it will not be installed.
>>>> Successfully
>>>> built for 2.4 and 2.6. Additionally, I compiled latest RTnet SVN
>>>> against
>>>> it without problems (x86, PPC is currently being fixed by Wolfgang).
>>>>
>>>> Please apply/move the involved headers and run bootstrap.
>>>>
>>>
>>> This one broke the build here:
>>>
>>> -- 
>>>  CC      kernel/xenomai/skins/rtdm/core.o
>>> kernel/xenomai/skins/rtdm/core.c:36:18: core.h: No such file or
>>> directory
>>> kernel/xenomai/skins/rtdm/core.c:37:20: device.h: No such file or
>>> directory
>>> -- 
>>
>>
>>
>> Updated your repos? As you forgot to apply the moving, I also got
>> problems and applied my local versions of core.h, device.h, and proc.h,
>> also removing the three from their previous location.
>>
> 
> The problem is that the patch does not recreate those files in
> ksrc/skin/rtdm, but only deletes them from include/rtdm.
> 

Oops, indeed. I was sure "svn diff" will include locally added files in
the output, but it didn't -- ah, my svn version is too old! :)

>>
>>> Additionally, it's a really very bad idea to start including things like
>>> "core.h" removing the rtdm/ prefix, while other include files like
>>> nucleus/core.h exist. For the sake of readability, I'm going to revert
>>> this particular change at least.
>>>
>>
>>
>> That's why I use #include "core.h", which -for me- clearly states: "Pick
>> the local one!"
> 
> 
> Nope, it "states pick the first one you find outside of the system dirs
> depending on the order of the directories listed by -I in your
> Makefile", which is quite different, and leads to all sort of
> braindamage issues if you happen to screw up your CFLAGS in your Makefile.

#include "file.h" -> start searching for file.h in that place you found
the file containing this statement. Likely one can overwrite this
behaviour with some strange gcc flags.

> 
>  You will now have to tweak the Makefiles again...
> 
>>
> 
> That's ok, I will do that. The prefix rule is enforced everywhere for
> internal headers so that nobody gets mad trying to find why the wrong
> one is included, and the best way not to depend on "-I" pecularities is
> to avoid playing with them in the first place. Additionally, this leaves
> no doubt about which header you wanted to include, regardless of the
> sanity of your Makefile.

Ok, it's a matter of taste, and if you like to keep it this way for all
skins, I'm fine with it.

Jan

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Xenomai-core] Re: [PATCH] move RTDM headers
  2006-01-07 17:54       ` Jan Kiszka
@ 2006-01-07 18:15         ` Philippe Gerum
  0 siblings, 0 replies; 8+ messages in thread
From: Philippe Gerum @ 2006-01-07 18:15 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

Jan Kiszka wrote:
> Philippe Gerum wrote:
> 
>>Jan Kiszka wrote:
>>
>>
>>>Philippe Gerum wrote:
>>>
>>>
>>>>Jan Kiszka wrote:
>>>>
>>>>
>>>>
>>>>>Hi Philippe,
>>>>>
>>>>>this patches cleans up the include/rtdm folder by moving internal
>>>>>headers to ksrc/skins/rtdm, leaving only rtdm.h, rtdm_driver.h, the two
>>>>>profile headers, and syscall.h there. The latter is still only needed
>>>>>for building Xenomai itself, thus it will not be installed.
>>>>>Successfully
>>>>>built for 2.4 and 2.6. Additionally, I compiled latest RTnet SVN
>>>>>against
>>>>>it without problems (x86, PPC is currently being fixed by Wolfgang).
>>>>>
>>>>>Please apply/move the involved headers and run bootstrap.
>>>>>
>>>>
>>>>This one broke the build here:
>>>>
>>>>-- 
>>>> CC      kernel/xenomai/skins/rtdm/core.o
>>>>kernel/xenomai/skins/rtdm/core.c:36:18: core.h: No such file or
>>>>directory
>>>>kernel/xenomai/skins/rtdm/core.c:37:20: device.h: No such file or
>>>>directory
>>>>-- 
>>>
>>>
>>>
>>>Updated your repos? As you forgot to apply the moving, I also got
>>>problems and applied my local versions of core.h, device.h, and proc.h,
>>>also removing the three from their previous location.
>>>
>>
>>The problem is that the patch does not recreate those files in
>>ksrc/skin/rtdm, but only deletes them from include/rtdm.
>>
> 
> 
> Oops, indeed. I was sure "svn diff" will include locally added files in
> the output, but it didn't -- ah, my svn version is too old! :)
> 
> 
>>>>Additionally, it's a really very bad idea to start including things like
>>>>"core.h" removing the rtdm/ prefix, while other include files like
>>>>nucleus/core.h exist. For the sake of readability, I'm going to revert
>>>>this particular change at least.
>>>>
>>>
>>>
>>>That's why I use #include "core.h", which -for me- clearly states: "Pick
>>>the local one!"
>>
>>
>>Nope, it "states pick the first one you find outside of the system dirs
>>depending on the order of the directories listed by -I in your
>>Makefile", which is quite different, and leads to all sort of
>>braindamage issues if you happen to screw up your CFLAGS in your Makefile.
> 
> 
> #include "file.h" -> start searching for file.h in that place you found
> the file containing this statement. Likely one can overwrite this
> behaviour with some strange gcc flags.
>

-I- for instance, which bluntly cancels the above behaviour. One 
sometimes may have to make extensive use of it to work around funky 
include directory layouts some applications have; early versions of the 
simulator had even needed this to somewhat control which portion of the 
"include space" was picked.

> 
>> You will now have to tweak the Makefiles again...
>>
>>
>>That's ok, I will do that. The prefix rule is enforced everywhere for
>>internal headers so that nobody gets mad trying to find why the wrong
>>one is included, and the best way not to depend on "-I" pecularities is
>>to avoid playing with them in the first place. Additionally, this leaves
>>no doubt about which header you wanted to include, regardless of the
>>sanity of your Makefile.
> 
> 
> Ok, it's a matter of taste, and if you like to keep it this way for all
> skins, I'm fine with it.
> 
> Jan


-- 

Philippe.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-01-07 18:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-07 12:22 [Xenomai-core] [PATCH] move RTDM headers Jan Kiszka
2006-01-07 13:41 ` [Xenomai-core] " Philippe Gerum
2006-01-07 13:46 ` Philippe Gerum
2006-01-07 17:07 ` Philippe Gerum
2006-01-07 17:13   ` Jan Kiszka
2006-01-07 17:23     ` Philippe Gerum
2006-01-07 17:54       ` Jan Kiszka
2006-01-07 18:15         ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.