summaryrefslogtreecommitdiff
path: root/benchmarks/libmicro/files/patch-cascade__mutex.c
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2016-07-27 15:09:11 +0000
committerMathieu Arnold <mat@FreeBSD.org>2016-07-27 15:09:11 +0000
commit56bf85096cc89f91d28671b5d93b4172240263bc (patch)
tree0574ce9eee45d627f943b80b2445882a762b52af /benchmarks/libmicro/files/patch-cascade__mutex.c
parentAdd new port -- Rounded Mgen+ Japanese TrueType fonts (diff)
Cleanup patches, category benchmarks
Rename them to follow the make makepatch naming, and regenerate them. With hat: portmgr Sponsored by: Absolight
Diffstat (limited to 'benchmarks/libmicro/files/patch-cascade__mutex.c')
-rw-r--r--benchmarks/libmicro/files/patch-cascade__mutex.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/benchmarks/libmicro/files/patch-cascade__mutex.c b/benchmarks/libmicro/files/patch-cascade__mutex.c
new file mode 100644
index 000000000000..f4867a3328bd
--- /dev/null
+++ b/benchmarks/libmicro/files/patch-cascade__mutex.c
@@ -0,0 +1,36 @@
+--- cascade_mutex.c.orig 2011-05-11 00:58:23 UTC
++++ cascade_mutex.c
+@@ -79,7 +79,6 @@ benchmark_init()
+ lm_defN = "cscd_mutex";
+
+ (void) sprintf(lm_usage,
+- " [-s] (force PTHREAD_PROCESS_SHARED)\n"
+ "notes: thread cascade using pthread_mutexes\n");
+
+ return (0);
+@@ -90,9 +89,6 @@ int
+ benchmark_optswitch(int opt, char *optarg)
+ {
+ switch (opt) {
+- case 's':
+- opts = 1;
+- break;
+ default:
+ return (-1);
+ }
+@@ -119,6 +115,7 @@ benchmark_initrun()
+ }
+
+ (void) pthread_mutexattr_init(&ma);
++#if !defined(__FreeBSD__)
+ if (lm_optP > 1 || opts) {
+ (void) pthread_mutexattr_setpshared(&ma,
+ PTHREAD_PROCESS_SHARED);
+@@ -126,6 +123,7 @@ benchmark_initrun()
+ (void) pthread_mutexattr_setpshared(&ma,
+ PTHREAD_PROCESS_PRIVATE);
+ }
++#endif
+
+ for (i = 0; i < nlocks; i++) {
+ (void) pthread_mutex_init(&locks[i], &ma);