Rename ipc-trace paths to /dev/ipc-trace/<core name> in QNX
authorvwan@ti.com <vwan@ti.com>
Sat, 20 Dec 2014 00:24:05 +0000 (16:24 -0800)
committerRobert Tivy <rtivy@ti.com>
Tue, 6 Jan 2015 00:31:01 +0000 (16:31 -0800)
Renaming the trace paths to match the convention adopted by /dev/ipc-file
and /dev/ipc-state, so that MultiProc id is not required to be known ahead
of time.

Note that this introduces a break in compatibility for anyone who's been
relying on the path name /dev/ipc-trace#.

This addresses SDOCM00113638.

Signed-off-by: VW <vwan@ti.com>
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/syslink_main.c
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/traceDaemon/IpcTraceDaemon.c
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/traceDaemon/common.mk

index 9cf49fa5f888ae31d40bc31ee10f971b3e05f452..f182884042473a517bad7e1440a2421852eeb104 100644 (file)
@@ -991,8 +991,9 @@ int init_syslink_trace_device(syslink_dev_t *dev)
             trace_attr->attr.mount = &dev->syslink.mattr;
             trace_attr->procid = i;
             iofunc_time_update(&trace_attr->attr);
-            snprintf (dev->syslink.device_name, _POSIX_PATH_MAX,
-                  "/dev/ipc-trace%d", syslink_firmware[i].proc_id);
+            snprintf(dev->syslink.device_name, _POSIX_PATH_MAX,
+                "%s-trace/%s", IPC_DEVICE_PATH,
+                MultiProc_getName(syslink_firmware[i].proc_id));
             dev->syslink.iofuncs_trace[i].read = syslink_read;
             snprintf (trace_name, _POSIX_PATH_MAX, "%d", 0);
             pa = 0;
index 3bb9f248091f76889a39f50f68d3b85b9d8b10e5..a9353ebcd3ed44b53f16e3e4d228bc5bf5330b6c 100644 (file)
@@ -91,7 +91,7 @@ void printTraces (void *arg)
     fprintf (log, "\nSpawning procId %d trace thread\n ", index);
 
     /* Initialize read indexes to zero */
-    snprintf (path, _POSIX_PATH_MAX, "/dev/ipc-trace%d", index);
+    snprintf (path, _POSIX_PATH_MAX, "/dev/ipc-trace/%s", MultiProc_getName(index));
     fd = open(path, O_RDONLY);
     if (fd < 0) {
         perror("Unable to open ipc-trace");
@@ -199,8 +199,8 @@ int main (int argc, char * argv [])
     }
 
     sem_init(&semPrint, 0, 1);
-    for (i = 0; i < MultiProc_MAXPROCESSORS; i++) {
-        snprintf (names[i], _POSIX_PATH_MAX, "/dev/ipc-trace%d", i);
+    for (i = 0; i < MultiProc_getNumProcessors(); i++) {
+        snprintf (names[i], _POSIX_PATH_MAX, "/dev/ipc-trace/%s", MultiProc_getName(i));
         if (-1 != stat(names[i], &sbuf)) {
             pthread_create (&threads[i], NULL, (void *)&printTraces, (void *)i);
         }
index bef01259601389a30d13f9c8475c29696f75a4f9..32e1ae3db105da885898f987f2f85fa41fdd6df3 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright (c) 2013, Texas Instruments Incorporated
+#   Copyright (c) 2014, Texas Instruments Incorporated
 #
 #   Redistribution and use in source and binary forms, with or without
 #   modification, are permitted provided that the following conditions
@@ -44,11 +44,18 @@ INSTALLDIR = bin
 SYSLINK_ROOT = $(PROJECT_ROOT)/../../../../..
 
 EXTRA_INCVPATH = $(SYSLINK_ROOT)       \
-                 $(SYSLINK_ROOT)/ti/syslink/inc
+                 $(SYSLINK_ROOT)/ti/syslink/inc \
+                 $(IPC_REPO)/qnx/include
 
 CCOPTS+=-g
 CCOPTS+= -O0
 
 LDFLAGS += -M
 
+EXTRA_SRCVPATH += $(SYSLINK_ROOT)/ti/syslink/family/$(SYSLINK_PLATFORM)
+SRCS += SystemCfg_$(SYSLINK_PLATFORM).c IpcTraceDaemon.c
+
+EXTRA_LIBVPATH += $(IPC_REPO)/qnx/src/utils/arm/a.g.le.v7
+LIBS += utils_g
+
 include $(MKFILES_ROOT)/qtargets.mk