Skip to contentSkip to conversation

xnpipe: what's up with xnpipe_setup?

Xenomai-core Jan Kiszka 2 participants 5 messages Oct 13, 2008 – Oct 14, 2008

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

Hi,

xnpipe_setup and the callbacks it sets is dead code for in-tree Xenomai users. Going back to, well, fusion-0.6.9 (the oldest version we have in LXR), it used to be dead meat already at that time. Can we remove it?

Jan

author
#1 lore raw
Quoted 5 lines · Jan Kiszka

Hi,

xnpipe_setup and the callbacks it sets is dead code for in-tree Xenomai users. Going back to, well, fusion-0.6.9 (the oldest version we have in LXR), it used to be dead meat already at that time. Can we remove it?

In case we can:

---
 include/nucleus/pipe.h |    5 -----
 ksrc/nucleus/pipe.c    |   43 ++++---------------------------------------
 2 files changed, 4 insertions(+), 44 deletions(-)
include/nucleus/pipe.h +0 -5
Index: b/include/nucleus/pipe.h
===================================================================
@@ -76,8 +76,6 @@ static inline xnpipe_mh_t *link2mh(xnhol
 typedef int xnpipe_io_handler (int minor,
 			       struct xnpipe_mh *mh, int retval, void *cookie);
 
-typedef int xnpipe_session_handler (int minor, void *cookie);
-
 typedef void *xnpipe_alloc_handler (int minor, size_t size, void *cookie);
 
 typedef struct xnpipe_state {
@@ -118,9 +116,6 @@ void xnpipe_umount(void);
 
 /* Entry points of the kernel interface. */
 
-void xnpipe_setup(xnpipe_session_handler *open_handler,
-		  xnpipe_session_handler *close_handler);
-
 int xnpipe_connect(int minor,
 		   xnpipe_io_handler *output_handler,
 		   xnpipe_io_handler *input_handler,
ksrc/nucleus/pipe.c +4 -39

76 lines not on this page · raw message

author
#2 lore raw
Quoted 8 lines · Jan Kiszka
Quoted 5 lines · Jan Kiszka

Hi,

xnpipe_setup and the callbacks it sets is dead code for in-tree Xenomai users. Going back to, well, fusion-0.6.9 (the oldest version we have in LXR), it used to be dead meat already at that time. Can we remove it?

In case we can:

Sorry, a better one:

---
 include/nucleus/pipe.h |    5 -----
 ksrc/nucleus/pipe.c    |   47 ++++-------------------------------------------
 2 files changed, 4 insertions(+), 48 deletions(-)
include/nucleus/pipe.h +0 -5
Index: b/include/nucleus/pipe.h
===================================================================
@@ -76,8 +76,6 @@ static inline xnpipe_mh_t *link2mh(xnhol
 typedef int xnpipe_io_handler (int minor,
 			       struct xnpipe_mh *mh, int retval, void *cookie);
 
-typedef int xnpipe_session_handler (int minor, void *cookie);
-
 typedef void *xnpipe_alloc_handler (int minor, size_t size, void *cookie);
 
 typedef struct xnpipe_state {
@@ -118,9 +116,6 @@ void xnpipe_umount(void);
 
 /* Entry points of the kernel interface. */
 
-void xnpipe_setup(xnpipe_session_handler *open_handler,
-		  xnpipe_session_handler *close_handler);
-
 int xnpipe_connect(int minor,
 		   xnpipe_io_handler *output_handler,
 		   xnpipe_io_handler *input_handler,
ksrc/nucleus/pipe.c +4 -43

90 lines not on this page · raw message

#3 lore raw
In reply to Jan Kiszka
Quoted 6 lines · Jan Kiszka

Hi,

xnpipe_setup and the callbacks it sets is dead code for in-tree Xenomai users. Going back to, well, fusion-0.6.9 (the oldest version we have in LXR), it used to be dead meat already at that time. Can we remove it?

We can and should emulate the close handler using the input one, so we may get rid of the former.

We need some way to fire a callback in a skin implementation when userland connects, this is what the open handler was for; this may be required for implementing more complex data channels over the generic message pipe code. Ok, we could also divert the input handler for that purpose as well, and it makes little sense to keep a full interface just for that case.

Go ahead, remove that code, but if a skin developer ever comes and complains about the terminal ugliness of our input handler looking like a kitchen sink in a near future, I will ruthlessly direct him to YOU. Ah! Fair enough?

Quoted 10 lines

Jan

------------------------------------------------------------------------

_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core

Signature · 1 line
Philippe.
author
#4 lore raw
Quoted 17 lines · Philippe Gerum
Quoted 6 lines · Jan Kiszka

Hi,

xnpipe_setup and the callbacks it sets is dead code for in-tree Xenomai users. Going back to, well, fusion-0.6.9 (the oldest version we have in LXR), it used to be dead meat already at that time. Can we remove it?

We can and should emulate the close handler using the input one, so we may get rid of the former.

We need some way to fire a callback in a skin implementation when userland connects, this is what the open handler was for; this may be required for implementing more complex data channels over the generic message pipe code. Ok, we could also divert the input handler for that purpose as well, and it makes little sense to keep a full interface just for that case.

Quoted 3 lines

Go ahead, remove that code, but if a skin developer ever comes and complains about the terminal ugliness of our input handler looking like a kitchen sink in a near future, I will ruthlessly direct him to YOU. Ah! Fair enough?

Yeah, just blame the street cleaner...

Jan