How air5005/usg works
usg is a general-purpose C library of sorting, synchronization, timing, and ring-buffer utilities; the README does not describe a larger application workflow. Callers use these APIs directly. The sampled bubble-sort implementation calls a swap helper; other module internals were not sampled, so their connections are not inferred.
Main entry points: bubble_sort.c Bubble sort · quick_sort.c Quick sort · usg_atomic.h Atomic operations · usg_spinlock.h Spinlock
Components 11
Sorting
- Bubble sort
libs/libalgo/bubble_sort.c - Quick sort
libs/libalgo/quick_sort.c
Synchronization
- Atomic operations
libs/liblock/usg_atomic.h - Spinlock
libs/liblock/usg_spinlock.h - Lock
libs/liblock/usg_lock.c - Read-write lock
libs/liblock/usg_rwlock.c
Cycle timing
- Cycle timing
libs/libcycles/usg_cycles.c
Ring buffer
- Ring buffer
libs/libring/usg_ring.c
Shared utilities
- Sort swap helpers
libs/libutil/usg_util.h - Common definitions
libs/include/usg_common.h
Other components
- Library caller
Connections 9
- Library caller → Bubble sort: uses
- Library caller → Quick sort: uses
- Library caller → Atomic operations: uses
- Library caller → Spinlock: uses
- Library caller → Lock: uses
- Library caller → Read-write lock: uses
- Library caller → Cycle timing: uses
- Library caller → Ring buffer: uses
- Bubble sort → Sort swap helpers: calls