ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
abstraction.h File Reference

🔌 Cross-platform abstraction layer umbrella header for ascii-chat More...

Go to the source code of this file.

Macros

Platform Detection Macros
#define PLATFORM_WINDOWS   0
 Platform detection: 1 on Windows, 0 on POSIX.
 
#define PLATFORM_POSIX   1
 Platform detection: 1 on POSIX, 0 on Windows.
 
Compiler Attribute Macros
#define PACKED_STRUCT_BEGIN
 Begin a packed structure (POSIX: no-op, uses attribute)
 
#define PACKED_STRUCT_END
 End a packed structure (POSIX: no-op, uses attribute)
 
#define PACKED_ATTR   __attribute__((packed))
 Packed structure attribute (POSIX: attribute((packed)))
 
#define ALIGNED_ATTR(x)   __attribute__((aligned(x)))
 Memory alignment attribute (POSIX: attribute((aligned)))
 
Thread-Local Storage and Alignment Macros
#define THREAD_LOCAL   __thread
 Thread-local storage keyword (POSIX: __thread)
 
#define ALIGNED_32   __attribute__((aligned(32)))
 32-byte alignment macro (POSIX: attribute((aligned(32))))
 
#define ALIGNED_16   __attribute__((aligned(16)))
 16-byte alignment macro (POSIX: attribute((aligned(16))))
 
Utility Macros
#define UNUSED(x)   ((void)(x))
 Suppress unused parameter warnings.
 

Functions

Cross-Platform Utility Functions
void platform_sleep_usec (unsigned int usec)
 High-precision sleep function with microsecond precision.
 
ssize_t platform_write (int fd, const void *buf, size_t count)
 Platform-safe write function.
 

Detailed Description

🔌 Cross-platform abstraction layer umbrella header for ascii-chat

Definition in file abstraction.h.