Subversion Repositories HelenOS-historic

Rev

Rev 1200 | Rev 1702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1200 Rev 1251
Line 30... Line 30...
30
#define __BITMAP_H__
30
#define __BITMAP_H__
31
 
31
 
32
#include <arch/types.h>
32
#include <arch/types.h>
33
#include <typedefs.h>
33
#include <typedefs.h>
34
 
34
 
35
#define BITS2BYTES(bits)    ((((bits)-1)>>3)+1)
35
#define BITS2BYTES(bits)    (bits ? ((((bits)-1)>>3)+1) : 0)
36
 
36
 
37
typedef struct {
37
typedef struct {
38
    __u8 *map;
38
    __u8 *map;
39
    count_t bits;
39
    count_t bits;
40
} bitmap_t;
40
} bitmap_t;