4.104.114.84.95
Last change
on this file since eb02f47 was
eb02f47,
checked in by Joel Sherrill <joel.sherrill@…>, on 11/10/99 at 13:48:27
|
Committed modifications from ITRON Task and Task Dependendent Synchronization
Working Group. Included are tests.
|
-
Property mode set to
100644
|
File size:
971 bytes
|
Line | |
---|
1 | /* |
---|
2 | * The license and distribution terms for this file may be |
---|
3 | * found in the file LICENSE in this distribution or at |
---|
4 | * http://www.OARcorp.com/rtems/license.html. |
---|
5 | * |
---|
6 | * $Id$ |
---|
7 | */ |
---|
8 | |
---|
9 | #include <itron.h> |
---|
10 | |
---|
11 | #include <rtems/score/thread.h> |
---|
12 | #include <rtems/score/userext.h> |
---|
13 | #include <rtems/score/wkspace.h> |
---|
14 | #include <rtems/score/apiext.h> |
---|
15 | #include <rtems/score/sysstate.h> |
---|
16 | |
---|
17 | #include <rtems/itron/task.h> |
---|
18 | |
---|
19 | /* |
---|
20 | * rot_rdq - Rotate Tasks on the Ready Queue |
---|
21 | */ |
---|
22 | |
---|
23 | ER rot_rdq( |
---|
24 | PRI tskpri |
---|
25 | ) |
---|
26 | { |
---|
27 | PRI priority; |
---|
28 | |
---|
29 | |
---|
30 | _Thread_Disable_dispatch(); |
---|
31 | |
---|
32 | /* |
---|
33 | * Yield of processor will rotate the queue for this processor. |
---|
34 | */ |
---|
35 | |
---|
36 | if (( tskpri <= 0 ) || ( tskpri >= 256 )) |
---|
37 | _ITRON_return_errorno( E_PAR ); |
---|
38 | |
---|
39 | priority = _ITRON_Task_Core_to_Priority(_Thread_Executing->current_priority); |
---|
40 | if ( priority == tskpri ) |
---|
41 | _Thread_Yield_processor(); |
---|
42 | else { |
---|
43 | _Thread_Rotate_Ready_Queue( _ITRON_Task_Core_to_Priority( tskpri ) ); |
---|
44 | } |
---|
45 | _Thread_Enable_dispatch(); |
---|
46 | |
---|
47 | return E_OK; |
---|
48 | } |
---|
49 | |
---|
50 | |
---|
Note: See
TracBrowser
for help on using the repository browser.