libnetworking: Simplify sbwait()

This commit is contained in:
Sebastian Huber
2015-01-15 11:30:13 +01:00
parent f1c044dc29
commit ac6e8c404f
+1 -11
View File
@@ -460,20 +460,10 @@ 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.