67 |
|
fd = -1; |
68 |
|
input_thread_active = output_thread_active = false; |
69 |
|
|
70 |
< |
pthread_attr_init(&thread_attr); |
71 |
< |
#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) |
72 |
< |
if (geteuid() == 0) { |
73 |
< |
pthread_attr_setinheritsched(&thread_attr, PTHREAD_EXPLICIT_SCHED); |
74 |
< |
pthread_attr_setschedpolicy(&thread_attr, SCHED_FIFO); |
75 |
< |
struct sched_param fifo_param; |
76 |
< |
fifo_param.sched_priority = (sched_get_priority_min(SCHED_FIFO) + sched_get_priority_max(SCHED_FIFO)) / 2 + 2; |
77 |
< |
pthread_attr_setschedparam(&thread_attr, &fifo_param); |
78 |
< |
} |
79 |
< |
#endif |
70 |
> |
Set_pthread_attr(&thread_attr, 2); |
71 |
|
} |
72 |
|
|
73 |
|
virtual ~XSERDPort() |