$treeview $search $mathjax $extrastylesheet
avr-libc  2.0.0
$projectbrief
$projectbrief
$searchbox

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.
00001 /* Copyright (c) 2002,2007 Marek Michalkiewicz
00002    All rights reserved.
00003 
00004    Redistribution and use in source and binary forms, with or without
00005    modification, are permitted provided that the following conditions are met:
00006 
00007    * Redistributions of source code must retain the above copyright
00008      notice, this list of conditions and the following disclaimer.
00009 
00010    * Redistributions in binary form must reproduce the above copyright
00011      notice, this list of conditions and the following disclaimer in
00012      the documentation and/or other materials provided with the
00013      distribution.
00014 
00015    * Neither the name of the copyright holders nor the names of
00016      contributors may be used to endorse or promote products derived
00017      from this software without specific prior written permission.
00018 
00019   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00020   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00021   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00022   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00023   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00024   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00025   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00026   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00027   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00028   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00029   POSSIBILITY OF SUCH DAMAGE. */
00030 
00031 /* $Id$ */
00032 
00033 #ifndef __ERRNO_H_
00034 #define __ERRNO_H_ 1
00035 
00036 /** \file */
00037 /** \defgroup avr_errno <errno.h>: System Errors
00038 
00039     \code #include <errno.h>\endcode
00040 
00041     Some functions in the library set the global variable \c errno when an
00042     error occurs. The file, \c <errno.h>, provides symbolic names for various
00043     error codes. 
00044  */
00045 
00046 #ifdef __cplusplus
00047 extern "C" {
00048 #endif
00049 
00050 /** \ingroup avr_errno
00051     \brief Error code for last error encountered by library
00052 
00053     The variable \c errno holds the last error code encountered by
00054     a library function.  This variable must be cleared by the
00055     user prior to calling a library function.
00056 
00057     \warning The \c errno global variable is not safe to use in a threaded or
00058     multi-task system. A race condition can occur if a task is interrupted
00059     between the call which sets \c error and when the task examines \c
00060     errno. If another task changes \c errno during this time, the result will
00061     be incorrect for the interrupted task. */
00062 extern int errno;
00063 
00064 #ifdef __cplusplus
00065 }
00066 #endif
00067 
00068 /** \ingroup avr_errno
00069     \def EDOM
00070 
00071     Domain error. */
00072 #define EDOM       33
00073 
00074 /** \ingroup avr_errno
00075     \def ERANGE
00076 
00077     Range error. */
00078 #define ERANGE     34
00079 
00080 #ifndef __DOXYGEN__
00081 
00082 /* ((((('E'-64)*26+('N'-64))*26+('O'-64))*26+('S'-64))*26+('Y'-64))*26+'S'-64 */
00083 #define ENOSYS ((int)(66081697 & 0x7fff))
00084 
00085 /* (((('E'-64)*26+('I'-64))*26+('N'-64))*26+('T'-64))*26+('R'-64) */
00086 #define EINTR ((int)(2453066 & 0x7fff))
00087 
00088 #define E2BIG ENOERR
00089 #define EACCES ENOERR
00090 #define EADDRINUSE ENOERR
00091 #define EADDRNOTAVAIL ENOERR
00092 #define EAFNOSUPPORT ENOERR
00093 #define EAGAIN ENOERR
00094 #define EALREADY ENOERR
00095 #define EBADF ENOERR
00096 #define EBUSY ENOERR
00097 #define ECHILD ENOERR
00098 #define ECONNABORTED ENOERR
00099 #define ECONNREFUSED ENOERR
00100 #define ECONNRESET ENOERR
00101 #define EDEADLK ENOERR
00102 #define EDESTADDRREQ ENOERR
00103 #define EEXIST ENOERR
00104 #define EFAULT ENOERR
00105 #define EFBIG ENOERR
00106 #define EHOSTUNREACH ENOERR
00107 #define EILSEQ ENOERR
00108 #define EINPROGRESS ENOERR
00109 #define EINVAL ENOERR
00110 #define EIO ENOERR
00111 #define EISCONN ENOERR
00112 #define EISDIR ENOERR
00113 #define ELOOP ENOERR
00114 #define EMFILE ENOERR
00115 #define EMLINK ENOERR
00116 #define EMSGSIZE ENOERR
00117 #define ENAMETOOLONG ENOERR
00118 #define ENETDOWN ENOERR
00119 #define ENETRESET ENOERR
00120 #define ENETUNREACH ENOERR
00121 #define ENFILE ENOERR
00122 #define ENOBUFS ENOERR
00123 #define ENODEV ENOERR
00124 #define ENOENT ENOERR
00125 #define ENOEXEC ENOERR
00126 #define ENOLCK ENOERR
00127 #define ENOMEM ENOERR
00128 #define ENOMSG ENOERR
00129 #define ENOPROTOOPT ENOERR
00130 #define ENOSPC ENOERR
00131 #define ENOTCONN ENOERR
00132 #define ENOTDIR ENOERR
00133 #define ENOTEMPTY ENOERR
00134 #define ENOTSOCK ENOERR
00135 #define ENOTTY ENOERR
00136 #define ENXIO ENOERR
00137 #define EOPNOTSUPP ENOERR
00138 #define EPERM ENOERR
00139 #define EPIPE ENOERR
00140 #define EPROTONOSUPPORT ENOERR
00141 #define EPROTOTYPE ENOERR
00142 #define EROFS ENOERR
00143 #define ESPIPE ENOERR
00144 #define ESRCH ENOERR
00145 #define ETIMEDOUT ENOERR
00146 #define EWOULDBLOCK ENOERR
00147 #define EXDEV ENOERR
00148 
00149 /* ((((('E'-64)*26+('N'-64))*26+('O'-64))*26+('E'-64))*26+('R'-64))*26+'R'-64 */
00150 #define ENOERR ((int)(66072050 & 0xffff))
00151 
00152 #endif  /* !__DOXYGEN__ */
00153 
00154 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Defines