]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/qmss-lld.git/commitdiff
Updated InterruptTestMC with new RM Server socket interface DEV.QMSS_LLD.02.01.00.11
authorJustin Sobota <jsobota@ti.com>
Fri, 21 Aug 2015 15:41:13 +0000 (11:41 -0400)
committerJustin Sobota <jsobota@ti.com>
Fri, 21 Aug 2015 15:41:13 +0000 (11:41 -0400)
Signed-off-by: Justin Sobota <jsobota@ti.com>
example/InterruptTestMC/k2e/armv7/linux/fw_init.c
example/InterruptTestMC/k2h/armv7/linux/fw_init.c
example/InterruptTestMC/k2k/armv7/linux/fw_init.c
example/InterruptTestMC/k2l/armv7/linux/fw_init.c
example/InterruptTestMC/src/armv7/linux/sockrmmsg.h [deleted file]
example/InterruptTestMC/src/armv7/linux/sockutils.c
example/InterruptTestMC/src/armv7/linux/sockutils.h

index 596a9020b553bca4e1ef08916d98bd7e0c6f0d5a..1315adc4e8a17cbb1838cee6b84c6648c13c3413 100644 (file)
@@ -46,9 +46,9 @@
 
 /* Socket Includes */
 #include "sockutils.h"
-#include "sockrmmsg.h"
 
 /* RM Includes */
+#include <ti/drv/rm/rm_server_if.h>
 #include <ti/drv/rm/rm.h>
 #include <ti/drv/rm/rm_transport.h>
 #include <ti/drv/rm/rm_services.h>
index 2f02df77e2b1c0e10f85ec47a0d44120facea8d2..e350c5901610e4240fc7b7490b74da879b65f96c 100644 (file)
@@ -46,9 +46,9 @@
 
 /* Socket Includes */
 #include "sockutils.h"
-#include "sockrmmsg.h"
 
 /* RM Includes */
+#include <ti/drv/rm/rm_server_if.h>
 #include <ti/drv/rm/rm.h>
 #include <ti/drv/rm/rm_transport.h>
 #include <ti/drv/rm/rm_services.h>
index c94a0e085285ac1233c6712529c48ab0b466cf25..042b81989179e1b666bac96852c4546b1238cdcd 100644 (file)
@@ -46,9 +46,9 @@
 
 /* Socket Includes */
 #include "sockutils.h"
-#include "sockrmmsg.h"
 
 /* RM Includes */
+#include <ti/drv/rm/rm_server_if.h>
 #include <ti/drv/rm/rm.h>
 #include <ti/drv/rm/rm_transport.h>
 #include <ti/drv/rm/rm_services.h>
index 8077530fee4158b3bd7bc1ad6ae9fa4bcb90e342..6a8cd80cae33500bb99b15d0f55b19503c339acf 100644 (file)
@@ -46,9 +46,9 @@
 
 /* Socket Includes */
 #include "sockutils.h"
-#include "sockrmmsg.h"
 
 /* RM Includes */
+#include <ti/drv/rm/rm_server_if.h>
 #include <ti/drv/rm/rm.h>
 #include <ti/drv/rm/rm_transport.h>
 #include <ti/drv/rm/rm_services.h>
diff --git a/example/InterruptTestMC/src/armv7/linux/sockrmmsg.h b/example/InterruptTestMC/src/armv7/linux/sockrmmsg.h
deleted file mode 100644 (file)
index c0b14c3..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
- *
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *    Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- *    Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the
- *    distribution.
- *
- *    Neither the name of Texas Instruments Incorporated nor the names of
- *    its contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef __SOCKRMMSG_H__
-#define __SOCKRMMSG_H__
-
-#include <stdint.h>
-
-#define RM_SERVER_SOCKET_NAME "/tmp/var/run/rm/rm_server"
-
-#define msg_alloc(p) \
-    do { \
-        p = calloc(1, sizeof(*p)); \
-        if (p) { \
-            p->length = sizeof(*p); \
-        } \
-    } while (0)
-
-#define msg_length(x) ((x) ? (sizeof(*x) + x->length) : 0)
-#define msg_data(x) ((x->length) ? ((char *)x + sizeof(*x)) : NULL)
-
-#endif /* __SOCKRMMSG_H__ */
index 306f7ea6330cea263aed7f3164f48aa53afa20ec..13933b8e7010b845fe54155a0925908f0b9eee5e 100644 (file)
@@ -131,7 +131,7 @@ int sock_close (sock_h handle)
         close (sd->fd);
     free (sd);
 
-    return 0;
+    return 0;    
 }
 
 int sock_send (sock_h handle, const char *data, int length,
@@ -171,6 +171,10 @@ int sock_send (sock_h handle, const char *data, int length,
 
     }
 
+    if (!sd) {
+        close(fd);
+    }
+
     return 0;
 }
 
@@ -235,7 +239,7 @@ int sock_recv (sock_h handle, char *data, int length, sock_name_t *from)
     }
 
     if (from) {
-        if((from->type = sock_addr_e) && (from->s.addr))
+        if((from->type == sock_addr_e) && (from->s.addr))
             from_length = sizeof(struct sockaddr_un);
         else {
             error_msg("invalid from parameter");
@@ -251,5 +255,6 @@ int sock_recv (sock_h handle, char *data, int length, sock_name_t *from)
     }
 
     return size;
-
+    
 }
+
index 554ba35c9231ff4dd15e2387faa1b6e4cc0cecc1..ef2d5499f9467c1bc8f0c0046aec81a94a5639c5 100644 (file)
@@ -58,6 +58,8 @@ typedef struct {
 
 #define sock_h void *
 
+int check_and_create_path (char *path);
+
 sock_h sock_open (sock_name_t *sock_name);
 
 int sock_close (sock_h handle);