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

Subversion Repositories ao486

[/] [ao486/] [trunk/] [syn/] [components/] [sd_card/] [firmware/] [bsp/] [HAL/] [inc/] [os/] [alt_flag.h] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 alfik
#ifndef __ALT_FLAG_H__
2
#define __ALT_FLAG_H__
3
 
4
/******************************************************************************
5
*                                                                             *
6
* License Agreement                                                           *
7
*                                                                             *
8
* Copyright (c) 2004 Altera Corporation, San Jose, California, USA.           *
9
* All rights reserved.                                                        *
10
*                                                                             *
11
* Permission is hereby granted, free of charge, to any person obtaining a     *
12
* copy of this software and associated documentation files (the "Software"),  *
13
* to deal in the Software without restriction, including without limitation   *
14
* the rights to use, copy, modify, merge, publish, distribute, sublicense,    *
15
* and/or sell copies of the Software, and to permit persons to whom the       *
16
* Software is furnished to do so, subject to the following conditions:        *
17
*                                                                             *
18
* The above copyright notice and this permission notice shall be included in  *
19
* all copies or substantial portions of the Software.                         *
20
*                                                                             *
21
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  *
22
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,    *
23
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
24
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      *
25
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING     *
26
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER         *
27
* DEALINGS IN THE SOFTWARE.                                                   *
28
*                                                                             *
29
* This agreement shall be governed in all respects by the laws of the State   *
30
* of California and by the laws of the United States of America.              *
31
*                                                                             *
32
* Altera does not recommend, suggest or require that this reference design    *
33
* file be used in conjunction or combination with any other product.          *
34
******************************************************************************/
35
 
36
/******************************************************************************
37
*                                                                             *
38
* THIS IS A LIBRARY READ-ONLY SOURCE FILE. DO NOT EDIT.                       *
39
*                                                                             *
40
******************************************************************************/
41
 
42
/*
43
 * This header provides macro definitions that can be used to create and use
44
 * uc/OS-II style event flags. These macros can be used in both a uC/OS-II based
45
 * environment, and a single threaded HAL based environment.
46
 *
47
 * The motivation for these macros is to allow code to be developed which is
48
 * thread safe under uC/OS-II, but incurs no additional overhead when used in a
49
 * single threaded HAL environment.
50
 *
51
 * In the case of a single threaded HAL environment, they compile to
52
 * "do nothing" directives, which ensures they do not contribute to the final
53
 * executable.
54
 *
55
 * The following macros are available:
56
 *
57
 * ALT_FLAG_GRP        - Create a flag group instance.
58
 * ALT_EXTERN_FLAG_GRP - Create a reference to an external flag group instance.
59
 * ALT_STATIC_FLAG_GRP - Create a static flag group instance.
60
 * ALT_FLAG_CREATE     - Initialise a flag group.
61
 * ALT_FLAG_PEND       - Pend on a flag group.
62
 * ALT_FLAG_POST       - Set a flag condition.
63
 
64
 *
65
 * Input arguments and return codes are all consistant with the equivalent
66
 * uC/OS-II function.
67
 *
68
 * It's important to be careful in the use of the macros: ALT_FLAG_GRP,
69
 * ALT_EXTERN_FLAG_GRP, and ALT_STATIC_FLAG_GRP. In these three cases the
70
 * semi-colon is included in the macro definition; so, for example, you should
71
 * use:
72
 *
73
 * ALT_FLAG_GRP(mygroup)
74
 *
75
 * not:
76
 *
77
 * ALT_FLAG_GRP(mygroup);
78
 *
79
 * The inclusion of the semi-colon has been necessary to ensure the macros can
80
 * compile with no warnings when used in a single threaded HAL environment.
81
 *
82
 */
83
 
84
#include "priv/alt_no_error.h"
85
 
86
#define ALT_FLAG_GRP(group)
87
#define ALT_EXTERN_FLAG_GRP(group) 
88
#define ALT_STATIC_FLAG_GRP(group)
89
 
90
#define ALT_FLAG_CREATE(group, flags) alt_no_error ()   
91
#define ALT_FLAG_PEND(group, flags, wait_type, timeout) alt_no_error ()
92
#define ALT_FLAG_POST(group, flags, opt) alt_no_error ()
93
 
94
#ifndef ALT_SINGLE_THREADED
95
#define ALT_SINGLE_THREADED
96
#endif
97
 
98
#endif /* __ALT_FLAG_H__ */

powered by: WebSVN 2.1.0

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