avr-libc  2.0.0
Standard C library for AVR-GCC

AVR Libc Home Page

AVRs

AVR Libc Development Pages

Main Page

User Manual

Library Reference

FAQ

Example Projects

errno.h
Go to the documentation of this file.
1 /* Copyright (c) 2002,2007 Marek Michalkiewicz
2  All rights reserved.
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: errno_8h_source.html,v 1.1.1.6 2016/02/09 07:13:50 joerg_wunsch Exp $ */
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 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 /** \ingroup avr_errno
51  \brief Error code for last error encountered by library
52 
53  The variable \c errno holds the last error code encountered by
54  a library function. This variable must be cleared by the
55  user prior to calling a library function.
56 
57  \warning The \c errno global variable is not safe to use in a threaded or
58  multi-task system. A race condition can occur if a task is interrupted
59  between the call which sets \c error and when the task examines \c
60  errno. If another task changes \c errno during this time, the result will
61  be incorrect for the interrupted task. */
62 extern int errno;
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 /** \ingroup avr_errno
69  \def EDOM
70 
71  Domain error. */
72 #define EDOM 33
73 
74 /** \ingroup avr_errno
75  \def ERANGE
76 
77  Range error. */
78 #define ERANGE 34
79 
80 #ifndef __DOXYGEN__
81 
82 /* ((((('E'-64)*26+('N'-64))*26+('O'-64))*26+('S'-64))*26+('Y'-64))*26+'S'-64 */
83 #define ENOSYS ((int)(66081697 & 0x7fff))
84 
85 /* (((('E'-64)*26+('I'-64))*26+('N'-64))*26+('T'-64))*26+('R'-64) */
86 #define EINTR ((int)(2453066 & 0x7fff))
87 
88 #define E2BIG ENOERR
89 #define EACCES ENOERR
90 #define EADDRINUSE ENOERR
91 #define EADDRNOTAVAIL ENOERR
92 #define EAFNOSUPPORT ENOERR
93 #define EAGAIN ENOERR
94 #define EALREADY ENOERR
95 #define EBADF ENOERR
96 #define EBUSY ENOERR
97 #define ECHILD ENOERR
98 #define ECONNABORTED ENOERR
99 #define ECONNREFUSED ENOERR
100 #define ECONNRESET ENOERR
101 #define EDEADLK ENOERR
102 #define EDESTADDRREQ ENOERR
103 #define EEXIST ENOERR
104 #define EFAULT ENOERR
105 #define EFBIG ENOERR
106 #define EHOSTUNREACH ENOERR
107 #define EILSEQ ENOERR
108 #define EINPROGRESS ENOERR
109 #define EINVAL ENOERR
110 #define EIO ENOERR
111 #define EISCONN ENOERR
112 #define EISDIR ENOERR
113 #define ELOOP ENOERR
114 #define EMFILE ENOERR
115 #define EMLINK ENOERR
116 #define EMSGSIZE ENOERR
117 #define ENAMETOOLONG ENOERR
118 #define ENETDOWN ENOERR
119 #define ENETRESET ENOERR
120 #define ENETUNREACH ENOERR
121 #define ENFILE ENOERR
122 #define ENOBUFS ENOERR
123 #define ENODEV ENOERR
124 #define ENOENT ENOERR
125 #define ENOEXEC ENOERR
126 #define ENOLCK ENOERR
127 #define ENOMEM ENOERR
128 #define ENOMSG ENOERR
129 #define ENOPROTOOPT ENOERR
130 #define ENOSPC ENOERR
131 #define ENOTCONN ENOERR
132 #define ENOTDIR ENOERR
133 #define ENOTEMPTY ENOERR
134 #define ENOTSOCK ENOERR
135 #define ENOTTY ENOERR
136 #define ENXIO ENOERR
137 #define EOPNOTSUPP ENOERR
138 #define EPERM ENOERR
139 #define EPIPE ENOERR
140 #define EPROTONOSUPPORT ENOERR
141 #define EPROTOTYPE ENOERR
142 #define EROFS ENOERR
143 #define ESPIPE ENOERR
144 #define ESRCH ENOERR
145 #define ETIMEDOUT ENOERR
146 #define EWOULDBLOCK ENOERR
147 #define EXDEV ENOERR
148 
149 /* ((((('E'-64)*26+('N'-64))*26+('O'-64))*26+('E'-64))*26+('R'-64))*26+'R'-64 */
150 #define ENOERR ((int)(66072050 & 0xffff))
151 
152 #endif /* !__DOXYGEN__ */
153 
154 #endif
int errno
Error code for last error encountered by library.
Definition: errno.c:31