src/intel: use new hash table and set creation helpers
Replace calls to create hash tables and sets that use _mesa_hash_pointer/_mesa_key_pointer_equal with the helpers _mesa_pointer_hash_table_create() and _mesa_pointer_set_create(). Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Eric Engestrom <eric@engestrom.ch>
This commit is contained in:
@@ -110,8 +110,7 @@ add_drm_fd(int fd)
|
||||
{
|
||||
struct refcnt_hash_table *r = malloc(sizeof(*r));
|
||||
r->refcnt = 1;
|
||||
r->t = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
|
||||
_mesa_key_pointer_equal);
|
||||
r->t = _mesa_pointer_hash_table_create(NULL);
|
||||
_mesa_hash_table_insert(fds_to_bo_sizes, (void*)(uintptr_t)fd,
|
||||
(void*)(uintptr_t)r);
|
||||
}
|
||||
@@ -426,8 +425,7 @@ ioctl(int fd, unsigned long request, ...)
|
||||
static void __attribute__ ((constructor))
|
||||
init(void)
|
||||
{
|
||||
fds_to_bo_sizes = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
|
||||
_mesa_key_pointer_equal);
|
||||
fds_to_bo_sizes = _mesa_pointer_hash_table_create(NULL);
|
||||
libc_open = dlsym(RTLD_NEXT, "open");
|
||||
libc_close = dlsym(RTLD_NEXT, "close");
|
||||
libc_fcntl = dlsym(RTLD_NEXT, "fcntl");
|
||||
|
||||
Reference in New Issue
Block a user