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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [synth/] [arch/] [current/] [include/] [hal_arch.h] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_HAL_HAL_ARCH_H
2
#define CYGONCE_HAL_HAL_ARCH_H
3
 
4
//=============================================================================
5
//
6
//      hal_arch.h
7
//
8
//      Architecture specific abstractions for synthetic target.
9
//
10
//=============================================================================
11
// ####ECOSGPLCOPYRIGHTBEGIN####                                            
12
// -------------------------------------------                              
13
// This file is part of eCos, the Embedded Configurable Operating System.   
14
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
15
//
16
// eCos is free software; you can redistribute it and/or modify it under    
17
// the terms of the GNU General Public License as published by the Free     
18
// Software Foundation; either version 2 or (at your option) any later      
19
// version.                                                                 
20
//
21
// eCos is distributed in the hope that it will be useful, but WITHOUT      
22
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
23
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
24
// for more details.                                                        
25
//
26
// You should have received a copy of the GNU General Public License        
27
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
28
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
29
//
30
// As a special exception, if other files instantiate templates or use      
31
// macros or inline functions from this file, or you compile this file      
32
// and link it with other works to produce a work based on this file,       
33
// this file does not by itself cause the resulting work to be covered by   
34
// the GNU General Public License. However the source code for this file    
35
// must still be made available in accordance with section (3) of the GNU   
36
// General Public License v2.                                               
37
//
38
// This exception does not invalidate any other reasons why a work based    
39
// on this file might be covered by the GNU General Public License.         
40
// -------------------------------------------                              
41
// ####ECOSGPLCOPYRIGHTEND####                                              
42
//=============================================================================
43
//#####DESCRIPTIONBEGIN####
44
//
45
// Author(s):   proven
46
// Contributors:proven, pjo, nickg,bartv
47
// Date:        1998-10-05
48
// Purpose:     Define architecture abstractions
49
// Usage:       #include <cyg/hal/hal_arch.h>
50
//
51
//####DESCRIPTIONEND####
52
//
53
//=============================================================================
54
 
55
// ----------------------------------------------------------------------------
56
// Architectural definitions such as processor save state information.
57
// For the synthetic target most of this information has to be
58
// provided by the variant HALs.
59
 
60
#include <cyg/hal/var_arch.h>
61
 
62
//-----------------------------------------------------------------------------
63
// Exception handling function.
64
// This function is provided by either the kernel or the common HAL to
65
// deliver an exception to the current thread.
66
// NOTE: the declaration should move to a common package. 
67
externC void cyg_hal_deliver_exception( CYG_WORD code, CYG_ADDRWORD data );
68
 
69
//-----------------------------------------------------------------------------
70
// Execution reorder barrier.
71
// When optimizing the compiler can reorder code. In multithreaded systems
72
// where the order of actions is vital, this can sometimes cause problems.
73
// This macro may be inserted into places where reordering should not happen.
74
 
75
#define HAL_REORDER_BARRIER() asm volatile ( "" : : : "memory" )
76
 
77
//-----------------------------------------------------------------------------
78
// Idle thread code.
79
// This macro is called in the idle thread loop, and gives the HAL the
80
// chance to insert code. In the synthetic target it involves blocking
81
// until there is a signal.
82
 
83
externC void hal_idle_thread_action(cyg_uint32 loop_count);
84
 
85
#define HAL_IDLE_THREAD_ACTION(_count_) hal_idle_thread_action(_count_)
86
 
87
//--------------------------------------------------------------------------
88
#endif // CYGONCE_HAL_HAL_ARCH_H
89
// End of hal_arch.h

powered by: WebSVN 2.1.0

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