Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/net/lib/libshmif Three cheers for the mighty C type...
details: https://anonhg.NetBSD.org/src/rev/f885b9c4df34
branches: trunk
changeset: 786540:f885b9c4df34
user: pooka <pooka%NetBSD.org@localhost>
date: Wed May 01 06:58:36 2013 +0000
description:
Three cheers for the mighty C type system that doesn't recognize the
difference between an enum and an integer. Due to wrong parameter order,
the lock backoff routine ended up sleeping 1 million seconds instead
of 1ms. On the plus side, we got some sort of idea how often the shmif
spinlock backoff routine is hit during a standard test run.
diffstat:
sys/rump/net/lib/libshmif/if_shmem.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 8309f84f8f4c -r f885b9c4df34 sys/rump/net/lib/libshmif/if_shmem.c
--- a/sys/rump/net/lib/libshmif/if_shmem.c Wed May 01 05:36:25 2013 +0000
+++ b/sys/rump/net/lib/libshmif/if_shmem.c Wed May 01 06:58:36 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_shmem.c,v 1.53 2013/04/30 00:03:54 pooka Exp $ */
+/* $NetBSD: if_shmem.c,v 1.54 2013/05/01 06:58:36 pooka Exp $ */
/*
* Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.53 2013/04/30 00:03:54 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.54 2013/05/01 06:58:36 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -135,8 +135,8 @@
LOCK_UNLOCKED, LOCK_LOCKED) == LOCK_LOCKED)) {
if (__predict_false(++i > LOCK_COOLDOWN)) {
/* wait 1ms */
- rumpuser_clock_sleep(0, 1000*1000,
- RUMPUSER_CLOCK_RELWALL);
+ rumpuser_clock_sleep(RUMPUSER_CLOCK_RELWALL,
+ 0, 1000*1000);
i = 0;
}
continue;
Home |
Main Index |
Thread Index |
Old Index