source: rtems/c/src/lib/libcpu/m68k/shared/misc/m68kidle.c @ 048459a

4.9
Last change on this file since 048459a was 048459a, checked in by Till Straumann <strauman@…>, on 09/10/09 at 21:20:22

2009-09-10 Till Straumann <strauman@…>

  • shared/misc/m68kidle.c: added "cc" clobber to inline asm; STOP instruction modifies CCR!
  • Property mode set to 100644
File size: 944 bytes
Line 
1/*
2 *  Motorola MC68xxx Dependent Idle Body Source
3 *
4 *  COPYRIGHT (c) 1989-2002.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#include <rtems/system.h>
15#include <rtems/score/thread.h>
16
17
18/*PAGE
19 *
20 *  _CPU_Thread_Idle_body
21 *
22 *  This kernel routine is the idle thread.  The idle thread runs any time
23 *  no other thread is ready to run.  This thread loops forever with
24 *  interrupts enabled.
25 *
26 *  Input parameters:
27 *    ignored - this parameter is ignored
28 *
29 *  Output parameters:  NONE
30 */
31 
32void *_CPU_Thread_Idle_body( uint32_t ignored )
33{
34#if defined(mcf5272)
35  for( ; ; ) {
36    asm volatile( "nop" );
37    asm volatile( "nop" );
38  }
39#else
40  for( ; ; )
41    asm volatile( "stop #0x3000":::"cc" );  /* supervisor mode, all interrupts on */
42#endif
43}
Note: See TracBrowser for help on using the repository browser.