/foundation/ability/ability_runtime/interfaces/inner_api/app_manager/src/appmgr/ |
H A D | child_process_args.cpp | 31 TAG_LOGE(AAFwkTag::PROCESSMGR, "fds count must <= %{public}d.", CHILD_PROCESS_ARGS_FDS_MAX_COUNT); in ReadFromParcel() 45 fds.emplace(key, fd); in ReadFromParcel() 64 WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, fds.size()); in Marshalling() 73 for (auto &item : fds) { in Marshalling() 88 TAG_LOGD(AAFwkTag::APPMGR, "CheckFdsSize: %{public}zu", fds.size()); in CheckFdsSize() 89 if (fds.size() > CHILD_PROCESS_ARGS_FDS_MAX_COUNT) { in CheckFdsSize() 90 TAG_LOGE(AAFwkTag::PROCESSMGR, "fds count must <= %{public}d.", CHILD_PROCESS_ARGS_FDS_MAX_COUNT); in CheckFdsSize() 98 for (auto iter = fds.begin(); iter != fds.end(); iter++) { in CheckFdsKeyLength()
|
/foundation/communication/dsoftbus/components/nstackx/nstackx_core/platform/liteos/dfile/ |
H A D | sys_dfile.c | 31 struct EpollDescStr fds; in CreateReceiverPipe() local 33 if (CreateEpollFdPair(&fds) != NSTACKX_EOK) { in CreateReceiverPipe() 36 session->receiverPipe[PIPE_OUT] = fds.recvFd; in CreateReceiverPipe() 37 session->receiverPipe[PIPE_IN] = fds.sendFd; in CreateReceiverPipe()
|
/foundation/graphic/graphic_surface/buffer_handle/test/unittest/ |
H A D | buffer_handle_test.cpp | 46 uint32_t fds = 1025, ints = 1025; in HWTEST_F() local 48 ASSERT_EQ(nullptr, AllocateBufferHandle(fds, ints)); in HWTEST_F() 49 ASSERT_EQ(nullptr, AllocateBufferHandle(fds, buffer_handle_reserve_max_size)); in HWTEST_F() 65 uint32_t fds = 1025, ints = 1025; in HWTEST_F() local 67 auto test1 = AllocateBufferHandle(fds, ints); in HWTEST_F() 70 auto test2 = AllocateBufferHandle(fds, testsize); in HWTEST_F()
|
/foundation/ability/ability_runtime/frameworks/js/napi/inner/napi_common/ |
H A D | napi_common_child_process_param.cpp | 39 if (IsExistsByPropertyName(env, jsValue, "fds")) { in UnwrapChildProcessArgs() 40 napi_value jsFds = GetPropertyValueByPropertyName(env, jsValue, "fds", napi_object); in UnwrapChildProcessArgs() 42 TAG_LOGE(AAFwkTag::PROCESSMGR, "The type of args.fds must be Record<string, number>."); in UnwrapChildProcessArgs() 43 errorMsg = "The type of args.fds must be Record<string, number>."; in UnwrapChildProcessArgs() 46 if (!UnwrapChildProcessFds(env, jsFds, args.fds, errorMsg)) { in UnwrapChildProcessArgs() 61 TAG_LOGE(AAFwkTag::PROCESSMGR, "fds count must <= %{public}d.", CHILD_PROCESS_ARGS_FDS_MAX_COUNT); in UnwrapChildProcessFds() 62 errorMsg = "fds count must <= " + std::to_string(CHILD_PROCESS_ARGS_FDS_MAX_COUNT); in UnwrapChildProcessFds() 71 TAG_LOGE(AAFwkTag::PROCESSMGR, "The type of args.fds must be Record<string, number>."); in UnwrapChildProcessFds() 72 errorMsg = "The type of args.fds must be Record<string, number>."; in UnwrapChildProcessFds() 82 TAG_LOGE(AAFwkTag::PROCESSMGR, "The type of args.fds mus in UnwrapChildProcessFds() 122 auto &fds = args.fds; WrapChildProcessArgs() local [all...] |
/foundation/ability/ability_runtime/frameworks/native/child_process/src/ |
H A D | native_child_process.cpp | 125 std::map<std::string, int32_t> fds; in OH_Ability_StartNativeChildProcess() local 137 fds.emplace(key, cur->fd); in OH_Ability_StartNativeChildProcess() 140 if (fds.size() > MAX_FD_SIZE) { in OH_Ability_StartNativeChildProcess() 141 TAG_LOGE(AAFwkTag::PROCESSMGR, "too many fds"); in OH_Ability_StartNativeChildProcess() 145 childArgs.fds = fds; in OH_Ability_StartNativeChildProcess()
|
/foundation/communication/netmanager_base/services/netmanagernative/src/netsys/ |
H A D | netsys_tcp_client.c | 63 struct pollfd fds[1] = {{0}}; in Poll() local 64 fds[0].fd = sock; in Poll() 65 fds[0].events = event; in Poll() 67 int ret = poll(fds, num, DEFAULT_POLL_TIMEOUT); in Poll()
|
H A D | clatd.cpp | 127 pollfd fds[] = { in RunLoop() local 140 if (poll(fds, sizeof(fds) / sizeof((fds)[0]), -1) == -1) { in RunLoop() 145 if (fds[EVENT_STOP].revents) { in RunLoop() 153 if (fds[READ_V6].revents) { in RunLoop() 156 if (fds[READ_V4].revents) { in RunLoop()
|
/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_toolkit/net_helper/ |
H A D | raw_socket.cpp | 148 pollfd fds[1]; in Recv() local 149 fds[0].fd = socketFd_; in Recv() 150 fds[0].events = POLLIN; in Recv() 151 if (poll(fds, 1, timeoutMillis) <= 0) { in Recv()
|
H A D | dns_checker.cpp | 162 pollfd fds[1]; in recvDnsData() local 163 fds[0].fd = dnsSocket; in recvDnsData() 164 fds[0].events = POLLIN; in recvDnsData() 165 if (poll(fds, 1, timeout) <= 0) { in recvDnsData()
|
/foundation/filemanagement/file_api/interfaces/kits/cj/src/ |
H A D | watcher_impl.cpp | 169 struct pollfd fds[2]; in GetNotifyEvent() 170 fds[0].fd = eventFd_; in GetNotifyEvent() 171 fds[0].events = 0; in GetNotifyEvent() 172 fds[1].fd = notifyFd_; in GetNotifyEvent() 173 fds[1].events = POLLIN; in GetNotifyEvent() 175 int ret = poll(fds, nfds, -1); in GetNotifyEvent() 177 if (static_cast<unsigned short>(fds[0].revents) & POLLNVAL) { in GetNotifyEvent() 181 if (static_cast<unsigned short>(fds[1].revents) & POLLIN) { in GetNotifyEvent()
|
H A D | copy.cpp | 529 struct pollfd fds[2]; in GetNotifyEvent() local 530 fds[0].events = 0; in GetNotifyEvent() 531 fds[1].events = POLLIN; in GetNotifyEvent() 532 fds[0].fd = infos->eventFd; in GetNotifyEvent() 533 fds[1].fd = infos->notifyFd; in GetNotifyEvent() 535 auto ret = poll(fds, nfds, -1); in GetNotifyEvent() 537 if (static_cast<unsigned short>(fds[0].revents) & POLLNVAL) { in GetNotifyEvent() 541 if (static_cast<unsigned short>(fds[1].revents) & POLLIN) { in GetNotifyEvent()
|
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fs/class_watcher/ |
H A D | watcher_entity.cpp | 189 struct pollfd fds[2]; in GetNotifyEvent() local 190 fds[0].fd = eventFd_; in GetNotifyEvent() 191 fds[0].events = 0; in GetNotifyEvent() 192 fds[1].fd = notifyFd_; in GetNotifyEvent() 193 fds[1].events = POLLIN; in GetNotifyEvent() 196 ret = poll(fds, nfds, -1); in GetNotifyEvent() 198 if (static_cast<unsigned short>(fds[0].revents) & POLLNVAL) { in GetNotifyEvent() 202 if (static_cast<unsigned short>(fds[1].revents) & POLLIN) { in GetNotifyEvent()
|
/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/liteos/ |
H A D | sys_event.c | 124 struct EpollDescStr fds; in CreateNonBlockPipe() local 126 if (CreateEpollFdPair(&fds) != NSTACKX_EOK) { in CreateNonBlockPipe() 131 node->pipeFd[PIPE_OUT] = fds.recvFd; in CreateNonBlockPipe() 132 node->pipeFd[PIPE_IN] = fds.sendFd; in CreateNonBlockPipe()
|
/foundation/ability/ability_runtime/interfaces/kits/native/appkit/app/ |
H A D | child_main_thread.h | 41 static void Start(const std::map<std::string, int32_t> &fds); 42 void SetFds(const std::map<std::string, int32_t> &fds);
|
/foundation/ability/ability_runtime/frameworks/native/ability/native/child_process_manager/ |
H A D | native_args_child_process.cpp | 60 auto nativeArgs = ParseToNativeArgs(args->entryParams, args->fds); in OnStart() 71 const std::map<std::string, int32_t> &fds) in ParseToNativeArgs() 87 for (const auto &fd : fds) { in ParseToNativeArgs() 70 ParseToNativeArgs(const std::string &entryParams, const std::map<std::string, int32_t> &fds) ParseToNativeArgs() argument
|
/foundation/communication/dhcp/services/utils/src/ |
H A D | dhcp_arp_checker.cpp | 311 pollfd fds[1]; in RecvData() local 312 fds[0].fd = m_socketFd; in RecvData() 313 fds[0].events = POLLIN; in RecvData() 314 if (poll(fds, 1, timeoutMillis) <= 0) { in RecvData()
|
/foundation/ability/ability_runtime/interfaces/inner_api/app_manager/include/appmgr/ |
H A D | child_process_args.h | 30 std::map<std::string, int32_t> fds; member
|
/foundation/ability/ability_runtime/interfaces/inner_api/child_process_manager/include/ |
H A D | native_args_child_process.h | 42 const std::map<std::string, int32_t> &fds);
|
/foundation/ability/ability_runtime/test/unittest/app_spawn_client_second_test/ |
H A D | app_spawn_client_second_test.cpp | 261 // Scenario9: Test when fds is empty then function returns 0. 275 // Scenario10: Test when fds is not empty then function returns 0. 280 startMsg.fds["fds"] = 1; in HWTEST_F() 527 // Scenario1: Test when AppSpawnReqMsgAddFd returns ERR_OK for all items in fds. 534 std::map<std::string, int32_t> fds = {{"fd1", 1}, {"fd2", 2}}; in HWTEST_F() local 535 ret = appSpawnClient.SetExtMsgFds(reqHandle, fds); in HWTEST_F() 539 // Scenario2: Test when AppSpawnReqMsgAddFd returns ERR_NO_PERMISSION for some items in fds. 547 std::map<std::string, int32_t> fds = {{"fd1", 1}, {"fd2", -1}}; in HWTEST_F() local 548 ret = appSpawnClient.SetExtMsgFds(reqHandle, fds); in HWTEST_F() 560 std::map<std::string, int32_t> fds = {{"fd1", -1}, {"fd2", -1}}; HWTEST_F() local [all...] |
/foundation/ability/ability_runtime/frameworks/native/appkit/app/ |
H A D | child_main_thread.cpp | 44 void ChildMainThread::Start(const std::map<std::string, int32_t> &fds) in Start() argument 59 thread->SetFds(fds); in Start() 105 void ChildMainThread::SetFds(const std::map<std::string, int32_t> &fds) in SetFds() argument 111 processArgs_->fds = fds; in SetFds()
|
/foundation/ability/ability_runtime/services/appmgr/include/ |
H A D | app_spawn_client.h | 79 std::map<std::string, int32_t> fds; member 234 int32_t SetExtMsgFds(const AppSpawnReqMsgHandle &reqHandle, const std::map<std::string, int32_t> &fds);
|
/foundation/communication/netstack/frameworks/js/napi/socket/socket_exec/src/ |
H A D | local_socket_exec.cpp | 240 static bool PollFd(pollfd *fds, nfds_t num, int timeout) in PollFd() argument 242 int ret = poll(fds, num, timeout); in PollFd() 244 NETSTACK_LOGE("poll to send failed, socket is %{public}d, errno is %{public}d", fds->fd, errno); in PollFd() 248 NETSTACK_LOGE("poll to send timeout, socket is %{public}d, timeout is %{public}d", fds->fd, timeout); in PollFd() 284 pollfd fds[1] = {{0}}; in PollSendData() local 285 fds[0].fd = sock; in PollSendData() 286 fds[0].events = static_cast<short>(POLLOUT); in PollSendData() 290 if (!PollFd(fds, num, sendTimeoutMs)) { in PollSendData() 545 struct pollfd fds[1] = {{.fd = mgr->sockfd_, .events = POLLIN}}; in LocalSocketServerAccept() local 549 int ret = poll(fds, nu in LocalSocketServerAccept() 718 pollfd fds[1] = {{.fd = sock, .events = POLLIN}}; PollRecvData() local 784 pollfd fds[1] = {{.fd = sock, .events = POLLOUT}}; NonBlockConnect() local [all...] |
/foundation/ability/ability_runtime/services/appmgr/src/ |
H A D | app_spawn_client.cpp | 345 if (!startMsg.fds.empty()) { in AppspawnSetExtMsgMore() 346 ret = SetExtMsgFds(reqHandle, startMsg.fds); in AppspawnSetExtMsgMore() 564 const std::map<std::string, int32_t> &fds) in SetExtMsgFds() 566 TAG_LOGI(AAFwkTag::APPMGR, "size:%{public}zu", fds.size()); in SetExtMsgFds() 568 for (const auto &item : fds) { in SetExtMsgFds() 563 SetExtMsgFds(const AppSpawnReqMsgHandle &reqHandle, const std::map<std::string, int32_t> &fds) SetExtMsgFds() argument
|
/foundation/ability/ability_runtime/test/unittest/app_spawn_client_test/ |
H A D | app_spawn_client_test.cpp | 766 startMsg.fds.emplace("test_fd1", 100); in HWTEST_F() 767 startMsg.fds.emplace("test_fd2", 101); in HWTEST_F() 768 startMsg.fds.emplace("test_fd3", 102); in HWTEST_F() 777 ret = asc->SetExtMsgFds(reqHandle, startMsg.fds); in HWTEST_F() 794 startMsg.fds.emplace("test_fd1", 100); in HWTEST_F() 795 startMsg.fds.emplace("test_fd2", 101); in HWTEST_F() 796 startMsg.fds.emplace("test_fd3", -1); in HWTEST_F() 804 ret = asc->SetExtMsgFds(reqHandle, startMsg.fds); in HWTEST_F()
|
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fs/properties/ |
H A D | copy.cpp | 769 struct pollfd fds[2]; in GetNotifyEvent() local 770 fds[0].events = 0; in GetNotifyEvent() 771 fds[1].events = POLLIN; in GetNotifyEvent() 772 fds[0].fd = infos->eventFd; in GetNotifyEvent() 773 fds[1].fd = infos->notifyFd; in GetNotifyEvent() 775 auto ret = poll(fds, nfds, -1); in GetNotifyEvent() 777 if (static_cast<unsigned short>(fds[0].revents) & POLLNVAL) { in GetNotifyEvent() 781 if (static_cast<unsigned short>(fds[1].revents) & POLLIN) { in GetNotifyEvent()
|