source: rtems/cpukit/score/src/threadqtimeout.c @ bd029d87

4.8
Last change on this file since bd029d87 was 047d67a, checked in by Joel Sherrill <joel.sherrill@…>, on 11/15/06 at 14:08:49

2006-11-15 Joel Sherrill <joel.sherrill@…>

  • libcsupport/src/termios.c, posix/Makefile.am, posix/preinstall.am, posix/include/rtems/posix/config.h, posix/include/rtems/posix/time.h, sapi/src/posixapi.c, score/Makefile.am, score/preinstall.am, score/include/rtems/score/corerwlock.h, score/include/rtems/score/threadq.h, score/src/corerwlockobtainread.c, score/src/threadqenqueue.c, score/src/threadqtimeout.c: Adding POSIX barriers, POSIX spinlocks, and partial implementation of POSIX rwlocks.
  • posix/include/rtems/posix/barrier.h, posix/include/rtems/posix/rwlock.h, posix/include/rtems/posix/spinlock.h, posix/inline/rtems/posix/barrier.inl, posix/inline/rtems/posix/rwlock.inl, posix/inline/rtems/posix/spinlock.inl, posix/src/barrierattrdestroy.c, posix/src/barrierattrgetpshared.c, posix/src/barrierattrinit.c, posix/src/barrierattrsetpshared.c, posix/src/pbarrier.c, posix/src/pbarrierdestroy.c, posix/src/pbarrierinit.c, posix/src/pbarriertranslatereturncode.c, posix/src/pbarrierwait.c, posix/src/prwlock.c, posix/src/prwlockdestroy.c, posix/src/prwlockinit.c, posix/src/prwlockrdlock.c, posix/src/prwlocktimedrdlock.c, posix/src/prwlocktimedwrlock.c, posix/src/prwlocktranslatereturncode.c, posix/src/prwlocktryrdlock.c, posix/src/prwlocktrywrlock.c, posix/src/prwlockunlock.c, posix/src/prwlockwrlock.c, posix/src/pspin.c, posix/src/pspindestroy.c, posix/src/pspininit.c, posix/src/pspinlock.c, posix/src/pspinlocktranslatereturncode.c, posix/src/pspintrylock.c, posix/src/pspinunlock.c, posix/src/rwlockattrdestroy.c, posix/src/rwlockattrgetpshared.c, posix/src/rwlockattrinit.c, posix/src/rwlockattrsetpshared.c: New files.
  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  Thread Queue Handler
3 *
4 *
5 *  COPYRIGHT (c) 1989-1999.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 *
12 *  $Id$
13 */
14
15#if HAVE_CONFIG_H
16#include "config.h"
17#endif
18
19#include <rtems/system.h>
20#include <rtems/score/chain.h>
21#include <rtems/score/isr.h>
22#include <rtems/score/object.h>
23#include <rtems/score/states.h>
24#include <rtems/score/thread.h>
25#include <rtems/score/threadq.h>
26#include <rtems/score/tqdata.h>
27
28/*
29 *  _Thread_queue_Timeout
30 *
31 *  This routine processes a thread which timeouts while waiting on
32 *  a thread queue. It is called by the watchdog handler.
33 *
34 *  Input parameters:
35 *    id - thread id
36 *
37 *  Output parameters: NONE
38 */
39
40void _Thread_queue_Timeout(
41  Objects_Id  id,
42  void       *ignored
43)
44{
45  Thread_Control       *the_thread;
46  Objects_Locations     location;
47
48  the_thread = _Thread_Get( id, &location );
49  switch ( location ) {
50    case OBJECTS_ERROR:
51    case OBJECTS_REMOTE:  /* impossible */
52      break;
53    case OBJECTS_LOCAL:
54      _Thread_queue_Process_timeout( the_thread );
55      _Thread_Unnest_dispatch();
56      break;
57  }
58}
Note: See TracBrowser for help on using the repository browser.