libdpf/thirdparty/portable-snippets/once
Ryan Henry e4e666f459 Initial import of libdpf.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 14:08:32 -06:00
..
once.h Initial import of libdpf. 2026-09-24 14:08:32 -06:00
README.md Initial import of libdpf. 2026-09-24 14:08:32 -06:00

Once

This is a simple abstraction for a once which will choose from a few different back-ends:

  • If C11 threads are available, use call_once().
  • On Windows, use InitOnceExecuteOnce()
  • If PTHREAD_ONCE_INIT is defined (i.e., if <pthread.h> has been included prior to including once.h), use pthread_once().
  • Use [atomic.h](../atomic).