---
name: "avr_errno"
section: "3avr"
platform: "linux"
package: "avr-libc"
version: "1:2.2.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/avr_errno"
---

# avr\_errno(3avr)

\<errno.h\>: System Errors

## NAME

avr\_errno - \<errno.h\>: System Errors

## SYNOPSIS

### Macros

\#define **EDOM**   33\
 \#define **ERANGE**   34\

### Variables

int **errno**\

## Detailed Description

```
#include <errno.h>
```

Some functions in the library set the global variable `errno` when an error occurs. The file, `<`**errno.h**`>`**, provides symbolic names for various error codes.**

## Macro Definition Documentation

### #define EDOM 33

**Domain error.**

### #define ERANGE 34

**Range error.**

## 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. This variable must be cleared by the user prior to calling a library function.**

**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 is interrupted between the call which sets** `error` **and when the task examines** `errno`**. If another task changes** `errno` **during this time, the result will be incorrect for the interrupted task.**

## Author

**Generated automatically by Doxygen for AVR-LibC from the source code.**
