/base/notification/eventhandler/frameworks/test/moduletest/ |
D | event_handler_fd_listener_module_test.cpp | 140 int32_t fds[] = {-1, -1}; variable 141 int32_t pipe = pipe2(fds, O_NONBLOCK); 147 … auto inResult = handler->AddFileDescriptorListener(fds[0], FILE_DESCRIPTOR_INPUT_EVENT, listener); 149 …auto outResult = handler->AddFileDescriptorListener(fds[1], FILE_DESCRIPTOR_OUTPUT_EVENT, listener… 192 int32_t fds[] = {-1, -1}; variable 193 int32_t pipe = pipe2(fds, O_NONBLOCK); 201 auto inResult = handler->AddFileDescriptorListener(fds[0], event, listener); 217 int32_t fds[] = {-1, -1}; variable 218 int32_t pipe = pipe2(fds, O_NONBLOCK); 224 … auto inResult = handler->AddFileDescriptorListener(fds[0], FILE_DESCRIPTOR_INPUT_EVENT, nullptr); [all …]
|
D | event_handler_press_module_test.cpp | 206 int32_t fds[] = {-1, -1}; variable 207 int32_t pipe = pipe2(fds, O_NONBLOCK); 213 … auto inResult = handler->AddFileDescriptorListener(fds[0], FILE_DESCRIPTOR_INPUT_EVENT, listener); 215 …auto outResult = handler->AddFileDescriptorListener(fds[1], FILE_DESCRIPTOR_OUTPUT_EVENT, listener…
|
/base/startup/init/services/init/standard/ |
D | fd_holder_service.c | 28 static void FreeFds(int *fds) in FreeFds() argument 30 if (fds != NULL) { in FreeFds() 31 free(fds); in FreeFds() 35 static int HandlerHoldFds(Service *service, int *fds, size_t fdCount, const char *pollStr) in HandlerHoldFds() argument 37 if (fds == NULL || fdCount == 0 || fdCount > MAX_HOLD_FDS) { in HandlerHoldFds() 44 INIT_LOGI("fd = %d", fds[i]); in HandlerHoldFds() 46 if (UpdaterServiceFds(service, fds, fdCount) < 0) { in HandlerHoldFds() 108 static inline void CloseFds(int *fds, size_t fdCount) in CloseFds() argument 111 close(fds[i]); in CloseFds() 124 int *fds = ReceiveFds(sock, iovec, &fdCount, true, &requestPid); in HandlerFdHolder() local [all …]
|
/base/startup/init/test/exec_test/ |
D | fd_holder_test.c | 31 int fds[10]; in SaveFds() local 35 …fds[i] = open(argv[i], O_APPEND | O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, S_IRUSR|S_IWUSR|S_IRGRP|… in SaveFds() 36 if (fds[i] < 0) { in SaveFds() 40 (void)write(fds[i], "hello", BUFFER_LENGTH); in SaveFds() 48 int ret = ServiceSaveFd(serviceName, fds, (size_t)fdCount); in SaveFds() 60 int *fds = ServiceGetFd("fd_holder_test", &outfdCount); in main() local 61 if (fds == NULL) { in main() 65 int fd = fds[i]; in main() 71 free(fds); in main()
|
/base/time/time_service/services/timer/src/ |
D | timer_handler.cpp | 46 TimerFds fds; in Create() local 48 epollfd = epoll_create(fds.size()); in Create() 51 static_cast<int>(fds.size()), strerror(errno)); in Create() 55 for (size_t i = 0; i < fds.size(); i++) { in Create() 56 fds[i] = timerfd_create(alarm_to_clock_id[i], 0); in Create() 57 if (fds[i] < 0) { in Create() 62 close(fds[j]); in Create() 68 …std::shared_ptr<TimerHandler> handler = std::shared_ptr<TimerHandler>(new TimerHandler(fds, epollf… in Create() 69 for (size_t i = 0; i < fds.size(); i++) { in Create() 74 int err = epoll_ctl(epollfd, EPOLL_CTL_ADD, fds[i], &event); in Create() [all …]
|
/base/startup/init/interfaces/innerkits/fd_holder/ |
D | fd_holder.c | 74 static int ServiceSendFds(const char *serviceName, int *fds, int fdCount, bool doPoll) in ServiceSendFds() argument 94 if (BuildControlMessage(&msghdr, fds, fdCount, true) < 0) { in ServiceSendFds() 122 int ServiceSaveFd(const char *serviceName, int *fds, int fdCount) in ServiceSaveFd() argument 125 if (serviceName == NULL || fds == NULL || in ServiceSaveFd() 130 return ServiceSendFds(serviceName, fds, fdCount, false); in ServiceSaveFd() 133 int ServiceSaveFdWithPoll(const char *serviceName, int *fds, int fdCount) in ServiceSaveFdWithPoll() argument 136 if (serviceName == NULL || fds == NULL || in ServiceSaveFdWithPoll() 141 return ServiceSendFds(serviceName, fds, fdCount, true); in ServiceSaveFdWithPoll() 168 int *fds = calloc((size_t)fdCount, sizeof(int)); in ServiceGetFd() local 169 BEGET_ERROR_CHECK(fds != NULL, FreeStringVector(fdList, fdCount); in ServiceGetFd() [all …]
|
D | fd_holder_internal.c | 26 int BuildControlMessage(struct msghdr *msghdr, int *fds, int fdCount, bool sendUcred) in BuildControlMessage() argument 28 if (msghdr == NULL || (fdCount > 0 && fds == NULL)) { in BuildControlMessage() 53 int ret = memcpy_s(CMSG_DATA(cmsg), cmsg->cmsg_len, fds, sizeof(int) * fdCount); in BuildControlMessage() 84 int *fds = NULL; in GetFdsFromMsg() local 88 fds = (int*)CMSG_DATA(cmsg); in GetFdsFromMsg() 103 if (fds != NULL && fdCount > 0) { in GetFdsFromMsg() 106 … BEGET_ERROR_CHECK(memcpy_s(outFds, sizeof(int) * (fdCount + 1), fds, sizeof(int) * fdCount) == 0, in GetFdsFromMsg()
|
D | fd_holder_internal.h | 43 int BuildControlMessage(struct msghdr *msghdr, int *fds, int fdCount, bool sendUcred);
|
/base/notification/eventhandler/frameworks/eventhandler/test/unittest/ |
D | lib_event_handler_event_queue_test.cpp | 85 static int32_t InitFileDescriptor(int32_t fds[]) in InitFileDescriptor() argument 87 auto result = pipe(fds); in InitFileDescriptor() 90 int32_t fileDescriptor = fds[0]; in InitFileDescriptor() 914 int32_t fds[] = {-1, -1}; variable 915 int32_t fileDescriptor = InitFileDescriptor(fds); 949 close(fds[0]); 950 close(fds[1]); 977 int32_t fds[] = {-1, -1}; variable 978 int32_t fileDescriptor = InitFileDescriptor(fds); 1008 close(fds[0]); [all …]
|
/base/startup/init/interfaces/innerkits/include/ |
D | fd_holder.h | 29 int ServiceSaveFdWithPoll(const char *serviceName, int *fds, int fdCount); 34 int ServiceSaveFd(const char *serviceName, int *fds, int fdCount);
|
/base/startup/init/test/fuzztest/servicesavefdwithpoll_fuzzer/ |
D | servicesavefdwithpoll_fuzzer.cpp | 25 int fds[64] = {0}; in FuzzServiceSaveFdWithPoll() local 27 if (!ServiceSaveFdWithPoll(str.c_str(), fds, fdCount)) { in FuzzServiceSaveFdWithPoll()
|
/base/startup/init/services/init/ |
D | init_common_service.c | 247 int *fds = service->fds; in CloseServiceFds() local 249 INIT_LOGV("Closing fd: %d", fds[i]); in CloseServiceFds() 250 if (fds[i] != -1) { in CloseServiceFds() 251 close(fds[i]); in CloseServiceFds() 252 fds[i] = -1; in CloseServiceFds() 257 if (needFree && service->fds != NULL) { in CloseServiceFds() 258 free(service->fds); in CloseServiceFds() 259 service->fds = NULL; in CloseServiceFds() 267 if (service->fdCount > 0 && service->fds != NULL) { in PublishHoldFds() 270 int fd = dup(service->fds[i]); in PublishHoldFds() [all …]
|
/base/startup/init/test/unittest/innerkits/ |
D | innerkits_unittest.cpp | 411 int *fds = nullptr; variable 423 fds = ServiceGetFd("testServiceName", &fdCount); 424 EXPECT_NE(fds, nullptr); 432 BuildControlMessage(&msghdr, fds, -1, 0); 437 BuildControlMessage(&msghdr, fds, -1, 1); 442 if (fds != nullptr) 444 free(fds); 445 fds = nullptr; 452 int *fds = nullptr; variable 464 fds = ReceiveFds(0, iovec, &fdCount, true, &requestPid); [all …]
|
/base/startup/init/test/unittest/init/ |
D | init_unittest.cpp | 110 int *fds = ServiceGetFd("param_watcher", &fdCount); in TestProcessTimer() local 111 EXPECT_TRUE(fds != nullptr); in TestProcessTimer() 112 free(fds); in TestProcessTimer()
|
D | group_unittest.cpp | 367 int fds[1] = { -1 }; // ServiceStop will release fds variable 369 UpdaterServiceFds(service, fds, 1); 370 UpdaterServiceFds(service, fds, 0); 371 UpdaterServiceFds(service, fds, 1); 373 UpdaterServiceFds(service, fds, 1);
|
D | service_unittest.cpp | 98 int fds[1] = {-1}; // ServiceStop will release fds variable 99 UpdaterServiceFds(service, fds, 1);
|
/base/time/time_service/services/timer/include/ |
D | timer_handler.h | 40 TimerHandler(const TimerFds &fds, int epollfd);
|
/base/startup/init/services/init/include/ |
D | init_service.h | 157 int *fds; member 180 int UpdaterServiceFds(Service *service, int *fds, size_t fdCount);
|
/base/hiviewdfx/hiview/utility/smart_parser/test/resource/SmartParserTest004/ |
D | last_kmsg | 195 … 4.246449] [pid=1][Init][INFO][init_common_service.c:243]Closing service ' thermal_protector ' fds
|
/base/hiviewdfx/hiview/utility/smart_parser/test/resource/SmartParserTest008/ |
D | last_kmsg | 195 … 4.246449] [pid=1][Init][INFO][init_common_service.c:243]Closing service ' thermal_protector ' fds
|
/base/hiviewdfx/hiview/utility/smart_parser/test/resource/SmartParserTest005/ |
D | last_kmsg | 195 … 4.246449] [pid=1][Init][INFO][init_common_service.c:243]Closing service ' thermal_protector ' fds
|