Module: xenomai-jki
Branch: for-upstream
Commit: d3fc7dcfbcafd41d9b440a857e76242fd548903d
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=d3fc7dcfbcafd41d9b440a857e76242fd548903d

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Fri Apr  2 01:24:46 2010 +0200

RTIPC: Drop support for RT socket creation/deletion

This is deprecated now, RT callers will automatically be migrated to
NRT to perform the requests. Moreover, dropping it allows us to allocate
resources from Linux instead of using the precious system heap.

CC: Philippe Gerum <r...@xenomai.org>
Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 ksrc/drivers/ipc/rtipc.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/ksrc/drivers/ipc/rtipc.c b/ksrc/drivers/ipc/rtipc.c
index 563cc4e..71629cb 100644
--- a/ksrc/drivers/ipc/rtipc.c
+++ b/ksrc/drivers/ipc/rtipc.c
@@ -158,13 +158,13 @@ static int rtipc_socket(struct rtdm_dev_context *context,
 
        p = rtdm_context_to_private(context);
        p->proto = proto;
-       p->state = xnmalloc(proto->proto_statesz);
+       p->state = kmalloc(proto->proto_statesz, GFP_KERNEL);
        if (p->state == NULL)
                return -ENOMEM;
 
        ret = proto->proto_ops.socket(p, user_info);
        if (ret)
-               xnfree(p->state);
+               kfree(p->state);
 
        return ret;
 }
@@ -180,7 +180,7 @@ static int rtipc_close(struct rtdm_dev_context *context,
        if (ret)
                return ret;
 
-       xnfree(p->state);
+       kfree(p->state);
 
        return 0;
 }
@@ -232,10 +232,8 @@ static struct rtdm_device device = {
        .device_name    =       "rtipc",
        .protocol_family=       PF_RTIPC,
        .socket_type    =       SOCK_DGRAM,
-       .socket_rt      =       rtipc_socket,
        .socket_nrt     =       rtipc_socket,
        .ops = {
-               .close_rt       =       NULL,
                .close_nrt      =       rtipc_close,
                .recvmsg_rt     =       rtipc_recvmsg,
                .recvmsg_nrt    =       NULL,


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

Reply via email to