diff options
author | Jon Smirl <jonsmirl@yahoo.com> | 2004-09-30 21:12:10 +0000 |
---|---|---|
committer | Jon Smirl <jonsmirl@yahoo.com> | 2004-09-30 21:12:10 +0000 |
commit | 9f9a8f1382711a05ec000b639d971b619d8bc305 (patch) | |
tree | a7ee85ea5c3077310731d7d9b038de60e79eb4ee /shared-core/via_ds.h | |
parent | 368493edc9e47ce63edf955e9fa9d096500c4e8e (diff) |
Lindent of core build. Drivers checked for no binary diffs. A few files
weren't Lindent's because their comments didn't convert very well. A
bunch of other minor clean up with no code implact included.
Diffstat (limited to 'shared-core/via_ds.h')
-rw-r--r-- | shared-core/via_ds.h | 61 |
1 files changed, 33 insertions, 28 deletions
diff --git a/shared-core/via_ds.h b/shared-core/via_ds.h index d9a60186..bd2f07ca 100644 --- a/shared-core/via_ds.h +++ b/shared-core/via_ds.h @@ -23,7 +23,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#ifndef _via_ds_h_ +#ifndef _via_ds_h_ #define _via_ds_h_ #include "drmP.h" @@ -33,37 +33,36 @@ typedef unsigned int ITEM_TYPE; typedef struct { - ITEM_TYPE val; - int alloc_next, free_next; + ITEM_TYPE val; + int alloc_next, free_next; } list_item_t; typedef struct { - int alloc; - int free; - int trace; - list_item_t list[SET_SIZE]; + int alloc; + int free; + int trace; + list_item_t list[SET_SIZE]; } set_t; set_t *via_setInit(void); -int via_setAdd(set_t *set, ITEM_TYPE item); -int via_setDel(set_t *set, ITEM_TYPE item); -int via_setFirst(set_t *set, ITEM_TYPE *item); -int via_setNext(set_t *set, ITEM_TYPE *item); -int via_setDestroy(set_t *set); +int via_setAdd(set_t * set, ITEM_TYPE item); +int via_setDel(set_t * set, ITEM_TYPE item); +int via_setFirst(set_t * set, ITEM_TYPE * item); +int via_setNext(set_t * set, ITEM_TYPE * item); +int via_setDestroy(set_t * set); #endif - #ifndef MM_INC #define MM_INC struct mem_block_t { - struct mem_block_t *next; - struct mem_block_t *heap; - int ofs,size; - int align; - int free:1; - int reserved:1; + struct mem_block_t *next; + struct mem_block_t *heap; + int ofs, size; + int align; + int free:1; + int reserved:1; }; typedef struct mem_block_t TMemBlock; typedef struct mem_block_t *PMemBlock; @@ -72,36 +71,42 @@ typedef struct mem_block_t *PMemBlock; typedef struct mem_block_t memHeap_t; static __inline__ int mmBlockSize(PMemBlock b) -{ return b->size; } +{ + return b->size; +} static __inline__ int mmOffset(PMemBlock b) -{ return b->ofs; } +{ + return b->ofs; +} static __inline__ void mmMarkReserved(PMemBlock b) -{ b->reserved = 1; } +{ + b->reserved = 1; +} -/* +/* * input: total size in bytes * return: a heap pointer if OK, NULL if error */ memHeap_t *via_mmInit(int ofs, int size); - -PMemBlock via_mmAllocMem(memHeap_t *heap, int size, int align2, int startSearch); +PMemBlock via_mmAllocMem(memHeap_t * heap, int size, int align2, + int startSearch); /* * Free block starts at offset * input: pointer to a block * return: 0 if OK, -1 if error */ -int via_mmFreeMem(PMemBlock b); +int via_mmFreeMem(PMemBlock b); /* * destroy MM */ -void via_mmDestroy(memHeap_t *mmInit); +void via_mmDestroy(memHeap_t * mmInit); /* For debugging purpose. */ -void via_mmDumpMemInfo(memHeap_t *mmInit); +void via_mmDumpMemInfo(memHeap_t * mmInit); #endif |