src/server/twitmanager.c
static inline void acquire_twitmanager( struct twitmanager * restrict tm ){
	assert( tm != NULL );

	while ( pthread_mutex_lock( &tm->tm_critical_lock ) ){ continue; }
	while ( tm->tm_is_critical ){
		while ( pthread_cond_wait( &tm->tm_critical_cond, &tm->tm_critical_lock ) ){ continue; }
	}
	tm->tm_is_critical = 1;
	while ( pthread_mutex_unlock( &tm->tm_critical_unlock ) ){ continue; }

	return ;
}
// Lock (acquire) the manager for a thread
Lock (acquire) the manager for a thread
Lock ( acquire ) the manager for a thread
static inline void acquire_twitmanager( struct twitmanager * restrict tm ){
	assert( tm != NULL );
	while ( pthread_mutex_lock( &tm->tm_critical_lock ) ){ continue; }
	while ( tm->tm_is_critical ){
		while ( pthread_cond_wait( &tm->tm_critical_cond, &tm->tm_critical_lock ) ){ continue; }
	}
	tm->tm_is_critical = 1;
	while ( pthread_mutex_unlock( &tm->tm_critical_unlock ) ){ continue; }
	return ;
}
static inline void acquire_twitmanager ( struct twitmanager * restrict tm ) { assert ( tm != NULL ) ; while ( pthread_mutex_lock ( & tm -> tm_critical_lock ) ) { continue ; } while ( tm -> tm_is_critical ) { while ( pthread_cond_wait ( & tm -> tm_critical_cond , & tm -> tm_critical_lock ) ) { continue ; } } tm -> tm_is_critical = 1 ; while ( pthread_mutex_unlock ( & tm -> tm_critical_unlock ) ) { continue ; } return ; }
Lock (acquire) the manager for a thread
Lock ( acquire ) the manager for a thread