1 |
|
/* |
2 |
|
* ether_unix.cpp - Ethernet device driver, Unix specific stuff (Linux and FreeBSD) |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-2001 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2004 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
79 |
|
return false; |
80 |
|
} |
81 |
|
|
82 |
< |
pthread_attr_init(ðer_thread_attr); |
83 |
< |
#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) |
84 |
< |
if (geteuid() == 0) { |
85 |
< |
pthread_attr_setinheritsched(ðer_thread_attr, PTHREAD_EXPLICIT_SCHED); |
86 |
< |
pthread_attr_setschedpolicy(ðer_thread_attr, SCHED_FIFO); |
87 |
< |
struct sched_param fifo_param; |
88 |
< |
fifo_param.sched_priority = (sched_get_priority_min(SCHED_FIFO) + sched_get_priority_max(SCHED_FIFO)) / 2 + 1; |
89 |
< |
pthread_attr_setschedparam(ðer_thread_attr, &fifo_param); |
90 |
< |
} |
91 |
< |
#endif |
92 |
< |
|
82 |
> |
Set_pthread_attr(ðer_thread_attr, 1); |
83 |
|
thread_active = (pthread_create(ðer_thread, ðer_thread_attr, receive_func, NULL) == 0); |
84 |
|
if (!thread_active) { |
85 |
|
printf("WARNING: Cannot start Ethernet thread"); |