Module: xenomai-head
Branch: master
Commit: c065b6879a84a1820b1abb781d401a66e139d89f
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=c065b6879a84a1820b1abb781d401a66e139d89f

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Sep  7 16:55:59 2009 +0200

rtipc: introduce proto_exit()

---

 ksrc/drivers/ipc/internal.h |    1 +
 ksrc/drivers/ipc/rtipc.c    |    7 +++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/ksrc/drivers/ipc/internal.h b/ksrc/drivers/ipc/internal.h
index 86833d1..5099ff5 100644
--- a/ksrc/drivers/ipc/internal.h
+++ b/ksrc/drivers/ipc/internal.h
@@ -35,6 +35,7 @@ struct rtipc_protocol {
        const char *proto_name;
        int proto_statesz;
        int (*proto_init)(void);
+       void (*proto_exit)(void);
        struct {
                int (*socket)(struct rtipc_private *priv,
                              rtdm_user_info_t *user_info);
diff --git a/ksrc/drivers/ipc/rtipc.c b/ksrc/drivers/ipc/rtipc.c
index f0ecac7..f50c583 100644
--- a/ksrc/drivers/ipc/rtipc.c
+++ b/ksrc/drivers/ipc/rtipc.c
@@ -188,7 +188,14 @@ int __init __rtipc_init(void)
 
 void __rtipc_exit(void)
 {
+       int n;
+
        rtdm_dev_unregister(&device, 1000);
+
+       for (n = 0; n < IPCPROTO_MAX; n++) {
+               if (protocols[n] && protocols[n]->proto_exit)
+                       protocols[n]->proto_exit();
+       }
 }
 
 module_init(__rtipc_init);


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to