aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2020-06-05 10:22:47 +0200
committerMarge Bot <[email protected]>2020-06-18 02:09:56 +0000
commit9ca2a4e6fc9d059a024ba8da20891ccf79ba659d (patch)
tree571a9fa020e30e677ea279b692c0eb77d6c3fd9e /src/gallium
parentbd5cf70d3db711c31a2f2fca4eb05e20c185e38c (diff)
freedreno: replace all dup() with os_dupfd_cloexec()
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_fence.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_fence.c b/src/gallium/drivers/freedreno/freedreno_fence.c
index 71472da704a..59ea1896f45 100644
--- a/src/gallium/drivers/freedreno/freedreno_fence.c
+++ b/src/gallium/drivers/freedreno/freedreno_fence.c
@@ -26,6 +26,7 @@
#include <libsync.h>
+#include "util/os_file.h"
#include "util/u_inlines.h"
#include "freedreno_fence.h"
@@ -122,7 +123,7 @@ void fd_create_fence_fd(struct pipe_context *pctx,
enum pipe_fd_type type)
{
assert(type == PIPE_FD_TYPE_NATIVE_SYNC);
- *pfence = fence_create(fd_context(pctx), NULL, 0, dup(fd));
+ *pfence = fence_create(fd_context(pctx), NULL, 0, os_dupfd_cloexec(fd));
}
void fd_fence_server_sync(struct pipe_context *pctx,
@@ -146,7 +147,7 @@ int fd_fence_get_fd(struct pipe_screen *pscreen,
struct pipe_fence_handle *fence)
{
fence_flush(fence);
- return dup(fence->fence_fd);
+ return os_dupfd_cloexec(fence->fence_fd);
}
struct pipe_fence_handle * fd_fence_create(struct fd_batch *batch)