# source:arduino-1-6-7/trunk/fuentes/arduino-ide-amd64/hardware/tools/avr/avr/include/errno.h@46

Last change on this file since 46 was 46, checked in by jrpelegrina, 4 years ago

First release to Xenial

File size: 2.4 KB
Line
1/* Copyright (c) 2002,2007 Marek Michalkiewicz
3
4   Redistribution and use in source and binary forms, with or without
5   modification, are permitted provided that the following conditions are met:
6
7   * Redistributions of source code must retain the above copyright
8     notice, this list of conditions and the following disclaimer.
9
10   * Redistributions in binary form must reproduce the above copyright
11     notice, this list of conditions and the following disclaimer in
12     the documentation and/or other materials provided with the
13     distribution.
14
15   * Neither the name of the copyright holders nor the names of
16     contributors may be used to endorse or promote products derived
17     from this software without specific prior written permission.
18
19  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  POSSIBILITY OF SUCH DAMAGE. */
30
31/* $Id$ */
32
33#ifndef __ERRNO_H_
34#define __ERRNO_H_ 1
35
36/** \file */
37/** \defgroup avr_errno <errno.h>: System Errors
38
39    \code #include <errno.h>\endcode
40
41    Some functions in the library set the global variable \c errno when an
42    error occurs. The file, \c <errno.h>, provides symbolic names for various
43    error codes.
44
45    \warning The \c errno global variable is not safe to use in a threaded or
46    multi-task system. A race condition can occur if a task is interrupted
47    between the call which sets \c error and when the task examines \c
48    errno. If another task changes \c errno during this time, the result will
49    be incorrect for the interrupted task. */
50
51#ifdef __cplusplus
52extern "C" {
53#endif
54
55extern int errno;
56
57#ifdef __cplusplus
58}
59#endif
60
61/** \ingroup avr_errno
62    \def EDOM
63
64    Domain error. */
65#define EDOM       33
66
67/** \ingroup avr_errno
68    \def ERANGE
69
70    Range error. */
71#define ERANGE     34
72
73#endif
Note: See TracBrowser for help on using the repository browser.