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
38
39
40
41
42
|
$NetBSD: patch-ac,v 1.1.1.1 2009/11/22 00:45:54 jym Exp $
--- cascade_cond.c.orig 2009-11-14 23:56:51.000000000 +0100
+++ cascade_cond.c
@@ -83,7 +83,9 @@ benchmark_init()
(void) sprintf(lm_usage,
" [-o] (do signal outside mutex)\n"
+#if !defined(__NetBSD__)
" [-s] (force PTHREAD_PROCESS_SHARED)\n"
+#endif
"notes: thread cascade using pthread_conds\n");
return (0);
@@ -97,9 +99,11 @@ benchmark_optswitch(int opt, char *optar
case 'o':
opto = 1;
break;
+#if !defined(__NetBSD__)
case 's':
opts = 1;
break;
+#endif
default:
return (-1);
}
@@ -148,6 +152,7 @@ benchmark_initrun()
(void) pthread_mutexattr_init(&ma);
(void) pthread_condattr_init(&ca);
+#if !defined(__NetBSD__)
if (lm_optP > 1 || opts) {
(void) pthread_mutexattr_setpshared(&ma,
PTHREAD_PROCESS_SHARED);
@@ -159,6 +164,7 @@ benchmark_initrun()
(void) pthread_condattr_setpshared(&ca,
PTHREAD_PROCESS_PRIVATE);
}
+#endif
for (i = 0; i < nlocks; i++) {
(void) pthread_mutex_init(&mxs[i], &ma);
|