XenevaOS
Loading...
Searching...
No Matches
Macros
bitmap.h File Reference
#include <linux/kernel.h>
#include <linux/bitops.h>
Include dependency graph for bitmap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define test_and_set_bit(nr, addr)    ({int __old = test_bit(nr, addr); set_bit(nr, addr); __old; })
 
#define test_and_clear_bit(nr, addr)    ({ int __old = test_bit(nr, addr); clear_bit(nr,addr); __old;})
 
#define bitmap_zero(dst, nbits)    memset(dst, 0, BITS_TO_LONGS(nbits) * sizeof(unsigned long))
 
#define bitmap_copy(dst, src, nbits)    memcpy(dst, src, BITS_TO_LONGS(nbits) * sizeof(unsigned long))
 

Macro Definition Documentation

◆ bitmap_copy

#define bitmap_copy (   dst,
  src,
  nbits 
)     memcpy(dst, src, BITS_TO_LONGS(nbits) * sizeof(unsigned long))

◆ bitmap_zero

#define bitmap_zero (   dst,
  nbits 
)     memset(dst, 0, BITS_TO_LONGS(nbits) * sizeof(unsigned long))

◆ test_and_clear_bit

#define test_and_clear_bit (   nr,
  addr 
)     ({ int __old = test_bit(nr, addr); clear_bit(nr,addr); __old;})

◆ test_and_set_bit

#define test_and_set_bit (   nr,
  addr 
)     ({int __old = test_bit(nr, addr); set_bit(nr, addr); __old; })