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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [tests/] [sptests/] [sp20/] [getall.c] - Blame information for rev 389

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

Line No. Rev Author Line
1 30 unneback
/*  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.OARcorp.com/rtems/license.html.
15
 *
16
 *  $Id: getall.c,v 1.2 2001-09-27 12:02:35 chris Exp $
17
 */
18
 
19
#include "system.h"
20
 
21
void 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
 
40
  status = rtems_task_mode( RTEMS_PREEMPT, RTEMS_PREEMPT_MASK, &previous_mode );
41
  directive_failed( status, "rtems_task_mode to RTEMS_PREEMPT" );
42
}

powered by: WebSVN 2.1.0

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