hai provato con pthread_setschedprio?