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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems/] [c/] [src/] [exec/] [posix/] [inline/] [rtems/] [posix/] [priority.inl] - Blame information for rev 158

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 158 chris
/*
2
 *  $Id: priority.inl,v 1.1.1.1 2001-07-10 09:42:25 chris Exp $
3
 */
4
 
5
#ifndef __RTEMS_POSIX_PRIORITY_inl
6
#define __RTEMS_POSIX_PRIORITY_inl
7
 
8
/*
9
 *  1003.1b-1993,2.2.2.80 definition of priority, p. 19
10
 *
11
 *  "Numericallly higher values represent higher priorities."
12
 *
13
 *  Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API.
14
 */
15
 
16
RTEMS_INLINE_ROUTINE boolean _POSIX_Priority_Is_valid(
17
  int priority
18
)
19
{
20
  return (boolean) (priority >= 1 && priority <= 254);
21
}
22
 
23
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
24
  int priority
25
)
26
{
27
  return (Priority_Control) (255 - priority);
28
}
29
 
30
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
31
  Priority_Control priority
32
)
33
{
34
  return 255 - priority;
35
}
36
 
37
#endif

powered by: WebSVN 2.1.0

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