diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-29 12:06:55 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-29 12:06:55 +0200 |
commit | 16832b0d9e1f6448a57b6f5f2909cff7ad360706 (patch) | |
tree | 772708cb85a765b1a3c5b0437a14027c581b7e28 /cpukit/score/include/rtems/score | |
parent | score: Allow MPCI packet receive function to block (diff) | |
download | rtems-16832b0d9e1f6448a57b6f5f2909cff7ad360706.tar.bz2 |
score: Fix multiprocessing thread proxies
We must provide thread queue heads for the thread wait information for
each thread proxy (thread queue heads were introduced by
d7665823b208daefb6855591d808e1f3075cedcb). The thread proxy must be
allocated before the enqueue operation.
Diffstat (limited to 'cpukit/score/include/rtems/score')
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 9 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/threadimpl.h | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 4e0d8cf6f9..ffca164cd5 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -417,6 +417,15 @@ typedef struct { /****************** end of common block ********************/ /** This field is used to manage the set of proxies in the system. */ Chain_Node Active; + + /** + * @brief Provide thread queue heads for this thread proxy. + * + * The actual size of the thread queue heads depends on the application + * configuration. Since thread proxies are never destroyed we can use the + * same storage place for the thread queue heads. + */ + Thread_queue_Heads Thread_queue_heads[ RTEMS_ZERO_LENGTH_ARRAY ]; } Thread_Proxy_control; /** diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index 55fdb224da..516441ed9c 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -1455,6 +1455,16 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_set_timeout_code( */ void _Thread_Timeout( Watchdog_Control *watchdog ); +RTEMS_INLINE_ROUTINE void _Thread_Timer_initialize( + Thread_Timer_information *timer, + Per_CPU_Control *cpu +) +{ + _ISR_lock_Initialize( &timer->Lock, "Thread Timer" ); + timer->header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ]; + _Watchdog_Preinitialize( &timer->Watchdog, cpu ); +} + RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_relative( Thread_Control *the_thread, Per_CPU_Control *cpu, |