From: Jorrit Herder Date: Mon, 20 Jun 2005 14:29:09 +0000 (+0000) Subject: New bit map manipulation header. X-Git-Tag: v3.1.0~719 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/cppcheck-error.log?a=commitdiff_plain;h=d78cf7fbafefa9f43a3e4b55b3bef20c4eafa8f5;p=minix.git New bit map manipulation header. General purpose. --- diff --git a/include/minix/bitmap.h b/include/minix/bitmap.h new file mode 100644 index 000000000..47da1283f --- /dev/null +++ b/include/minix/bitmap.h @@ -0,0 +1,11 @@ +#ifndef _BITMAP_H +#define _BITMAP_H + +/* Bit map operations to manipulate bits of a simple mask variable. */ +#define bit_set(mask, n) ((mask) |= (1 << (n))) +#define bit_unset(mask, n) ((mask) &= ~(1 << (n))) +#define bit_isset(mask, n) ((mask) & (1 << (n))) +#define bit_empty(mask) ((mask) = 0) +#define bit_fill(mask) ((mask) = ~0) + +#endif /* _BITMAP_H */