#include "v3d_context.h"
#include "v3d_screen.h"
-#ifdef HAVE_VALGRIND
-#include <valgrind.h>
-#include <memcheck.h>
-#define VG(x) x
-#else
-#define VG(x)
-#endif
-
static bool dump_stats = false;
static void
struct timespec time;
clock_gettime(CLOCK_MONOTONIC, &time);
fprintf(stderr, " now: %ld\n",
- time.tv_sec);
+ (long)time.tv_sec);
}
}
strerror(errno));
free(bo->map);
free(bo);
- return NULL;
+ bo = NULL;
+ goto done;
}
bo->offset = get.offset;
assert(bo->offset != 0);
- util_hash_table_set(screen->bo_handles, (void *)(uintptr_t)handle, bo);
+ _mesa_hash_table_insert(screen->bo_handles, (void *)(uintptr_t)handle, bo);
screen->bo_count++;
screen->bo_size += bo->size;
mtx_lock(&bo->screen->bo_handles_mutex);
bo->private = false;
- util_hash_table_set(bo->screen->bo_handles, (void *)(uintptr_t)bo->handle, bo);
+ _mesa_hash_table_insert(bo->screen->bo_handles, (void *)(uintptr_t)bo->handle, bo);
mtx_unlock(&bo->screen->bo_handles_mutex);
return fd;