source: rtems/cpukit/score/src/threaddelayended.c @ 439c494

4.115
Last change on this file since 439c494 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/**
2 * @file
3 *
4 * @brief End the Delay of a Thread
5 * @ingroup ScoreThread
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2007.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/score/threadimpl.h>
22
23void _Thread_Delay_ended(
24  Objects_Id  id,
25  void       *ignored __attribute__((unused))
26)
27{
28  Thread_Control    *the_thread;
29  Objects_Locations  location;
30
31  the_thread = _Thread_Get( id, &location );
32  switch ( location ) {
33    case OBJECTS_ERROR:
34#if defined(RTEMS_MULTIPROCESSING)
35    case OBJECTS_REMOTE:  /* impossible */
36#endif
37      break;
38    case OBJECTS_LOCAL:
39      _Thread_Clear_state(
40        the_thread,
41        STATES_DELAYING
42          | STATES_WAITING_FOR_TIME
43          | STATES_INTERRUPTIBLE_BY_SIGNAL
44      );
45      _Objects_Put_without_thread_dispatch( &the_thread->Object );
46      break;
47  }
48}
Note: See TracBrowser for help on using the repository browser.