Home
last modified time | relevance | path

Searched refs:fd_info (Results 1 – 13 of 13) sorted by relevance

/third_party/grpc/src/core/lib/iomgr/
Dwakeup_fd_pipe.cc36 static grpc_error* pipe_init(grpc_wakeup_fd* fd_info) { in pipe_init() argument
48 fd_info->read_fd = pipefd[0]; in pipe_init()
49 fd_info->write_fd = pipefd[1]; in pipe_init()
53 static grpc_error* pipe_consume(grpc_wakeup_fd* fd_info) { in pipe_consume() argument
58 r = read(fd_info->read_fd, buf, sizeof(buf)); in pipe_consume()
72 static grpc_error* pipe_wakeup(grpc_wakeup_fd* fd_info) { in pipe_wakeup() argument
74 while (write(fd_info->write_fd, &c, 1) != 1 && errno == EINTR) { in pipe_wakeup()
79 static void pipe_destroy(grpc_wakeup_fd* fd_info) { in pipe_destroy() argument
80 if (fd_info->read_fd != 0) close(fd_info->read_fd); in pipe_destroy()
81 if (fd_info->write_fd != 0) close(fd_info->write_fd); in pipe_destroy()
Dwakeup_fd_eventfd.cc34 static grpc_error* eventfd_create(grpc_wakeup_fd* fd_info) { in eventfd_create() argument
35 fd_info->read_fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); in eventfd_create()
36 fd_info->write_fd = -1; in eventfd_create()
37 if (fd_info->read_fd < 0) { in eventfd_create()
43 static grpc_error* eventfd_consume(grpc_wakeup_fd* fd_info) { in eventfd_consume() argument
47 err = eventfd_read(fd_info->read_fd, &value); in eventfd_consume()
55 static grpc_error* eventfd_wakeup(grpc_wakeup_fd* fd_info) { in eventfd_wakeup() argument
59 err = eventfd_write(fd_info->read_fd, 1); in eventfd_wakeup()
67 static void eventfd_destroy(grpc_wakeup_fd* fd_info) { in eventfd_destroy() argument
68 if (fd_info->read_fd != 0) close(fd_info->read_fd); in eventfd_destroy()
Dwakeup_fd_posix.h68 grpc_error* (*init)(grpc_wakeup_fd* fd_info);
69 grpc_error* (*consume)(grpc_wakeup_fd* fd_info);
70 grpc_error* (*wakeup)(grpc_wakeup_fd* fd_info);
71 void (*destroy)(grpc_wakeup_fd* fd_info);
84 #define GRPC_WAKEUP_FD_GET_READ_FD(fd_info) ((fd_info)->read_fd) argument
86 grpc_error* grpc_wakeup_fd_init(grpc_wakeup_fd* fd_info) GRPC_MUST_USE_RESULT;
87 grpc_error* grpc_wakeup_fd_consume_wakeup(grpc_wakeup_fd* fd_info)
89 grpc_error* grpc_wakeup_fd_wakeup(grpc_wakeup_fd* fd_info) GRPC_MUST_USE_RESULT;
90 void grpc_wakeup_fd_destroy(grpc_wakeup_fd* fd_info);
Dwakeup_fd_posix.cc53 grpc_error* grpc_wakeup_fd_init(grpc_wakeup_fd* fd_info) { in grpc_wakeup_fd_init() argument
54 return wakeup_fd_vtable->init(fd_info); in grpc_wakeup_fd_init()
57 grpc_error* grpc_wakeup_fd_consume_wakeup(grpc_wakeup_fd* fd_info) { in grpc_wakeup_fd_consume_wakeup() argument
58 return wakeup_fd_vtable->consume(fd_info); in grpc_wakeup_fd_consume_wakeup()
61 grpc_error* grpc_wakeup_fd_wakeup(grpc_wakeup_fd* fd_info) { in grpc_wakeup_fd_wakeup() argument
62 return wakeup_fd_vtable->wakeup(fd_info); in grpc_wakeup_fd_wakeup()
65 void grpc_wakeup_fd_destroy(grpc_wakeup_fd* fd_info) { in grpc_wakeup_fd_destroy() argument
66 wakeup_fd_vtable->destroy(fd_info); in grpc_wakeup_fd_destroy()
/third_party/libuv/src/win/
Dfs.c452 struct uv__fd_info_s fd_info; in fs__open() local
457 fd_info.flags = flags; in fs__open()
458 fd_info.current_pos.QuadPart = 0; in fs__open()
658 fd_info.is_directory = file_info.Directory; in fs__open()
660 if (fd_info.is_directory) { in fs__open()
661 fd_info.size.QuadPart = 0; in fs__open()
662 fd_info.mapping = INVALID_HANDLE_VALUE; in fs__open()
664 if (!GetFileSizeEx(file, &fd_info.size)) { in fs__open()
670 if (fd_info.size.QuadPart == 0) { in fs__open()
671 fd_info.mapping = INVALID_HANDLE_VALUE; in fs__open()
[all …]
/third_party/pulseaudio/src/utils/
Dpadsp.c71 typedef struct fd_info fd_info; typedef
73 struct fd_info { struct
107 PA_LLIST_FIELDS(fd_info); argument
110 static int dsp_drain(fd_info *i);
111 static void fd_info_remove_from_list(fd_info *i);
116 static PA_LLIST_HEAD(fd_info, fd_infos) = NULL;
382 static void fd_info_free(fd_info *i) { in fd_info_free()
426 static fd_info *fd_info_ref(fd_info *i) { in fd_info_ref()
439 static void fd_info_unref(fd_info *i) { in fd_info_unref()
452 fd_info *i = userdata; in context_state_cb()
[all …]
/third_party/glib/glib/tests/
Dspawn-singlethread.c218 enum fd_type *fd_info = tests[i]; in test_spawn_async_with_fds() local
224 switch (fd_info[j]) in test_spawn_async_with_fds()
262 if (fd_info[2] != STDOUT_PIPE) in test_spawn_async_with_fds()
307 if (fd_info[2] != STDOUT_PIPE) in test_spawn_async_with_fds()
/third_party/mesa3d/src/panfrost/vulkan/
Dpanvk_device.c1145 const VkImportMemoryFdInfoKHR *fd_info = in panvk_AllocateMemory() local
1149 if (fd_info && !fd_info->handleType) in panvk_AllocateMemory()
1150 fd_info = NULL; in panvk_AllocateMemory()
1152 if (fd_info) { in panvk_AllocateMemory()
1153 assert(fd_info->handleType == in panvk_AllocateMemory()
1155 fd_info->handleType == in panvk_AllocateMemory()
1163 mem->bo = panfrost_bo_import(&device->physical_device->pdev, fd_info->fd); in panvk_AllocateMemory()
1165 close(fd_info->fd); in panvk_AllocateMemory()
/third_party/mesa3d/src/freedreno/vulkan/
Dtu_device.c1892 const VkImportMemoryFdInfoKHR *fd_info = in tu_AllocateMemory() local
1894 if (fd_info && !fd_info->handleType) in tu_AllocateMemory()
1895 fd_info = NULL; in tu_AllocateMemory()
1897 if (fd_info) { in tu_AllocateMemory()
1898 assert(fd_info->handleType == in tu_AllocateMemory()
1900 fd_info->handleType == in tu_AllocateMemory()
1909 pAllocateInfo->allocationSize, fd_info->fd); in tu_AllocateMemory()
1912 close(fd_info->fd); in tu_AllocateMemory()
/third_party/mesa3d/src/broadcom/vulkan/
Dv3dv_device.c2095 const VkImportMemoryFdInfoKHR *fd_info = NULL; in v3dv_AllocateMemory() local
2102 fd_info = (void *)ext; in v3dv_AllocateMemory()
2138 } else if (fd_info && fd_info->handleType) { in v3dv_AllocateMemory()
2139 assert(fd_info->handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT || in v3dv_AllocateMemory()
2140 fd_info->handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT); in v3dv_AllocateMemory()
2142 fd_info->fd, alloc_size, &mem->bo); in v3dv_AllocateMemory()
2145 close(fd_info->fd); in v3dv_AllocateMemory()
/third_party/mesa3d/src/gallium/drivers/zink/
Dzink_resource.c944 VkMemoryGetFdInfoKHR fd_info = {0}; in zink_resource_get_handle() local
946 fd_info.sType = VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR; in zink_resource_get_handle()
948 fd_info.memory = zink_bo_get_mem(obj->bo); in zink_resource_get_handle()
950 fd_info.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT; in zink_resource_get_handle()
952 fd_info.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT; in zink_resource_get_handle()
953 VkResult result = VKSCR(GetMemoryFdKHR)(screen->dev, &fd_info, &fd); in zink_resource_get_handle()
/third_party/mesa3d/src/intel/vulkan/
Danv_device.c3653 const VkImportMemoryFdInfoKHR *fd_info = NULL; in anv_AllocateMemory() local
3670 fd_info = (void *)ext; in anv_AllocateMemory()
3708 (fd_info && fd_info->handleType) || in anv_AllocateMemory()
3746 if (fd_info && fd_info->handleType) { in anv_AllocateMemory()
3748 assert(fd_info->handleType == in anv_AllocateMemory()
3750 fd_info->handleType == in anv_AllocateMemory()
3753 result = anv_device_import_bo(device, fd_info->fd, alloc_flags, in anv_AllocateMemory()
3785 close(fd_info->fd); in anv_AllocateMemory()
/third_party/mesa3d/src/virtio/vulkan/
Dvn_android.c681 const VkFenceGetFdInfoKHR fd_info = { in vn_QueueSignalReleaseImageANDROID() local
687 result = vn_GetFenceFdKHR(device, &fd_info, &fd); in vn_QueueSignalReleaseImageANDROID()