[rtems commit] libnetworking: Simplify sbwait()

Sebastian Huber sebh at rtems.org
Thu Jan 15 10:32:46 UTC 2015


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Jan 15 11:30:13 2015 +0100

libnetworking: Simplify sbwait()

---

 cpukit/libnetworking/rtems/rtems_glue.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/cpukit/libnetworking/rtems/rtems_glue.c b/cpukit/libnetworking/rtems/rtems_glue.c
index 897b868..4c90a98 100644
--- a/cpukit/libnetworking/rtems/rtems_glue.c
+++ b/cpukit/libnetworking/rtems/rtems_glue.c
@@ -461,19 +461,9 @@ sbwait(struct sockbuf *sb)
 	sb->sb_flags |= SB_WAIT;
 
 	/*
-	 * Release the network semaphore.
-	 */
-	rtems_bsdnet_semaphore_release ();
-
-	/*
 	 * Wait for the wakeup event.
 	 */
-	sc = rtems_event_system_receive (SBWAIT_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, sb->sb_timeo, &events);
-
-	/*
-	 * Reobtain the network semaphore.
-	 */
-	rtems_bsdnet_semaphore_obtain ();
+	sc = rtems_bsdnet_event_receive (SBWAIT_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, sb->sb_timeo, &events);
 
 	/*
 	 * Return the status of the wait.




More information about the vc mailing list