diff options
Diffstat (limited to 'libgo/go/sync/runtime_sema_test.go')
-rw-r--r-- | libgo/go/sync/runtime_sema_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libgo/go/sync/runtime_sema_test.go b/libgo/go/sync/runtime_sema_test.go index 5b7dd3df3f..a2382f4655 100644 --- a/libgo/go/sync/runtime_sema_test.go +++ b/libgo/go/sync/runtime_sema_test.go @@ -25,6 +25,9 @@ func BenchmarkSemaUncontended(b *testing.B) { } func benchmarkSema(b *testing.B, block, work bool) { + if b.N == 0 { + return + } sem := uint32(0) if block { done := make(chan bool) |