Changeset 6de1f92 in rtems


Ignore:
Timestamp:
Oct 19, 2017, 11:41:25 AM (17 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
1666ffe5
Parents:
5747962
git-author:
Sebastian Huber <sebastian.huber@…> (10/19/17 11:41:25)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/24/17 07:37:28)
Message:

score: Add _Thread_Continue()

Update #3117.
Update #3182.

Location:
cpukit/score
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/threadimpl.h

    r5747962 r6de1f92  
    18421842
    18431843/**
     1844 * @brief Cancels a blocking operation so that the thread can continue its
     1845 * execution.
     1846 *
     1847 * In case this function actually cancelled the blocking operation, then the
     1848 * thread wait return code is set to the specified status.
     1849 *
     1850 * A specialization of this function is _Thread_Timeout().
     1851 *
     1852 * @param[in] the_thread The thread.
     1853 * @param[in] status The thread wait status.
     1854 */
     1855void _Thread_Continue( Thread_Control *the_thread, Status_Control status );
     1856
     1857/**
    18441858 * @brief General purpose thread wait timeout.
    18451859 *
    1846  * @param[in] watchdog The thread timer watchdog.
    1847  */
    1848 void _Thread_Timeout( Watchdog_Control *watchdog );
     1860 * @param[in] the_watchdog The thread timer watchdog.
     1861 */
     1862void _Thread_Timeout( Watchdog_Control *the_watchdog );
    18491863
    18501864RTEMS_INLINE_ROUTINE void _Thread_Timer_initialize(
  • cpukit/score/src/threadtimeout.c

    r5747962 r6de1f92  
    2323#include <rtems/score/status.h>
    2424
    25 void _Thread_Timeout( Watchdog_Control *watchdog )
     25void _Thread_Continue( Thread_Control *the_thread, Status_Control status )
    2626{
    27   Thread_Control       *the_thread;
    28   Thread_queue_Context  queue_context;
    29   Thread_Wait_flags     wait_flags;
    30   bool                  unblock;
    31 
    32   the_thread = RTEMS_CONTAINER_OF( watchdog, Thread_Control, Timer.Watchdog );
     27  Thread_queue_Context queue_context;
     28  Thread_Wait_flags    wait_flags;
     29  bool                 unblock;
    3330
    3431  _Thread_queue_Context_initialize( &queue_context );
     
    4542    _Thread_Wait_cancel( the_thread, &queue_context );
    4643
    47     the_thread->Wait.return_code = STATUS_TIMEOUT;
     44    the_thread->Wait.return_code = status;
    4845
    4946    wait_class = wait_flags & THREAD_WAIT_CLASS_MASK;
     
    8380  }
    8481}
     82
     83void _Thread_Timeout( Watchdog_Control *the_watchdog )
     84{
     85  Thread_Control *the_thread;
     86
     87  the_thread = RTEMS_CONTAINER_OF(
     88    the_watchdog,
     89    Thread_Control,
     90    Timer.Watchdog
     91  );
     92  _Thread_Continue( the_thread, STATUS_TIMEOUT );
     93}
Note: See TracChangeset for help on using the changeset viewer.