+//Mutex that ensures proper serialization of (un)pause calls
+//pthread_mutex_t pthread_pause_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+
+//Semaphore that ensures proper serialization of (un)pause signals
+sem_t pthread_pause_sem;
+//Once control to init the semaphore (and possibly other stuff)
+pthread_once_t pthread_pause_once_ctrl = PTHREAD_ONCE_INIT;
+void pthread_pause_once(void) {
+ sem_init(&pthread_pause_sem, 0, 1);
+}
+void pthread_pause_init() { pthread_once(&pthread_pause_once_ctrl, &pthread_pause_once); }
+