[rtems commit] network: Special case for RTEMS_MULTIPROCESSING

Sebastian Huber sebh at rtems.org
Tue Mar 29 11:44:21 UTC 2016


Module:    rtems
Branch:    master
Commit:    3bbf40550c67626a7a2cb0e4a624b0bf1214a4a9
Changeset: http://git.rtems.org/rtems/commit/?id=3bbf40550c67626a7a2cb0e4a624b0bf1214a4a9

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Mar 24 15:35:18 2016 +0100

network: Special case for RTEMS_MULTIPROCESSING

Allow network tasks to run with priority 0 (PRIORITY_PSEUDO_ISR).

---

 cpukit/libnetworking/rtems/rtems_glue.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/cpukit/libnetworking/rtems/rtems_glue.c b/cpukit/libnetworking/rtems/rtems_glue.c
index 1355fbb..5a43a72 100644
--- a/cpukit/libnetworking/rtems/rtems_glue.c
+++ b/cpukit/libnetworking/rtems/rtems_glue.c
@@ -284,7 +284,16 @@ rtems_bsdnet_initialize (void)
 	 */
 	if (rtems_bsdnet_config.network_task_priority == 0)
 		networkDaemonPriority = 100;
+#ifdef RTEMS_MULTIPROCESSING
+	/*
+	 * Allow network tasks to run with priority 0 (PRIORITY_PSEUDO_ISR) using
+	 * UINT32_MAX for the network task priority in the network configuration.
+	 * This enables MPCI via a TCP/IP network.
+	 */
+	else if (rtems_bsdnet_config.network_task_priority != UINT32_MAX)
+#else
 	else
+#endif
 		networkDaemonPriority = rtems_bsdnet_config.network_task_priority;
 
 	/*
@@ -694,6 +703,9 @@ rtems_bsdnet_newproc (char *name, int stacksize, void(*entry)(void *), void *arg
 		networkDaemonPriority,
 		stacksize,
 		RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
+#ifdef RTEMS_MULTIPROCESSING
+		RTEMS_SYSTEM_TASK |
+#endif
 		RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
 		&tid);
 	if (sc != RTEMS_SUCCESSFUL)



More information about the vc mailing list