code: plan9front

Download patch

ref: 18b3847aef8428503b8889b3a986d38e5e6ed584
parent: 682414ce0d8245bef6c09d9e7ca015331a5ddd35
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed May 12 18:24:36 EDT 2021

devvmx: remove unncessary locking in gotcmd() sleep test function

--- a/sys/src/9/pc/devvmx.c
+++ b/sys/src/9/pc/devvmx.c
@@ -1522,14 +1522,8 @@
 static int
 gotcmd(void *vmxp)
 {
-	int rc;
-	Vmx *vmx;
-
-	vmx = vmxp;
-	ilock(&vmx->cmdlock);
-	rc = vmx->firstcmd != nil;
-	iunlock(&vmx->cmdlock);
-	return rc;
+	Vmx *vmx = vmxp;
+	return vmx->firstcmd != nil;
 }
 
 static void