| 8866 | } |
| 8867 | |
| 8868 | static void *alsaCallbackHandler(void *ptr) |
| 8869 | { |
| 8870 | CallbackInfo *info = (CallbackInfo *)ptr; |
| 8871 | RtApiAlsa *object = (RtApiAlsa *)info->object; |
| 8872 | bool *isRunning = &info->isRunning; |
| 8873 | |
| 8874 | #ifdef SCHED_RR // Undefined with some OSes (eg: NetBSD 1.6.x with GNU Pthread) |
| 8875 | if (info->doRealtime) |
| 8876 | { |
| 8877 | pthread_t tID = pthread_self(); // ID of this thread |
| 8878 | sched_param prio = {info->priority}; // scheduling priority of thread |
| 8879 | pthread_setschedparam(tID, SCHED_RR, &prio); |
| 8880 | } |
| 8881 | #endif |
| 8882 | |
| 8883 | while (*isRunning == true) |
| 8884 | { |
| 8885 | pthread_testcancel(); |
| 8886 | object->callbackEvent(); |
| 8887 | } |
| 8888 | |
| 8889 | pthread_exit(NULL); |
| 8890 | } |
| 8891 | |
| 8892 | //******************** End of __LINUX_ALSA__ *********************// |
| 8893 | #endif |
nothing calls this directly
no test coverage detected