Lines 1-11
Link Here
|
1 |
--- record.c.orig Tue Nov 5 22:11:18 2002 |
1 |
--- record.c.orig Fri Nov 29 03:33:21 2002 |
2 |
+++ record.c Tue Nov 5 22:11:55 2002 |
2 |
+++ record.c Thu Sep 4 22:12:48 2003 |
3 |
@@ -317,7 +317,7 @@ |
3 |
@@ -185,6 +185,10 @@ |
4 |
} |
4 |
PTHREAD_CREATE_JOINABLE)) ) { |
|
|
5 |
err_die("BUG: pthread_attr_setdetachstate failed: %s\n", strerror(rtn)); |
6 |
} |
7 |
+ |
8 |
+/* This is ugly, but FreeBSD defines _POSIX_THREAD_PRIORITY_SCHEDULING |
9 |
+ but it does not support PTHREAD_SCOPE_SYSTEM |
10 |
+ |
11 |
#if defined (_POSIX_THREAD_PRIORITY_SCHEDULING) \ |
12 |
&& _POSIX_THREAD_PRIORITY_SCHEDULING != -1 \ |
13 |
&& _POSIX_THREAD_PRIORITY_SCHEDULING != 0 |
14 |
@@ -204,12 +208,17 @@ |
15 |
err_die("BUG: pthread_attr_setscope failed: %s\n", strerror(rtn)); |
16 |
} |
17 |
#endif |
18 |
+*/ |
19 |
if ( (rtn = pthread_attr_init(&move_fd_attr)) ) |
20 |
err_die("BUG: pthread_attr_init failed: %s\n", strerror(rtn)); |
21 |
if ( (rtn = pthread_attr_setdetachstate(&move_fd_attr, |
22 |
PTHREAD_CREATE_JOINABLE)) ) { |
23 |
err_die("BUG: pthread_attr_setdetachstate failed: %s\n", strerror(rtn)); |
24 |
} |
25 |
+ |
26 |
+/* This is ugly, but FreeBSD defines _POSIX_THREAD_PRIORITY_SCHEDULING |
27 |
+ but it does not support PTHREAD_SCOPE_SYSTEM |
28 |
+ |
29 |
#if defined (_POSIX_THREAD_PRIORITY_SCHEDULING) \ |
30 |
&& _POSIX_THREAD_PRIORITY_SCHEDULING != -1 \ |
31 |
&& _POSIX_THREAD_PRIORITY_SCHEDULING != 0 |
32 |
@@ -227,6 +236,7 @@ |
33 |
err_die("BUG: pthread_attr_setscope failed: %s\n", strerror(rtn)); |
34 |
} |
35 |
#endif |
36 |
+*/ |
5 |
|
37 |
|
6 |
/* Entering critical section. Lock down our memory, if possible. */ |
38 |
/* Getting ugly. Here we install a handler (which sets a global |
7 |
-#ifdef _POSIX_MEMLOCK |
39 |
flag which the threads can poll in order to do graceful |
8 |
+#if _POSIX_MEMLOCK == 1 |
|
|
9 |
if ( mlockall(MCL_CURRENT) == -1 ) { |
10 |
fprintf(stderr, "%s: mlockall(MCL_CURRENT) failed: ", progname); |
11 |
perror(""); |