summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d6d5b0d)
raw | patch | inline | side by side (parent: d6d5b0d)
author | vwan@ti.com <vwan@ti.com> | |
Thu, 14 May 2015 18:56:13 +0000 (11:56 -0700) | ||
committer | Robert Tivy <rtivy@ti.com> | |
Mon, 18 May 2015 20:41:06 +0000 (13:41 -0700) |
This commit decreases the default polling interval for the default gate during
GateMP_setup to 10 ms. This is so that slave executables that may take a bit
longer to boot up and create the default gate do not cause the IPC driver to
wait for a full second before retrying the poll, reducing the driver
startup time in such cases.
Signed-off-by: VW <vwan@ti.com>
GateMP_setup to 10 ms. This is so that slave executables that may take a bit
longer to boot up and create the default gate do not cause the IPC driver to
wait for a full second before retrying the poll, reducing the driver
startup time in such cases.
Signed-off-by: VW <vwan@ti.com>
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/GateMP_daemon.c | patch | blob | history |
diff --git a/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/GateMP_daemon.c b/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/GateMP_daemon.c
index 15e588a02ec51b5f06dc60ff4d7de8abaa0f9967..9cc7c1616bb30aa2f36e447cd70931c81b07c4a7 100644 (file)
/*
- * Copyright (c) 2013-2014, Texas Instruments Incorporated
+ * Copyright (c) 2013-2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
extern "C" {
#endif
-/* Timeout of GateMP_setup in seconds */
-#define SETUP_TIMEOUT 2
+/* How often to poll for default gate during setup (in microseconds) */
+#define POLL_INTERVAL 10000
+
+/*
+ * Number of times to repeatedly poll for default gate in GateMP_setup before
+ * timing out.
+ * The default adds up to a total of roughly 2 seconds, which means the slave
+ * core that owns SR0 must have setup GateMP within that time. Otherwise the
+ * driver will simply move on without setting up GateMP.
+ */
+#define SETUP_TIMEOUT 200
#define NUM_INFO_FIELDS 6 /* Number of fields in info entry */
/* The default gate creator is the owner of SR0 */
while (((status = GateMP_openDefaultGate(&GateMP_module->defaultGate,
&procId)) == GateMP_E_NOTFOUND) && (timeout > 0)) {
- sleep(1);
+ usleep(POLL_INTERVAL);
timeout--;
}