diff --git a/qnx/src/api/Ipc.c b/qnx/src/api/Ipc.c
index 61989b8af794a3815b4715a5d85221434b7cf825..763a17b3919b42cfb429bd487aede5419ca9dd4a 100644 (file)
--- a/qnx/src/api/Ipc.c
+++ b/qnx/src/api/Ipc.c
#include <_GateMP.h>
#include <_GateMP_usr.h>
#include <_TiIpcFxns.h>
+#include <_IpcLog.h>
#include <ti/syslink/inc/_GateHWSpinlock.h>
#include <ti/syslink/inc/_MultiProc.h>
MultiProc_Config _MultiProc_cfg;
+/* traces in this file are controlled via _Ipc_verbose */
+Bool _Ipc_verbose = FALSE;
+#define verbose _Ipc_verbose
static void cleanup(int arg);
/* turn on tracing */
if (getenv("IPC_DEBUG")[0] == '1') {
/* level 1 enables typical user API tracing */
+ _Ipc_verbose = TRUE;
_MessageQ_verbose = TRUE;
_MultiProc_verbose = TRUE;
_NameServer_verbose = TRUE;
else if ((getenv("IPC_DEBUG")[0] == '2') ||
(getenv("IPC_DEBUG")[0] == '3')) {
/* levels 2 and 3 add TiIpcFxns tracing */
+ _Ipc_verbose = TRUE;
_MessageQ_verbose = TRUE;
_MultiProc_verbose = TRUE;
_NameServer_verbose = TRUE;
goto messageqattach_fail;
}
}
+
+ /*
+ * Check if MultiProc config is valid and that
+ * MultiProc_getNumProcessors() is non-zero to make sure we are not
+ * in the middle of a recovery.
+ */
+ if (rprocId == 0) {
+ PRINTVERBOSE0("Ipc_start: MultiProc not yet configured\n")
+ status = Ipc_E_FAIL;
+ goto messageqattach_fail;
+ }
}
else {
printf("Ipc_start: NameServer_setup() failed: %d\n", status);