source: rtems/cpukit/score/inline/rtems/score/tqdata.inl @ 08311cc3

4.104.114.84.95
Last change on this file since 08311cc3 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/*  tqdata.inl
2 *
3 *  This file contains the static inline implementation of the inlined
4 *  routines needed to support the Thread Queue Data.
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16#ifndef __THREAD_QUEUE_DATA_inl
17#define __THREAD_QUEUE_DATA_inl
18
19/*PAGE
20 *
21 *  _Thread_queue_Header_number
22 *
23 *  DESCRIPTION:
24 *
25 *  This function returns the index of the priority chain on which
26 *  a thread of the_priority should be placed.
27 */
28
29RTEMS_INLINE_ROUTINE unsigned32 _Thread_queue_Header_number (
30  Priority_Control the_priority
31)
32{
33  return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
34}
35
36/*PAGE
37 *
38 *  _Thread_queue_Is_reverse_search
39 *
40 *  DESCRIPTION:
41 *
42 *  This function returns TRUE if the_priority indicates that the
43 *  enqueue search should start at the front of this priority
44 *  group chain, and FALSE if the search should start at the rear.
45 */
46
47RTEMS_INLINE_ROUTINE boolean _Thread_queue_Is_reverse_search (
48  Priority_Control the_priority
49)
50{
51  return ( the_priority & TASK_QUEUE_DATA_REVERSE_SEARCH_MASK );
52}
53
54/*PAGE
55 *
56 *  _Thread_queue_Enter_critical_section
57 *
58 *  DESCRIPTION:
59 *
60 *  This routine is invoked to indicate that the specified thread queue is
61 *  entering a critical section.
62 */
63 
64RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
65  Thread_queue_Control *the_thread_queue
66)
67{
68  the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED;
69}
70
71#endif
72/* end of include file */
Note: See TracBrowser for help on using the repository browser.