avr_errno(3)
β¨ avr_errno β¨
okay bestie, welcome to the avr_errno(3) page from the avr-libc manual π this one's short but it's lowkey important, so let's go
πΈ SYNOPSIS πΈ
Macros
#define EDOM 33
#define ERANGE 34
Variables
int errno
π¦ Detailed Description π¦
#include <errno.h>
so here's the tea: some functions in the library will set the global variable errno whenever an error happens. and the file, <errno.h>, is the one that gives you the symbolic names for all the various error codes. iconic behaviour honestly π
π Macro Definition Documentation π
#define EDOM 33
Domain error. β¨
#define ERANGE 34
Range error. π
π Variable Documentation π
int errno
Error code for the last error encountered by the library. basically errno holds the last error code that a library function ran into. and heads up: this variable must be cleared by the user before calling a library function. not optional, bestie π«Ά
β οΈ Warning: theerrnoglobal variable is not safe to use in a threaded or multi-task system. A race condition can occur if a task gets interrupted between the call which sets the error and the moment the task actually examineserrno. If another task changeserrnoduring that window, the result will be incorrect for the interrupted task. so likeβ¦ be careful, fr fr π
π Author π
Generated automatically by Doxygen for avr-libc from the source code.
and that's the whole page, no cap π§ this was Version 2.1.0, dated Sat Jan 29 2022 β ty for reading, ily, mwah πππ¦
π¦ where this page comes from
- fedora 43: avr-libc 2.2.1-3.fc43 Β· BSD-3-Clause
- fedora 44: avr-libc 2.2.1-5.fc44 Β· BSD-3-Clause
- opensuse-leap 16.0: avr-libc 2.1.0-bp160.1.33 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms