1 /* 2 $Id$ 3 4 Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org> 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 21 /* sector allocation management */ 22 23 #ifndef _SALLOC_H_ 24 #define _SALLOC_H_ 25 26 #include <libvcd/types.h> 27 28 #define SECTOR_NIL ((uint32_t)(-1)) 29 30 typedef struct _VcdSalloc VcdSalloc; 31 32 VcdSalloc * 33 _vcd_salloc_new (void); 34 35 void 36 _vcd_salloc_destroy (VcdSalloc *bitmap); 37 38 uint32_t 39 _vcd_salloc (VcdSalloc *bitmap, uint32_t hint, uint32_t size); 40 41 void 42 _vcd_salloc_free (VcdSalloc *bitmap, uint32_t sec, uint32_t size); 43 44 uint32_t 45 _vcd_salloc_get_highest (const VcdSalloc *bitmap); 46 47 #endif /* _SALLOC_H_ */ 48 49 50 /* 51 * Local variables: 52 * c-file-style: "gnu" 53 * tab-width: 8 54 * indent-tabs-mode: nil 55 * End: 56 */ 57