GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / staging / tidspbridge / include / dspbridge / gb.h
blobfda783aa160ca557b51b952d647e62bd2d83b7ad
1 /*
2 * gb.h
4 * DSP-BIOS Bridge driver support functions for TI OMAP processors.
6 * Generic bitmap manager.
8 * Copyright (C) 2005-2006 Texas Instruments, Inc.
10 * This package is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
14 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 #ifndef GB_
20 #define GB_
22 #define GB_NOBITS (~0)
23 #include <dspbridge/host_os.h>
25 struct gb_t_map;
28 * ======== gb_clear ========
29 * Clear the bit in position bitn in the bitmap map. Bit positions are
30 * zero based.
33 extern void gb_clear(struct gb_t_map *map, u32 bitn);
36 * ======== gb_create ========
37 * Create a bit map with len bits. Initially all bits are cleared.
40 extern struct gb_t_map *gb_create(u32 len);
43 * ======== gb_delete ========
44 * Delete previously created bit map
47 extern void gb_delete(struct gb_t_map *map);
50 * ======== gb_findandset ========
51 * Finds a clear bit, sets it, and returns the position
54 extern u32 gb_findandset(struct gb_t_map *map);
57 * ======== gb_minclear ========
58 * gb_minclear returns the minimum clear bit position. If no bit is
59 * clear, gb_minclear returns -1.
61 extern u32 gb_minclear(struct gb_t_map *map);
64 * ======== gb_set ========
65 * Set the bit in position bitn in the bitmap map. Bit positions are
66 * zero based.
69 extern void gb_set(struct gb_t_map *map, u32 bitn);
72 * ======== gb_test ========
73 * Returns TRUE if the bit in position bitn is set in map; otherwise
74 * gb_test returns FALSE. Bit positions are zero based.
77 extern bool gb_test(struct gb_t_map *map, u32 bitn);
79 #endif /*GB_ */