Add README.md for each library module documenting API, platform backends, and usage. Add .gitignore for build artifacts. Remove pre-built binaries from version control. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
50 lines
1.5 KiB
Markdown
50 lines
1.5 KiB
Markdown
# libsst-os
|
|
|
|
Cross-platform operating system abstractions in C.
|
|
|
|
## Subsystems
|
|
|
|
### Memory (`SST_Alloc`, `SST_SysMem`)
|
|
- Aligned allocation/free, safe malloc/realloc with overflow checking
|
|
- Page-level allocation, protection (`R/W/X`), and size queries
|
|
|
|
### File I/O (`SST_File`)
|
|
- Open, read, write, seek, flush, close
|
|
- Async and sequential/random hints
|
|
|
|
### File system (`SST_FileSys`)
|
|
- Directory listing, create, remove
|
|
|
|
### Memory-mapped files (`SST_Mmap`)
|
|
- Create/destroy mappings, sync to disk
|
|
|
|
### Dynamic libraries (`SST_DynLib`)
|
|
- Load, symbol lookup, close
|
|
- OS-specific name generation (`.dll` / `.so` / `.dylib`)
|
|
|
|
### CPU info (`SST_CPU`, `SST_CPUCache`)
|
|
- Physical/logical CPU counts, affinity get/set
|
|
- Cache line size, data cache flush, instruction cache invalidate
|
|
- Cache ops in per-architecture assembly (x86, ARM, IA-64, MIPS, PPC, SPARC)
|
|
|
|
### Timing (`SST_Time`)
|
|
- Microsecond, millisecond, and floating-point second resolution
|
|
|
|
### Endian (`SST_Endian`)
|
|
- Byte-swap 16/32/64, host-to-BE/LE conversion macros
|
|
|
|
### User info (`SST_User`)
|
|
- Username, real name, home directory
|
|
|
|
### Safe arithmetic (`SST_SafeArithmetic`)
|
|
- Overflow-checked add/multiply for all integer widths
|
|
|
|
### Assertions (`SST_Assert`)
|
|
- Debug and runtime assertion macros with pluggable handlers
|
|
|
|
## Platform backends
|
|
|
|
Each subsystem has separate `_Win32.c` and `_POSIX.c` implementations, with
|
|
additional Solaris and macOS variants where needed. CPU cache operations are
|
|
in per-architecture assembly files.
|