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