[Xenomai-core] Re: [PATCH] move RTDM headers

2006-01-07 Thread Philippe Gerum

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 [EMAIL PROTECTED].
- * Copyright (C) 2005 Joerg Langenberg [EMAIL PROTECTED].
- *
- * 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_SIZE256 /* 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 [EMAIL PROTECTED].
- * Copyright (C) 2005 Joerg Langenberg [EMAIL PROTECTED].
- *
- * 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 [EMAIL PROTECTED].
- * Copyright (C) 2005 Joerg Langenberg [EMAIL PROTECTED].
- *
- * 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 

[Xenomai-core] Re: [PATCH] move RTDM headers

2006-01-07 Thread Philippe Gerum

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.

___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


[Xenomai-core] Re: [PATCH] move RTDM headers

2006-01-07 Thread Philippe Gerum

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 [EMAIL PROTECTED].
- * Copyright (C) 2005 Joerg Langenberg [EMAIL PROTECTED].
- *
- * 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_SIZE256 /* 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 [EMAIL PROTECTED].
- * Copyright (C) 2005 Joerg Langenberg [EMAIL PROTECTED].
- *
- * 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

[Xenomai-core] Re: [PATCH] move RTDM headers

2006-01-07 Thread Philippe Gerum

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.

___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


[Xenomai-core] Re: [PATCH] move RTDM headers

2006-01-07 Thread Philippe Gerum

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.

___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


[Xenomai-core] Re: [PATCH] move RTDM headers

2006-01-07 Thread Philippe Gerum

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 [EMAIL PROTECTED].
- * Copyright (C) 2005 Joerg Langenberg [EMAIL PROTECTED].
- *
- * 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_SIZE256 /* 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 [EMAIL PROTECTED].
- * Copyright (C) 2005 Joerg Langenberg [EMAIL PROTECTED].
- *
- * 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 [EMAIL PROTECTED].
- * Copyright (C) 2005 Joerg Langenberg [EMAIL PROTECTED].
- *
- * 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 

[Xenomai-core] Re: [PATCH] move RTDM headers

2006-01-07 Thread Philippe Gerum

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 [EMAIL PROTECTED].
- * Copyright (C) 2005 Joerg Langenberg [EMAIL PROTECTED].
- *
- * 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_SIZE256 /* 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 [EMAIL PROTECTED].
- * Copyright (C) 2005 Joerg Langenberg [EMAIL PROTECTED].
- *
- * 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

[Xenomai-core] Re: [PATCH] move RTDM headers

2006-01-07 Thread Jan Kiszka
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


signature.asc
Description: OpenPGP digital signature


[Xenomai-core] Re: [PATCH] move RTDM headers

2006-01-07 Thread Philippe Gerum

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.



[Xenomai-core] Re: [PATCH] move RTDM headers

2006-01-07 Thread Philippe Gerum

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.