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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [itron/] [src/] [rot_rdq.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*
2
 *  COPYRIGHT (c) 1989-1999.
3
 *  On-Line Applications Research Corporation (OAR).
4
 *
5
 *  The license and distribution terms for this file may be
6
 *  found in the file LICENSE in this distribution or at
7
 *  http://www.OARcorp.com/rtems/license.html.
8
 *
9
 *  rot_rdq.c,v 1.5 2001/01/24 14:15:04 joel Exp
10
 */
11
 
12
#if HAVE_CONFIG_H
13
#include "config.h"
14
#endif
15
 
16
#include <itron.h>
17
 
18
#include <rtems/score/thread.h>
19
#include <rtems/score/userext.h>
20
#include <rtems/score/wkspace.h>
21
#include <rtems/score/apiext.h>
22
#include <rtems/score/sysstate.h>
23
 
24
#include <rtems/itron/task.h>
25
 
26
/*
27
 *  rot_rdq - Rotate Tasks on the Ready Queue
28
 */
29
 
30
ER rot_rdq(
31
  PRI tskpri
32
)
33
{
34
  PRI priority;
35
 
36
 
37
  if (( tskpri <= 0 ) || ( tskpri >= 256 ))
38
    return E_PAR;
39
 
40
  _Thread_Disable_dispatch();
41
 
42
  /*
43
   * Yield of processor will rotate the queue for this processor.
44
   */
45
 
46
  priority = _ITRON_Task_Core_to_Priority(_Thread_Executing->current_priority);
47
  if ( priority == tskpri )
48
    _Thread_Yield_processor();
49
  else {
50
    _Thread_Rotate_Ready_Queue( _ITRON_Task_Core_to_Priority( tskpri ) );
51
  }
52
  _Thread_Enable_dispatch();
53
 
54
  return E_OK;
55
}
56
 
57
 

powered by: WebSVN 2.1.0

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