1/* 2 * Bitfield 3 * Copyright (c) 2013, Jouni Malinen <j@w1.fi> 4 * 5 * This software may be distributed under the terms of the BSD license. 6 * See README for more details. 7 */ 8 9#ifndef BITFIELD_H 10#define BITFIELD_H 11 12struct bitfield; 13 14struct bitfield * bitfield_alloc(size_t max_bits); 15void bitfield_free(struct bitfield *bf); 16void bitfield_set(struct bitfield *bf, size_t bit); 17void bitfield_clear(struct bitfield *bf, size_t bit); 18int bitfield_is_set(struct bitfield *bf, size_t bit); 19int bitfield_get_first_zero(struct bitfield *bf); 20 21#endif /* BITFIELD_H */ 22