| 4660 | |
| 4661 | |
| 4662 | void emulatorThread_t::init(void) |
| 4663 | { |
| 4664 | int opt; |
| 4665 | |
| 4666 | #if defined(__linux__) || defined(__APPLE__) || defined(__unix__) |
| 4667 | if ( pthread_self() == (pthread_t)QThread::currentThreadId() ) |
| 4668 | { |
| 4669 | pself = pthread_self(); |
| 4670 | //printf("EMU is using PThread: %p\n", (void*)pself); |
| 4671 | } |
| 4672 | #endif |
| 4673 | |
| 4674 | #if defined(__linux__) |
| 4675 | pid = gettid(); |
| 4676 | #elif defined(__APPLE__) || defined(__unix__) |
| 4677 | pid = getpid(); |
| 4678 | #endif |
| 4679 | |
| 4680 | g_config->getOption( "SDL.SetSchedParam", &opt ); |
| 4681 | |
| 4682 | if ( opt ) |
| 4683 | { |
| 4684 | #ifndef WIN32 |
| 4685 | int policy, prio, nice; |
| 4686 | |
| 4687 | g_config->getOption( "SDL.EmuSchedPolicy", &policy ); |
| 4688 | g_config->getOption( "SDL.EmuSchedPrioRt", &prio ); |
| 4689 | g_config->getOption( "SDL.EmuSchedNice" , &nice ); |
| 4690 | |
| 4691 | setNicePriority( nice ); |
| 4692 | |
| 4693 | setSchedParam( policy, prio ); |
| 4694 | #endif |
| 4695 | } |
| 4696 | } |
| 4697 | |
| 4698 | void emulatorThread_t::setPriority( QThread::Priority priority_req ) |
| 4699 | { |
no test coverage detected