pkgsrc/benchmarks/libmicro/patches/patch-ac
jym 2367213831 Import libMicro 0.4.0.
LibMicro is a portable set of microbenchmarks that many Solaris engineers
used during Solaris 10 development to measure the performance of various
system and library calls. LibMicro was developed by Bart Smaalders and
Phil Harman as part of their "If Linux is faster it's a Solaris bug
performance" campaign.
2009-11-22 00:45:54 +00:00

42 lines
1 KiB
Text

$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);