There are lots of articles/questions over the internet about the difference of semaphore and mutex, but is it a good approach to use both mutex and semaphore in a thread function?
Something like this (In C)
pthread_mutex_lock(&mutex);
//(Access to critical section)
sem_wait(&sem);
pthread_mutex_unlock(&mutex);