/*static char *SCCSID = "@(#)kutil.h	6.1 90/11/17";*/
/*	SCCSID=@(#)kutil.h	13.6 90/09/06	*/

/*
 * The following routines operate on bitmaps, accepting and returning
 * 0 based indices into the bitmap.  AllocBit sets the first free bit
 * and returns its index, returning -1 if no bit was available.  FreeBit
 * frees the specified bit.  HighestBit returns the index of the last
 * allocated bit, returning -1 if all bits are free.  AllocBitGroup finds
 * and allocates a group of cbGroup contiguous bits from the bitmap,
 * returning -1 if no such group could be found.
 */
extern int	AllocBit(ulong_t *pbm, int cbMap);
extern int	AllocBitGroup(ulong_t *pbm, int cbMap, int cbGroup);
extern void	FreeBit(ulong_t *pbm, int bitno);
extern int	HighestBit(ulong_t *pbm, int cbMap);

/*
 *  Miscellaneous routines
 */
extern ulong_t	xchg(ulong_t *pul, ulong_t val);
