blob: e77dd6b2d750829fb360be567e66315e213fcb12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
$NetBSD: patch-ac,v 1.1.1.1 2003/04/11 11:59:56 rh Exp $
--- src/xitk/xine-toolkit/tips.c.orig Tue Mar 4 00:43:48 2003
+++ src/xitk/xine-toolkit/tips.c
@@ -240,12 +240,12 @@ static void *_tips_thread(void *data) {
/* Create a thread which will destroy the tips window */
{
pthread_attr_t pth_attrs;
-#if ! defined (__OpenBSD__)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
struct sched_param pth_params;
#endif
pthread_attr_init(&pth_attrs);
-#if ! defined (__OpenBSD__)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
pthread_attr_getschedparam(&pth_attrs, &pth_params);
pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
pthread_attr_setschedparam(&pth_attrs, &pth_params);
@@ -266,7 +266,7 @@ static void *_tips_thread(void *data) {
*/
void xitk_tips_create(xitk_widget_t *w) {
pthread_attr_t pth_attrs;
-#if ! defined (__OpenBSD__)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
struct sched_param pth_params;
#endif
tips_private_t *tp;
@@ -283,7 +283,7 @@ void xitk_tips_create(xitk_widget_t *w)
tp->w = w;
pthread_attr_init(&pth_attrs);
-#if ! defined (__OpenBSD__)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
pthread_attr_getschedparam(&pth_attrs, &pth_params);
pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
pthread_attr_setschedparam(&pth_attrs, &pth_params);
|