Change list_elem from typedef to struct.
[pintos-anon] / src / lib / kernel / bitmap.c
index 88a5e7e584828188be569b5b701253ab81df51a9..abbb85ddec2cf945b2e51ac4c28c16a5ca3efd94 100644 (file)
@@ -156,7 +156,7 @@ bitmap_mark (struct bitmap *b, size_t bit_idx)
   /* This is equivalent to `b->bits[idx] |= mask' except that it
      is guaranteed to be atomic on a uniprocessor machine.  See
      the description of the OR instruction in [IA32-v2b]. */
-  asm ("orl %1, %0" : "=m" (b->bits[idx]) : "r" (mask) : "cc");
+  asm ("or %0, %1" : "=m" (b->bits[idx]) : "r" (mask) : "cc");
 }
 
 /* Atomically sets the bit numbered BIT_IDX in B to false. */
@@ -164,12 +164,12 @@ void
 bitmap_reset (struct bitmap *b, size_t bit_idx) 
 {
   size_t idx = elem_idx (bit_idx);
-  elem_type mask = bit_mask (idx);
+  elem_type mask = bit_mask (bit_idx);
 
   /* This is equivalent to `b->bits[idx] &= ~mask' except that it
      is guaranteed to be atomic on a uniprocessor machine.  See
      the description of the AND instruction in [IA32-v2a]. */
-  asm ("andl %1, %0" : "=m" (b->bits[idx]) : "r" (~mask) : "cc");
+  asm ("and %0, %1" : "=m" (b->bits[idx]) : "r" (~mask) : "cc");
 }
 
 /* Atomically toggles the bit numbered IDX in B;
@@ -179,12 +179,12 @@ void
 bitmap_flip (struct bitmap *b, size_t bit_idx) 
 {
   size_t idx = elem_idx (bit_idx);
-  elem_type mask = bit_mask (idx);
+  elem_type mask = bit_mask (bit_idx);
 
   /* This is equivalent to `b->bits[idx] ^= mask' except that it
      is guaranteed to be atomic on a uniprocessor machine.  See
      the description of the XOR instruction in [IA32-v2b]. */
-  asm ("xorl %1, %0" : "=m" (b->bits[idx]) : "r" (mask) : "cc");
+  asm ("xor %0, %1" : "=m" (b->bits[idx]) : "r" (mask) : "cc");
 }
 
 /* Returns the value of the bit numbered IDX in B. */