On an Intel i7-13620H, running Linux 6.12.52-lts and gcc 15.2.1 without sanitizers:
$ ./umonitor-umwait-semaphore 16 3
Semaphore initialized with count = 3.
Spawning 16 worker threads...
Main thread: Releasing an additional permit after some time.
All workers finished.