summaryrefslogtreecommitdiff
path: root/benchmarks/libmicro/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/libmicro/patches/patch-ac')
-rw-r--r--benchmarks/libmicro/patches/patch-ac42
1 files changed, 42 insertions, 0 deletions
diff --git a/benchmarks/libmicro/patches/patch-ac b/benchmarks/libmicro/patches/patch-ac
new file mode 100644
index 00000000000..f803c7ce46c
--- /dev/null
+++ b/benchmarks/libmicro/patches/patch-ac
@@ -0,0 +1,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);