avr_errno(3avr)
π avr_errno β the <errno.h> tea, aka System Errors β¨
okay bestie, pull up a chair because this is the page for avr_errno(3avr) and it's literally the "what went wrong tho" cheat sheet for AVR-LibC π«Ά
πΈ SYNOPSIS πΈ
Macros
#define EDOM 33
#define ERANGE 34
Variables
int errno
β¨ Detailed Description β¨
so first things first, you gotta
#include <errno.h>
Some functions in the library set the global variable errno when an error occurs. And <errno.h>? She's the one handing out symbolic names for all the various error codes. iconic behavior honestly π
π Macro Definition Documentation π
#define EDOM 33β Domain error. that's it, that's the whole vibe.#define ERANGE 34β Range error. same energy, different number.
π¦ Variable Documentation π¦
int errno [extern]
Error code for last error encountered by library. The variable errno holds the last error code encountered by a library function.
β οΈ okay listen up bestie, this part is IMPORTANT: this variable must be cleared by the user prior to calling a library function. yes, YOU have to clear it. it does not clear itself. no cap. π
π¨ Warning Theerrnoglobal variable is not safe to use in a threaded or multi-task system. A race condition can occur if a task is interrupted between the call which sets error and when the task examineserrno. If another task changeserrnoduring this time, the result will be incorrect for the interrupted task. it's giving "shared global variable betrayal" and honestly it will not hesitate to lie to you π
π Author π
Generated automatically by Doxygen for AVR-LibC from the source code. so yeah, the bots wrote it. slay, I guess π
aaaand that's the whole page, bestie π this was AVR-LibC Version 2.2.1, dated the avr_errno(3avr) era β thanks for reading all the way to the bottom, you're a real one π«Άβ¨π
π¦ where this page comes from
- ubuntu resolute: avr-libc 1:2.2.1-1build1 Β· BSD-3-Clause
- ubuntu stonking: avr-libc 1:2.2.1-1build1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms