summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-23 11:40:18 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-25 12:43:54 +0200
commit631b3c8967a329cdd53e54365e4e4c0aa93a4251 (patch)
tree3a750b145a90c90aa86222c26ee68aeb8c87a417 /cpukit/libnetworking
parentscore: Get rid of mp_id parameter (diff)
downloadrtems-631b3c8967a329cdd53e54365e4e4c0aa93a4251.tar.bz2
score: Move thread queue MP callout to context
Drop the multiprocessing (MP) dependent callout parameter from the thread queue extract, dequeue, flush and unblock methods. Merge this parameter with the lock context into new structure Thread_queue_Context. This helps to gets rid of the conditionally compiled method call helpers.
Diffstat (limited to 'cpukit/libnetworking')
-rw-r--r--cpukit/libnetworking/rtems/rtems_glue.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/cpukit/libnetworking/rtems/rtems_glue.c b/cpukit/libnetworking/rtems/rtems_glue.c
index 9ece2b10d4..edf551e165 100644
--- a/cpukit/libnetworking/rtems/rtems_glue.c
+++ b/cpukit/libnetworking/rtems/rtems_glue.c
@@ -371,18 +371,19 @@ void
rtems_bsdnet_semaphore_obtain (void)
{
#ifdef RTEMS_FAST_MUTEX
- ISR_lock_Context lock_context;
+ Thread_queue_Context queue_context;
Thread_Control *executing;
- _ISR_lock_ISR_disable(&lock_context);
if (!the_networkSemaphore)
rtems_panic ("rtems-net: network sema obtain: network not initialised\n");
+ _Thread_queue_Context_initialize(&queue_context, NULL);
+ _ISR_lock_ISR_disable(&queue_context.Lock_context);
executing = _Thread_Executing;
_CORE_mutex_Seize (
&the_networkSemaphore->Core_control.mutex,
executing,
1, /* wait */
0, /* forever */
- &lock_context
+ &queue_context
);
if (executing->Wait.return_code)
rtems_panic ("rtems-net: can't obtain network sema: %d\n",
@@ -404,16 +405,16 @@ void
rtems_bsdnet_semaphore_release (void)
{
#ifdef RTEMS_FAST_MUTEX
- ISR_lock_Context lock_context;
+ Thread_queue_Context queue_context;
CORE_mutex_Status status;
if (!the_networkSemaphore)
rtems_panic ("rtems-net: network sema obtain: network not initialised\n");
- _ISR_lock_ISR_disable(&lock_context);
+ _Thread_queue_Context_initialize(&queue_context, NULL);
+ _ISR_lock_ISR_disable(&queue_context.Lock_context);
status = _CORE_mutex_Surrender (
&the_networkSemaphore->Core_control.mutex,
- NULL,
- &lock_context
+ &queue_context
);
if (status != CORE_MUTEX_STATUS_SUCCESSFUL)
rtems_panic ("rtems-net: can't release network sema: %i\n");