OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [include/] [rtems/] [score/] [priority.h] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  priority.h
2
 *
3
 *  This include file contains all thread priority manipulation routines.
4
 *  This Handler provides mechanisms which can be used to
5
 *  initialize and manipulate thread priorities.
6
 *
7
 *  COPYRIGHT (c) 1989-1999.
8
 *  On-Line Applications Research Corporation (OAR).
9
 *
10
 *  The license and distribution terms for this file may be
11
 *  found in the file LICENSE in this distribution or at
12
 *  http://www.OARcorp.com/rtems/license.html.
13
 *
14
 *  $Id: priority.h,v 1.2 2001-09-27 11:59:32 chris Exp $
15
 */
16
 
17
#ifndef __PRIORITY_h
18
#define __PRIORITY_h
19
 
20
#ifdef __cplusplus
21
extern "C" {
22
#endif
23
 
24
/*
25
 *  The following type defines the control block used to manage
26
 *  thread priorities.
27
 *
28
 *  NOTE: Priority 0 is reserved for internal threads only.
29
 */
30
 
31
typedef unsigned32 Priority_Control;
32
 
33
#define PRIORITY_MINIMUM      0         /* highest thread priority */
34
#define PRIORITY_MAXIMUM      255       /* lowest thread priority */
35
 
36
/*
37
 *  The following record defines the information associated with
38
 *  each thread to manage its interaction with the priority bit maps.
39
 */
40
 
41
typedef struct {
42
  Priority_Bit_map_control *minor;        /* addr of minor bit map slot */
43
  Priority_Bit_map_control  ready_major;  /* priority bit map ready mask */
44
  Priority_Bit_map_control  ready_minor;  /* priority bit map ready mask */
45
  Priority_Bit_map_control  block_major;  /* priority bit map block mask */
46
  Priority_Bit_map_control  block_minor;  /* priority bit map block mask */
47
}   Priority_Information;
48
 
49
/*
50
 *  The following data items are the priority bit map.
51
 *  Each of the sixteen bits used in the _Priority_Major_bit_map is
52
 *  associated with one of the sixteen entries in the _Priority_Bit_map.
53
 *  Each bit in the _Priority_Bit_map indicates whether or not there are
54
 *  threads ready at a particular priority.  The mapping of
55
 *  individual priority levels to particular bits is processor
56
 *  dependent as is the value of each bit used to indicate that
57
 *  threads are ready at that priority.
58
 */
59
 
60
SCORE_EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map;
61
SCORE_EXTERN Priority_Bit_map_control
62
               _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
63
 
64
/*
65
 *  The definition of the Priority_Bit_map_control type is CPU dependent.
66
 *
67
 */
68
 
69
/*
70
 *  Priority Bitfield Manipulation Routines
71
 *
72
 *  NOTE:
73
 *
74
 *  These may simply be pass throughs to CPU dependent routines.
75
 */
76
 
77
#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )
78
 
79
#define _Priority_Mask( _bit_number ) \
80
  _CPU_Priority_Mask( _bit_number )
81
 
82
#define _Priority_Bits_index( _priority ) \
83
  _CPU_Priority_bits_index( _priority )
84
 
85
#endif
86
 
87
#ifndef __RTEMS_APPLICATION__
88
#include <rtems/score/priority.inl>
89
#endif
90
 
91
#ifdef __cplusplus
92
}
93
#endif
94
 
95
#endif
96
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.