Home
last modified time | relevance | path

Searched refs:fd_ (Results 1 – 25 of 49) sorted by relevance

12

/third_party/mindspore/mindspore/ccsrc/ps/core/communicator/
Dhttp_server.cc71 fd_ = ::socket(static_cast<int>(AF_INET), static_cast<int>(SOCK_STREAM), 0); in InitServer()
72 if (fd_ < 0) { in InitServer()
78 result = setsockopt(fd_, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char *>(&one), sizeof(int)); in InitServer()
81 close(fd_); in InitServer()
82 fd_ = -1; in InitServer()
95 result = ::bind(fd_, (struct sockaddr *)&addr, sizeof(addr)); in InitServer()
98 close(fd_); in InitServer()
99 fd_ = -1; in InitServer()
105 result = ::listen(fd_, backlog_); in InitServer()
108 close(fd_); in InitServer()
[all …]
Dhttp_server.h58 fd_(-1) {} in server_address_()
82 int fd_; variable
/third_party/skia/third_party/externals/swiftshader/src/System/Linux/
DMemFd.cpp48 fd_ = fd; in importFd()
53 if(fd_ < 0) in exportFd()
55 return fd_; in exportFd()
59 return ::fcntl(fd_, F_DUPFD_CLOEXEC, 0); in exportFd()
72 fd_ = syscall(__NR_memfd_create, name, MFD_CLOEXEC); in allocate()
73 if(fd_ < 0) in allocate()
79 if(size > 0 && ::ftruncate(fd_, size) < 0) in allocate()
91 if(fd_ >= 0) in close()
95 int ret = ::close(fd_); in close()
101 fd_ = -1; in close()
[all …]
DMemFd.hpp39 bool isValid() const { return fd_ >= 0; } in isValid()
42 int fd() const { return fd_; } in fd()
68 int fd_ = -1; member in LinuxMemFd
/third_party/boost/boost/process/detail/posix/
Dfd.hpp23 close_fd_(int fd) : fd_(fd) {} in close_fd_()
28 if (::close(fd_) == -1) in on_exec_setup()
32 int get_used_handles() {return fd_;} in get_used_handles()
36 int fd_; member
48 for (auto & fd_ : fds_) in on_exec_setup() local
49 if (::close(fd_) == -1) in on_exec_setup()
68 bind_fd_(int id, const FileDescriptor &fd) : id_(id), fd_(fd) {} in bind_fd_()
73 if (::dup2(fd_, id_) == -1) in on_exec_setup()
77 std::array<int, 2> get_used_handles() {return {id_, fd_};} in get_used_handles()
82 FileDescriptor fd_; member
[all …]
/third_party/boost/libs/beast/include/boost/beast/core/impl/
Dfile_posix.ipp76 native_close(fd_);
81 : fd_(boost::exchange(other.fd_, -1))
91 native_close(fd_);
92 fd_ = other.fd_;
93 other.fd_ = -1;
101 native_close(fd_);
102 fd_ = fd;
109 auto const ev = native_close(fd_);
120 auto const ev = native_close(fd_);
183 fd_ = ::open(path, f, 0644);
[all …]
/third_party/boost/boost/beast/core/impl/
Dfile_posix.ipp76 native_close(fd_);
81 : fd_(boost::exchange(other.fd_, -1))
91 native_close(fd_);
92 fd_ = other.fd_;
93 other.fd_ = -1;
101 native_close(fd_);
102 fd_ = fd;
109 auto const ev = native_close(fd_);
120 auto const ev = native_close(fd_);
183 fd_ = ::open(path, f, 0644);
[all …]
/third_party/boost/boost/uuid/detail/
Drandom_provider_posix.ipp49 : fd_(-1)
55 fd_ = BOOST_UUID_RANDOM_PROVIDER_POSIX_IMPL_OPEN("/dev/urandom", flags);
57 if (BOOST_UNLIKELY(-1 == fd_))
64 random_provider_base(BOOST_RV_REF(random_provider_base) that) BOOST_NOEXCEPT : fd_(that.fd_)
66 that.fd_ = -1;
72 fd_ = that.fd_;
73 that.fd_ = -1;
91 fd_, static_cast<char *>(buf) + offset, siz - offset);
108 if (fd_ >= 0)
110 boost::ignore_unused(BOOST_UUID_RANDOM_PROVIDER_POSIX_IMPL_CLOSE(fd_));
[all …]
/third_party/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/
Dgrpc_ares_ev_driver_posix.cc47 fd_ = grpc_fd_create(static_cast<int>(as), name_.c_str(), false); in GrpcPolledFdPosix()
49 grpc_pollset_set_add_fd(driver_pollset_set_, fd_); in GrpcPolledFdPosix()
53 grpc_pollset_set_del_fd(driver_pollset_set_, fd_); in ~GrpcPolledFdPosix()
58 grpc_fd_orphan(fd_, nullptr, &dummy_release_fd, "c-ares query finished"); in ~GrpcPolledFdPosix()
62 grpc_fd_notify_on_read(fd_, read_closure); in RegisterForOnReadableLocked()
66 grpc_fd_notify_on_write(fd_, write_closure); in RegisterForOnWriteableLocked()
71 return ioctl(grpc_fd_wrapped_fd(fd_), FIONREAD, &bytes_available) == 0 && in IsFdStillReadableLocked()
76 grpc_fd_shutdown(fd_, error); in ShutdownLocked()
86 grpc_fd* fd_; member in grpc_core::GrpcPolledFdPosix
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/engine/cache/
Dstorage_container.cc29 RETURN_IF_NOT_OK(cont_.CreateFile(&fd_)); in Create()
39 RETURN_IF_NOT_OK(cont_.OpenFile(&fd_)); in Open()
50 RETURN_IF_NOT_OK(cont_.CloseFile(fd_)); in Close()
52 fd_ = -1; in Close()
67 auto seek_err = lseek(fd_, offset, SEEK_SET); in Read()
71 auto r_sz = read(fd_, dest->GetMutablePointer(), sz); in Read()
73 auto r_sz = pread(fd_, dest->GetMutablePointer(), sz, offset); in Read()
75 auto r_sz = pread64(fd_, dest->GetMutablePointer(), sz, offset); in Read()
92 auto seek_err = lseek(fd_, offset, SEEK_SET); in Write()
96 auto r_sz = write(fd_, dest.GetPointer(), sz); in Write()
[all …]
Dstorage_container.h66 int fd_; variable
72 …explicit StorageContainer(const std::string &path) : cont_(path), fd_(-1), is_open_(false), bs_(nu… in StorageContainer()
/third_party/node/src/tracing/
Dnode_trace_writer.cc52 if (fd_ != -1) { in ~NodeTraceWriter()
53 CHECK_EQ(0, uv_fs_close(nullptr, &req, fd_, nullptr)); in ~NodeTraceWriter()
83 if (fd_ != -1) { in OpenNewFileForStreaming()
84 CHECK_EQ(uv_fs_close(nullptr, &req, fd_, nullptr), 0); in OpenNewFileForStreaming()
88 fd_ = uv_fs_open(nullptr, &req, filepath.c_str(), in OpenNewFileForStreaming()
91 if (fd_ < 0) { in OpenNewFileForStreaming()
94 uv_strerror(fd_)); in OpenNewFileForStreaming()
95 fd_ = -1; in OpenNewFileForStreaming()
163 if (fd_ == -1) return; in WriteToFile()
179 if (buf.base != nullptr && fd_ != -1) { in WriteToFile()
[all …]
/third_party/ninja/src/
Dsubprocess-posix.cc37 Subprocess::Subprocess(bool use_console) : fd_(-1), pid_(-1), in Subprocess()
42 if (fd_ >= 0) in ~Subprocess()
43 close(fd_); in ~Subprocess()
53 fd_ = output_pipe[0]; in Start()
57 if (fd_ >= static_cast<int>(FD_SETSIZE)) in Start()
60 SetCloseOnExec(fd_); in Start()
137 ssize_t len = read(fd_, buf, sizeof(buf)); in OnPipeReady()
143 close(fd_); in OnPipeReady()
144 fd_ = -1; in OnPipeReady()
168 return fd_ == -1; in Done()
[all …]
/third_party/node/test/parallel/
Dtest-fs-write-stream-err.js56 fs.close = common.mustCall(function(fd_, cb) { argument
57 console.error('fs.close', fd_, stream.fd);
58 assert.strictEqual(fd_, stream.fd);
59 fs.closeSync(fd_);
Dtest-worker-cleanup-handles.js12 w.on('message', common.mustCall((fd_) => {
13 assert.strictEqual(typeof fd_, 'number');
14 fd = fd_;
Dtest-fs-read-stream-err.js39 fs.close = common.mustCall((fd_, cb) => {
40 assert.strictEqual(fd_, stream.fd);
/third_party/gn/src/gn/
Dfile_writer.cc78 fd_.reset(HANDLE_EINTR(::creat(file_path.value().c_str(), 0666))); in Create()
79 valid_ = fd_.is_valid(); in Create()
91 ssize_t written = HANDLE_EINTR(::write(fd_.get(), str.data(), str.size())); in Write()
104 fd_.reset(); in Close()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/akg/
Dakg_kernel_build.h65 fd_ = fd; in LockMng()
81 int32_t fd_{-1};
88 if (fd_ != -1) { in ~AkgKernelPool()
89 (void)close(fd_); in ~AkgKernelPool()
134 int32_t fd_{-1};
Dakg_kernel_build.cc67 ret = lockf(fd_, F_TLOCK, 0); in TryLock()
85 auto ret = lockf(fd_, F_ULOCK, 0); in Unlock()
117 LockMng lock(fd_); in CreateSharedMem()
143 LockMng lock(fd_); in CreateSharedMem()
182 fd_ = open(kKeyName_, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); in Init()
183 if (fd_ == -1) { in Init()
206 LockMng lock(fd_); in Release()
247 LockMng lock(fd_); in AddKernels()
296 LockMng lock(fd_); in FetchKernels()
326 LockMng lock(fd_); in UpdateAndWait()
[all …]
/third_party/nghttp2/src/
Dshrpx_api_downstream_connection.cc73 : worker_(worker), api_(nullptr), fd_(-1), shutdown_read_(false) {} in APIDownstreamConnection()
76 if (fd_ != -1) { in ~APIDownstreamConnection()
77 close(fd_); in ~APIDownstreamConnection()
245 fd_ = mkostemp(tempname, O_CLOEXEC); in push_request_headers()
247 fd_ = mkstemp(tempname); in push_request_headers()
249 if (fd_ == -1) { in push_request_headers()
255 util::make_socket_closeonexec(fd_); in push_request_headers()
319 while ((nwrite = write(fd_, data, datalen)) == -1 && errno == EINTR) in push_upload_data_chunk()
353 auto rp = mmap(nullptr, req.recv_body_length, PROT_READ, MAP_SHARED, fd_, 0); in handle_backendconfig()
/third_party/boost/boost/beast/core/
Dfile_posix.hpp44 int fd_ = -1; member in boost::beast::file_posix
89 return fd_; in native_handle()
106 return fd_ != -1; in is_open()
/third_party/boost/libs/beast/include/boost/beast/core/
Dfile_posix.hpp44 int fd_ = -1; member in boost::beast::file_posix
89 return fd_; in native_handle()
106 return fd_ != -1; in is_open()
/third_party/grpc/test/cpp/end2end/
Dport_sharing_end2end_test.cc166 grpc_tcp_destroy_and_release_fd(tcp, &fd_, &on_fd_released_); in OnConnect()
173 p.fd = fd_; in OnFdReleased()
178 read_bytes = read(fd_, buf, 1024); in OnFdReleased()
184 fd_, static_cast<int>(p.read_buffer.Length()), listener_fd_); in OnFdReleased()
192 int fd_ = -1; member in grpc::testing::__anon45a999d10111::TestTcpServer
/third_party/node/src/
Dstream_wrap.h95 fd_ = fd; in set_fd()
121 int fd_ = -1; variable
/third_party/grpc/src/core/lib/iomgr/
Dudp_server.cc101 int fd() const { return fd_; } in fd()
121 int fd_; member in GrpcUdpListener
151 : fd_(fd), in GrpcUdpListener()
232 gpr_log(GPR_DEBUG, "shutdown fd %d", sp->fd_); in shutdown_fd()
297 gpr_log(GPR_DEBUG, "Orphan fd %d, emfd %p", fd_, emfd_); in OrphanFd()
340 gpr_log(GPR_DEBUG, "fd %d about to be orphaned", fd_); in OnFdAboutToOrphan()

12