Home
last modified time | relevance | path

Searched refs:reader (Results 1 – 23 of 23) sorted by relevance

/system/bt/osi/src/
Deager_reader.c62 static bool has_byte(const eager_reader_t *reader);
123 void eager_reader_free(eager_reader_t *reader) { in eager_reader_free() argument
124 if (!reader) in eager_reader_free()
127 eager_reader_unregister(reader); in eager_reader_free()
130 if (reader->inbound_read_object) in eager_reader_free()
131 reactor_unregister(reader->inbound_read_object); in eager_reader_free()
133 if (reader->bytes_available_fd != INVALID_FD) in eager_reader_free()
134 close(reader->bytes_available_fd); in eager_reader_free()
138 if (reader->current_buffer) in eager_reader_free()
139 reader->allocator->free(reader->current_buffer); in eager_reader_free()
[all …]
/system/bt/osi/test/
Deager_reader_test.cpp87 static void expect_data(eager_reader_t *reader, void *context) { in expect_data() argument
93 EXPECT_EQ((size_t)1, eager_reader_read(reader, &byte, 1, true)); in expect_data()
100 static void expect_data_multibyte(eager_reader_t *reader, void *context) { in expect_data_multibyte() argument
107 int bytes_read = eager_reader_read(reader, buffer, bytes_to_read, false); in expect_data_multibyte()
118 …eager_reader_t *reader = eager_reader_new(pipefd[0], &allocator_malloc, BUFFER_SIZE, SIZE_MAX, "te… in TEST_F() local
119 ASSERT_TRUE(reader != NULL); in TEST_F()
120 eager_reader_free(reader); in TEST_F()
124 …eager_reader_t *reader = eager_reader_new(pipefd[0], &allocator_malloc, BUFFER_SIZE, SIZE_MAX, "te… in TEST_F() local
127 eager_reader_register(reader, thread_get_reactor(read_thread), expect_data, (void *)small_data); in TEST_F()
132 eager_reader_free(reader); in TEST_F()
[all …]
/system/extras/simpleperf/
Drecord_file_test.cpp70 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(filename); in TEST_F() local
71 ASSERT_TRUE(reader != nullptr); in TEST_F()
72 const FileHeader* file_header = reader->FileHeader(); in TEST_F()
74 std::vector<const FileAttr*> attrs = reader->AttrSection(); in TEST_F()
77 std::vector<uint64_t> ids = reader->IdsForAttr(attrs[0]); in TEST_F()
81 std::vector<std::unique_ptr<const Record>> records = reader->DataSection(); in TEST_F()
88 std::vector<SectionDesc> sections = reader->FeatureSectionDescriptors(); in TEST_F()
91 reinterpret_cast<const perf_event_header*>(reader->DataAtOffset(sections[0].offset)); in TEST_F()
96 ASSERT_TRUE(reader->Close()); in TEST_F()
Dcmd_record_test.cpp63 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance("perf.data"); in TEST_F() local
64 ASSERT_TRUE(reader != nullptr); in TEST_F()
65 std::vector<std::unique_ptr<const Record>> records = reader->DataSection(); in TEST_F()
82 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance("perf.data"); in TEST_F() local
83 ASSERT_TRUE(reader != nullptr); in TEST_F()
84 const FileHeader* file_header = reader->FileHeader(); in TEST_F()
87 ASSERT_GT(reader->FeatureSectionDescriptors().size(), 0u); in TEST_F()
Denvironment.cpp41 LineReader reader(fp); in GetOnlineCpus() local
43 if ((line = reader.ReadLine()) != nullptr) { in GetOnlineCpus()
83 LineReader reader(fp); in ProcessKernelSymbols() local
85 while ((line = reader.ReadLine()) != nullptr) { in ProcessKernelSymbols()
87 char name[reader.MaxLineSize()]; in ProcessKernelSymbols()
88 char module[reader.MaxLineSize()]; in ProcessKernelSymbols()
148 LineReader reader(fp); in GetLoadedModules() local
150 while ((line = reader.ReadLine()) != nullptr) { in GetLoadedModules()
152 char name[reader.MaxLineSize()]; in GetLoadedModules()
259 LineReader reader(fp); in ReadThreadNameAndTgid() local
[all …]
Drecord_file.cpp327 auto reader = std::unique_ptr<RecordFileReader>(new RecordFileReader(filename, fd)); in CreateInstance() local
328 if (!reader->MmapFile()) { in CreateInstance()
331 return reader; in CreateInstance()
/system/bt/osi/include/
Deager_reader.h30 typedef void (*eager_reader_cb)(eager_reader_t *reader, void *context);
47 void eager_reader_free(eager_reader_t *reader);
52 void eager_reader_register(eager_reader_t *reader, reactor_t *reactor, eager_reader_cb read_cb, voi…
56 void eager_reader_unregister(eager_reader_t *reader);
63 size_t eager_reader_read(eager_reader_t *reader, uint8_t *buffer, size_t max_size, bool block);
/system/core/logd/
DLogListener.cpp31 LogListener::LogListener(LogBuffer *buf, LogReader *reader) : in LogListener() argument
34 reader(reader) { in LogListener()
104 reader->notifyNewLog(); in onDataAvailable()
DLogListener.h25 LogReader *reader; variable
28 LogListener(LogBuffer *buf, LogReader *reader);
DLogAudit.h25 LogReader *reader; variable
30 LogAudit(LogBuffer *buf, LogReader *reader, int fdDmesg);
DLogKlog.h28 LogReader *reader; variable
44 LogKlog(LogBuffer *buf, LogReader *reader, int fdWrite, int fdRead, bool auditd);
Dmain.cpp418 LogReader *reader = new LogReader(logBuf); in main() local
419 if (reader->startListener()) { in main()
427 LogListener *swl = new LogListener(logBuf, reader); in main()
436 CommandListener *cl = new CommandListener(logBuf, reader, swl); in main()
450 al = new LogAudit(logBuf, reader, dmesg ? fdDmesg : -1); in main()
455 kl = new LogKlog(logBuf, reader, fdDmesg, fdPmesg, al != NULL); in main()
DLogTimes.cpp26 LogTimeEntry::LogTimeEntry(LogReader &reader, SocketClient *client, in LogTimeEntry() argument
35 mReader(reader), in LogTimeEntry()
83 LogReader &reader = me->mReader; in threadStop() local
84 LastLogTimes &times = reader.logbuf().mTimes; in threadStop()
97 reader.release(client); in threadStop()
DCommandListener.h33 CommandListener(LogBuffer *buf, LogReader *reader, LogListener *swl);
45 ShutdownCmd(LogBuffer *buf, LogReader *reader, LogListener *swl);
DFlushCommand.cpp25 FlushCommand::FlushCommand(LogReader &reader, in FlushCommand() argument
31 mReader(reader), in FlushCommand()
DLogAudit.cpp40 LogAudit::LogAudit(LogBuffer *buf, LogReader *reader, int fdDmesg) : in LogAudit() argument
43 reader(reader), in LogAudit()
233 reader->notifyNewLog(); in logPrint()
DLogKlog.cpp173 LogKlog::LogKlog(LogBuffer *buf, LogReader *reader, int fdWrite, int fdRead, bool auditd) : in LogKlog() argument
176 reader(reader), in LogKlog()
594 reader->notifyNewLog(); in log()
DLogBufferElement.cpp193 uint64_t LogBufferElement::flushTo(SocketClient *reader, LogBuffer *parent) { in flushTo() argument
223 uint64_t retval = reader->sendDatav(iovec, 2) ? FLUSH_ERROR : mSequence; in flushTo()
DLogTimes.h49 LogTimeEntry(LogReader &reader, SocketClient *client, bool nonBlock,
DCommandListener.cpp50 CommandListener::ShutdownCmd::ShutdownCmd(LogBuffer *buf, LogReader *reader, in ShutdownCmd() argument
54 mReader(*reader), in ShutdownCmd()
DLogBuffer.cpp611 SocketClient *reader, const uint64_t start, bool privileged, in flushTo() argument
615 uid_t uid = reader->getUid(); in flushTo()
660 max = element->flushTo(reader, this); in flushTo()
/system/bt/hci/src/
Dhci_hal_mct.c47 static void event_event_stream_has_bytes(eager_reader_t *reader, void *context);
48 static void event_acl_stream_has_bytes(eager_reader_t *reader, void *context);
181 static void event_event_stream_has_bytes(UNUSED_ATTR eager_reader_t *reader, UNUSED_ATTR void *cont… in event_event_stream_has_bytes() argument
185 static void event_acl_stream_has_bytes(UNUSED_ATTR eager_reader_t *reader, UNUSED_ATTR void *contex… in event_acl_stream_has_bytes() argument
Dhci_hal_h4.c46 static void event_uart_has_bytes(eager_reader_t *reader, void *context);
172 static void event_uart_has_bytes(eager_reader_t *reader, UNUSED_ATTR void *context) { in event_uart_has_bytes() argument
177 if (eager_reader_read(reader, &type_byte, 1, true) == 0) { in event_uart_has_bytes()