avr_errno(3)

πŸ“¦ version 2.2.1, in fedora 43, fedora 44, opensuse-leap 16.0

✨ 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: the errno global 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 examines errno. If another task changes errno during 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