if (destroy && dev_tab)
util_hash_table_remove(dev_tab, ws->dev);
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
return destroy;
}
* for the same fd. */
r = amdgpu_device_initialize(fd, &drm_major, &drm_minor, &dev);
if (r) {
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
fprintf(stderr, "amdgpu: amdgpu_device_initialize failed.\n");
return NULL;
}
ws = util_hash_table_get(dev_tab, dev);
if (ws) {
pipe_reference(NULL, &ws->reference);
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
return &ws->base;
}
if (!util_queue_init(&ws->cs_queue, "amdgpu_cs", 8, 1)) {
amdgpu_winsys_destroy(&ws->base);
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
return NULL;
}
ws->base.screen = screen_create(&ws->base);
if (!ws->base.screen) {
amdgpu_winsys_destroy(&ws->base);
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
return NULL;
}
/* We must unlock the mutex once the winsys is fully initialized, so that
* other threads attempting to create the winsys from the same fd will
* get a fully initialized winsys and not just half-way initialized. */
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
return &ws->base;
fail_alloc:
FREE(ws);
fail:
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
return NULL;
}