[libbsdport commit] Avoid rtems_bsdnet_event_receive()
Sebastian Huber
sebh at rtems.org
Wed Feb 13 08:42:31 UTC 2013
Module: libbsdport
Branch: master
Commit: 28a6f92d32b4a286f0c726ea9030a23a4852fe33
Changeset: http://git.rtems.org/libbsdport/commit/?id=28a6f92d32b4a286f0c726ea9030a23a4852fe33
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Feb 13 09:46:25 2013 +0100
Avoid rtems_bsdnet_event_receive()
RTEMS 4.11 will use system events inside the network stack. Use normal
events for CALLOUT(9) and TASKQUEUE(9) implementations.
---
bsd_eth_drivers/libbsdport/rtems_callout.c | 4 +++-
bsd_eth_drivers/libbsdport/rtems_taskqueue.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/bsd_eth_drivers/libbsdport/rtems_callout.c b/bsd_eth_drivers/libbsdport/rtems_callout.c
index c041c5b..332c9e0 100644
--- a/bsd_eth_drivers/libbsdport/rtems_callout.c
+++ b/bsd_eth_drivers/libbsdport/rtems_callout.c
@@ -158,7 +158,9 @@ rtems_id me;
rtems_timer_fire_after(ticker, 1, calloutTick, (void*)me);
while ( 1 ) {
- sc = rtems_bsdnet_event_receive (CALLOUT_EVENT | KILL_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &ev);
+ rtems_bsdnet_semaphore_release ();
+ sc = rtems_event_receive (CALLOUT_EVENT | KILL_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &ev);
+ rtems_bsdnet_semaphore_obtain ();
if ( RTEMS_SUCCESSFUL != sc ) {
rtems_error(sc, "calloutTask: unable to receive event; terminating\n");
break;
diff --git a/bsd_eth_drivers/libbsdport/rtems_taskqueue.c b/bsd_eth_drivers/libbsdport/rtems_taskqueue.c
index 97153ca..c5e2256 100644
--- a/bsd_eth_drivers/libbsdport/rtems_taskqueue.c
+++ b/bsd_eth_drivers/libbsdport/rtems_taskqueue.c
@@ -223,7 +223,9 @@ struct taskqueue *tq = arg;
rtems_event_set evs;
rtems_status_code sc;
while ( 1 ) {
- sc = rtems_bsdnet_event_receive(TQ_WAKE_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &evs);
+ rtems_bsdnet_semaphore_release();
+ sc = rtems_event_receive(TQ_WAKE_EVENT, RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &evs);
+ rtems_bsdnet_semaphore_obtain();
if ( RTEMS_SUCCESSFUL != sc ) {
rtems_error(sc,"rtems_taskqueue: taskqueueDoWork() unable to receive wakup event\n");
rtems_panic("Can't proceed\n");
More information about the vc
mailing list