AVR-LibC  2.3.0git
Standard C library for AVR-GCC
 

AVR-LibC Documen­tation

AVR-LibC Development Pages

Main Page

User Manual

Library Refe­rence

FAQ

Example Projects

File List

Index

Loading...
Searching...
No Matches
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#ifndef __ERRNO_H_
32#define __ERRNO_H_ 1
33
34/** \file */
35/** \defgroup avr_errno <errno.h>: System Errors
36
37 \code #include <errno.h>\endcode
38
39 Some functions in the library set the global variable \c errno when an
40 error occurs. The file, \c <errno.h>, provides symbolic names for various
41 error codes.
42 */
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/** \ingroup avr_errno
49 \brief Error code for last error encountered by library
50
51 The variable \c errno holds the last error code encountered by
52 a library function. This variable must be cleared by the
53 user prior to calling a library function.
54
55 \warning The \c errno global variable is not safe to use in a threaded or
56 multi-task system. A race condition can occur if a task is interrupted
57 between the call which sets \c error and when the task examines \c
58 errno. If another task changes \c errno during this time, the result will
59 be incorrect for the interrupted task. */
60#ifndef __ASSEMBLER__
61extern int errno;
62#endif
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/** \ingroup avr_errno
81 \def EINVAL
82
83 Invalid value error. */
84#define EINVAL 35
85
86#ifndef __DOXYGEN__
87
88#define ENOSYS 36
89#define EINTR 37
90#define ENOERR 38
91
92#define E2BIG ENOERR
93#define EACCES ENOERR
94#define EADDRINUSE ENOERR
95#define EADDRNOTAVAIL ENOERR
96#define EAFNOSUPPORT ENOERR
97#define EAGAIN ENOERR
98#define EALREADY ENOERR
99#define EBADF ENOERR
100#define EBUSY ENOERR
101#define ECHILD ENOERR
102#define ECONNABORTED ENOERR
103#define ECONNREFUSED ENOERR
104#define ECONNRESET ENOERR
105#define EDEADLK ENOERR
106#define EDESTADDRREQ ENOERR
107#define EEXIST ENOERR
108#define EFAULT ENOERR
109#define EFBIG ENOERR
110#define EHOSTUNREACH ENOERR
111#define EILSEQ ENOERR
112#define EINPROGRESS ENOERR
113#define EIO ENOERR
114#define EISCONN ENOERR
115#define EISDIR ENOERR
116#define ELOOP ENOERR
117#define EMFILE ENOERR
118#define EMLINK ENOERR
119#define EMSGSIZE ENOERR
120#define ENAMETOOLONG ENOERR
121#define ENETDOWN ENOERR
122#define ENETRESET ENOERR
123#define ENETUNREACH ENOERR
124#define ENFILE ENOERR
125#define ENOBUFS ENOERR
126#define ENODEV ENOERR
127#define ENOENT ENOERR
128#define ENOEXEC ENOERR
129#define ENOLCK ENOERR
130#define ENOMEM ENOERR
131#define ENOMSG ENOERR
132#define ENOPROTOOPT ENOERR
133#define ENOSPC ENOERR
134#define ENOTCONN ENOERR
135#define ENOTDIR ENOERR
136#define ENOTEMPTY ENOERR
137#define ENOTSOCK ENOERR
138#define ENOTTY ENOERR
139#define ENXIO ENOERR
140#define EOPNOTSUPP ENOERR
141#define EPERM ENOERR
142#define EPIPE ENOERR
143#define EPROTONOSUPPORT ENOERR
144#define EPROTOTYPE ENOERR
145#define EROFS ENOERR
146#define ESPIPE ENOERR
147#define ESRCH ENOERR
148#define ETIMEDOUT ENOERR
149#define EWOULDBLOCK ENOERR
150#define EXDEV ENOERR
151
152#endif /* !__DOXYGEN__ */
153
154#endif
int errno
Error code for last error encountered by library.
Definition: errno.c:31