radv: set writes_memory for global memory stores/atomics
[mesa.git] / src / mesa / main / mm.c
index 25a0293703cce88ee291ec6f01a063ca9501be33..5f0bfe96911ad31c850f37196c4e9ab40fc86561 100644 (file)
@@ -26,7 +26,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "compiler.h"
 #include "mm.h"
 
 
@@ -65,11 +64,11 @@ mmInit(unsigned ofs, unsigned size)
    if (!size) 
       return NULL;
 
-   heap = (struct mem_block *) calloc(1, sizeof(struct mem_block));
+   heap = calloc(1, sizeof(struct mem_block));
    if (!heap) 
       return NULL;
    
-   block = (struct mem_block *) calloc(1, sizeof(struct mem_block));
+   block = calloc(1, sizeof(struct mem_block));
    if (!block) {
       free(heap);
       return NULL;
@@ -103,7 +102,7 @@ SliceBlock(struct mem_block *p,
 
    /* break left  [p, newblock, p->next], then p = newblock */
    if (startofs > p->ofs) {
-      newblock = (struct mem_block*) calloc(1, sizeof(struct mem_block));
+      newblock = calloc(1, sizeof(struct mem_block));
       if (!newblock)
         return NULL;
       newblock->ofs = startofs;
@@ -127,7 +126,7 @@ SliceBlock(struct mem_block *p,
 
    /* break right, also [p, newblock, p->next] */
    if (size < p->size) {
-      newblock = (struct mem_block*) calloc(1, sizeof(struct mem_block));
+      newblock = calloc(1, sizeof(struct mem_block));
       if (!newblock)
         return NULL;
       newblock->ofs = startofs + size;
@@ -211,7 +210,7 @@ mmFindBlock(struct mem_block *heap, unsigned start)
 }
 
 
-static INLINE int
+static inline int
 Join2Blocks(struct mem_block *p)
 {
    /* XXX there should be some assertions here */