source: rtems/testsuites/sptests/spedfsched02/getall.c @ 0d6aee4

4.115
Last change on this file since 0d6aee4 was 0d6aee4, checked in by Joel Sherrill <joel.sherrill@…>, on 09/11/11 at 20:56:45

2011-09-11 Petr Benes <benesp16@…>

PR 1897/testing

  • Makefile.am, configure.ac: Add tests for Earliest Deadline First (EDF) Scheduling Algorithm implementation.
  • spedfsched01/.cvsignore, spedfsched01/Makefile.am, spedfsched01/init.c, spedfsched01/spedfsched01.doc, spedfsched01/spedfsched01.scn, spedfsched01/system.h, spedfsched01/task1.c, spedfsched02/.cvsignore, spedfsched02/Makefile.am, spedfsched02/getall.c, spedfsched02/init.c, spedfsched02/spedfsched02.doc, spedfsched02/spedfsched02.scn, spedfsched02/system.h, spedfsched02/task1.c, spedfsched03/.cvsignore, spedfsched03/Makefile.am, spedfsched03/edfparams.h, spedfsched03/init.c, spedfsched03/spedfsched03.doc, spedfsched03/spedfsched03.scn, spedfsched03/system.h, spedfsched03/tasks_aperiodic.c, spedfsched03/tasks_periodic.c: New files.
  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*  Get_all_counters
2 *
3 *  This routine allows TA5 to atomically obtain the iteration counters.
4 *
5 *  Input parameters:  NONE
6 *
7 *  Output parameters:  NONE
8 *
9 *  COPYRIGHT (c) 1989-1999.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18
19#include "system.h"
20
21void Get_all_counters()
22{
23  rtems_mode        previous_mode;
24  rtems_status_code status;
25
26  status = rtems_task_mode(
27    RTEMS_NO_PREEMPT,
28    RTEMS_PREEMPT_MASK,
29    &previous_mode
30  );
31  directive_failed( status, "rtems_task_mode to RTEMS_NO_PREEMPT" );
32
33  Temporary_count = Count;
34  Count.count[ 1 ] = 0;
35  Count.count[ 2 ] = 0;
36  Count.count[ 3 ] = 0;
37  Count.count[ 4 ] = 0;
38  Count.count[ 5 ] = 0;
39  Count.count[ 6 ] = 0;
40
41  status = rtems_task_mode(
42      RTEMS_PREEMPT,
43      RTEMS_PREEMPT_MASK,
44      &previous_mode
45  );
46  directive_failed( status, "rtems_task_mode to RTEMS_PREEMPT" );
47}
Note: See TracBrowser for help on using the repository browser.