svn commit: r244733 - head/sys/sys

Attilio Rao attilio at FreeBSD.org
Thu Dec 27 12:53:47 UTC 2012


Author: attilio
Date: Thu Dec 27 12:53:46 2012
New Revision: 244733
URL: http://svnweb.freebsd.org/changeset/base/244733

Log:
  Remove an unused var.
  
  Sponsored by:	EMC / Isilon storage division
  MFC after:	3 days

Modified:
  head/sys/sys/buf_ring.h

Modified: head/sys/sys/buf_ring.h
==============================================================================
--- head/sys/sys/buf_ring.h	Thu Dec 27 12:36:58 2012	(r244732)
+++ head/sys/sys/buf_ring.h	Thu Dec 27 12:53:46 2012	(r244733)
@@ -77,7 +77,6 @@ buf_ring_enqueue(struct buf_ring *br, vo
 {
 	uint32_t prod_head, prod_next;
 	uint32_t cons_tail;
-	int success;
 #ifdef DEBUG_BUFRING
 	int i;
 	for (i = br->br_cons_head; i != br->br_prod_head;
@@ -98,10 +97,7 @@ buf_ring_enqueue(struct buf_ring *br, vo
 			critical_exit();
 			return (ENOBUFS);
 		}
-		
-		success = atomic_cmpset_int(&br->br_prod_head, prod_head,
-		    prod_next);
-	} while (success == 0);
+	} while (!atomic_cmpset_int(&br->br_prod_head, prod_head, prod_next));
 #ifdef DEBUG_BUFRING
 	if (br->br_ring[prod_head] != NULL)
 		panic("dangling value in enqueue");


More information about the svn-src-all mailing list