group/pintos/src/lib/kernel/bitmap.c
/* Returns a bit mask in which the bits actually used in the last
   element of B's bits are set to 1 and the rest are set to 0. */
Returns a bit mask in which the bits actually used in the last
element of B's bits are set to 1 and the rest are set to 0.
Returns a bit mask in which the bits actually used in the last element of B ' s bits are set to 1 and the rest are set to 0 .
static inline elem_type
last_mask (const struct bitmap *b)
{
  int last_bits = b->bit_cnt % ELEM_BITS;
  return last_bits ? ((elem_type) 1 << last_bits) - 1 : (elem_type) -1;
}
static inline elem_type last_mask ( const struct bitmap * b ) { int last_bits = b -> bit_cnt % ELEM_BITS ; return last_bits ? ( ( elem_type ) 1 << last_bits ) - 1 : ( elem_type ) - 1 ; }
Returns a bit mask in which the bits actually used in the last
element of B's bits are set to 1 and the rest are set to 0.
Returns a bit mask in which the bits actually used in the last element of B ' s bits are set to 1 and the rest are set to 0 .