CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Toggle main menu visibility
Loading...
Searching...
No Matches
sdk
include
FreeRTOS-Compat
FreeRTOS_errno.h
Go to the documentation of this file.
1
// Copyright SCI Semiconductor and CHERIoT Contributors.
2
// SPDX-License-Identifier: MIT
3
4
#pragma once
5
6
/**
7
* \file
8
* \brief FreeRTOS-compatible `errno` values.
9
*
10
* These are mapped to the CHERIoT RTOS values. Note that this also means that
11
* the values without the `pdFREERTOS_ERRNO_` prefix are exposed in the global
12
* namespace.
13
*/
14
15
#include <errno.h>
16
17
/**
18
* This header defines errno values used by FreeRTOS+TCP.
19
*
20
* In the FreeRTOS core tree, this is included in `projdefs.h`.
21
*
22
* We modified it here to use the same errno codes are the CHERIoT core when
23
* possible.
24
*/
25
26
#define pdFREERTOS_ERRNO_NONE 0
// No errors
27
#define pdFREERTOS_ERRNO_ENOENT ENOENT
// No such file or directory
28
#define pdFREERTOS_ERRNO_EINTR EINTR
// Interrupted system call
29
#define pdFREERTOS_ERRNO_EIO EIO
// I/O error
30
#define pdFREERTOS_ERRNO_ENXIO ENXIO
// No such device or address
31
#define pdFREERTOS_ERRNO_EBADF EBADF
// Bad file number
32
#define pdFREERTOS_ERRNO_EAGAIN EAGAIN
// No more processes
33
#define pdFREERTOS_ERRNO_EWOULDBLOCK EWOULDBLOCK
// Operation would block
34
#define pdFREERTOS_ERRNO_ENOMEM ENOMEM
// Not enough memory
35
#define pdFREERTOS_ERRNO_EACCES EACCES
// Permission denied
36
#define pdFREERTOS_ERRNO_EFAULT EFAULT
// Bad address
37
#define pdFREERTOS_ERRNO_EBUSY EBUSY
// Mount device busy
38
#define pdFREERTOS_ERRNO_EEXIST EEXIST
// File exists
39
#define pdFREERTOS_ERRNO_EXDEV EXDEV
// Cross-device link
40
#define pdFREERTOS_ERRNO_ENODEV ENODEV
// No such device
41
#define pdFREERTOS_ERRNO_ENOTDIR ENOTDIR
// Not a directory
42
#define pdFREERTOS_ERRNO_EISDIR EISDIR
// Is a directory
43
#define pdFREERTOS_ERRNO_EINVAL EINVAL
// Invalid argument
44
#define pdFREERTOS_ERRNO_ENOSPC ENOSPC
// No space left on device
45
#define pdFREERTOS_ERRNO_ESPIPE ESPIPE
// Illegal seek
46
#define pdFREERTOS_ERRNO_EROFS EROFS
// Read only file system
47
#define pdFREERTOS_ERRNO_EUNATCH EUNATCH
// Protocol driver not attached
48
#define pdFREERTOS_ERRNO_EBADE EBADE
// Invalid exchange
49
#define pdFREERTOS_ERRNO_EFTYPE EFTYPE
// Inappropriate file type or format
50
#define pdFREERTOS_ERRNO_ENOTEMPTY ENOTEMPTY
// Directory not empty
51
#define pdFREERTOS_ERRNO_ENAMETOOLONG ENAMETOOLONG
// File or path name too long
52
#define pdFREERTOS_ERRNO_EOPNOTSUPP \
53
EOPNOTSUPP
// Operation not supported on transport endpoint
54
#define pdFREERTOS_ERRNO_EAFNOSUPPORT \
55
EAFNOSUPPORT
// Address family not supported by protocol
56
#define pdFREERTOS_ERRNO_ENOBUFS ENOBUFS
// No buffer space available
57
#define pdFREERTOS_ERRNO_ENOPROTOOPT ENOPROTOOPT
// Protocol not available
58
#define pdFREERTOS_ERRNO_EADDRINUSE EADDRINUSE
// Address already in use
59
#define pdFREERTOS_ERRNO_ETIMEDOUT ETIMEDOUT
// Connection timed out
60
#define pdFREERTOS_ERRNO_EINPROGRESS \
61
EINPROGRESS
// Connection already in progress
62
#define pdFREERTOS_ERRNO_EALREADY EALREADY
// Socket already connected
63
#define pdFREERTOS_ERRNO_EADDRNOTAVAIL EADDRNOTAVAIL
// Address not available
64
#define pdFREERTOS_ERRNO_EISCONN EISCONN
// Socket is already connected
65
#define pdFREERTOS_ERRNO_ENOTCONN ENOTCONN
// Socket is not connected
66
#define pdFREERTOS_ERRNO_ENOMEDIUM ENOMEDIUM
// No medium inserted
67
#define pdFREERTOS_ERRNO_EILSEQ \
68
EILSEQ
// An invalid UTF-16 sequence was encountered
69
#define pdFREERTOS_ERRNO_ECANCELED ECANCELED
// Operation canceled
70
71
/**
72
* These errno codes are non-standard, assign them a code outside our errno
73
* range.
74
*/
75
76
#define pdFREERTOS_ERRNO_ENMFILE (__ELASTERROR + 1)
// No more files
Generated by
1.18.0