gem5  v22.1.0.0
Namespaces | Macros | Functions
atomicio.hh File Reference
#include <unistd.h>

Go to the source code of this file.

Namespaces

 gem5
 Reference material can be found at the JEDEC website: UFS standard http://www.jedec.org/standards-documents/results/jesd220 UFS HCI specification http://www.jedec.org/standards-documents/results/jesd223.
 

Macros

#define STATIC_MSG(fd, m)
 Statically allocate a string and write it to a file descriptor. More...
 
#define STATIC_ERR(m)   STATIC_MSG(STDERR_FILENO, m)
 Statically allocate a string and write it to STDERR. More...
 

Functions

ssize_t gem5::atomic_read (int fd, void *s, size_t n)
 
ssize_t gem5::atomic_write (int fd, const void *s, size_t n)
 

Macro Definition Documentation

◆ STATIC_ERR

#define STATIC_ERR (   m)    STATIC_MSG(STDERR_FILENO, m)

Statically allocate a string and write it to STDERR.

Warning
The return value will from atomic_write will be ignored which means that errors will be ignored. This is normally fine as this macro is intended to be used in fatal signal handlers where error handling might not be feasible.

Definition at line 67 of file atomicio.hh.

◆ STATIC_MSG

#define STATIC_MSG (   fd,
 
)
Value:
do { \
static const char msg[] = m; \
atomic_write(fd, msg, sizeof(msg) - 1); \
} while (0)
Bitfield< 14, 12 > fd
Definition: types.hh:150

Statically allocate a string and write it to a file descriptor.

Warning
The return value will from atomic_write will be ignored which means that errors will be ignored. This is normally fine as this macro is intended to be used in fatal signal handlers where error handling might not be feasible.

Definition at line 53 of file atomicio.hh.


Generated on Wed Dec 21 2022 10:22:53 for gem5 by doxygen 1.9.1