Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2008 16:58:06 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 132305 for review
Message-ID:  <200801021658.m02Gw6sd044244@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132305

Change 132305 by jhb@jhb_tool on 2008/01/02 16:57:28

	Create a spin lock instead of abusing sched_lock.

Affected files ...

.. //depot/projects/smpng/sys/modules/crash/crash.c#39 edit

Differences ...

==== //depot/projects/smpng/sys/modules/crash/crash.c#39 (text+ko) ====

@@ -830,7 +830,9 @@
 {
 
 	printf("Should panic\n");
-	if (mtx_trylock(&sched_lock))
+	bzero(&test1_mtx, sizeof(test1_mtx));
+	mtx_init(&test1_mtx, "test1", NULL, MTX_SPIN | MTX_RECURSE);
+	if (mtx_trylock(&test1_mtx))
 		printf("Hmm, locked!\n");
 	else
 		printf("Not locked\n");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801021658.m02Gw6sd044244>