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

/system/bt/osi/src/
H A Deager_reader.c61 static bool has_byte(const eager_reader_t *reader);
122 void eager_reader_free(eager_reader_t *reader) { argument
123 if (!reader)
126 eager_reader_unregister(reader);
129 if (reader->inbound_read_object)
130 reactor_unregister(reader->inbound_read_object);
132 if (reader->bytes_available_fd != INVALID_FD)
133 close(reader->bytes_available_fd);
137 if (reader->current_buffer)
138 reader
145 eager_reader_register(eager_reader_t *reader, reactor_t *reactor, eager_reader_cb read_cb, void *context) argument
158 eager_reader_unregister(eager_reader_t *reader) argument
168 eager_reader_read(eager_reader_t *reader, uint8_t *buffer, size_t max_size, bool block) argument
214 eager_reader_get_read_thread(const eager_reader_t *reader) argument
219 has_byte(const eager_reader_t *reader) argument
236 eager_reader_t *reader = (eager_reader_t *)context; local
269 eager_reader_t *reader = (eager_reader_t *)context; local
[all...]
/system/bt/osi/include/
H A Deager_reader.h31 typedef void (*eager_reader_cb)(eager_reader_t *reader, void *context);
33 // Creates a new eager reader object, which pulls data from |fd_to_read| into
46 // Frees an eager reader object, and associated internal resources.
47 // |reader| may be NULL.
48 void eager_reader_free(eager_reader_t *reader);
50 // Registers |reader| with the |reactor|. When the reader has data
52 // Neither |reader|, nor |reactor|, nor |read_cb| may be NULL. |context| may be NULL.
53 void eager_reader_register(eager_reader_t *reader, reactor_t *reactor, eager_reader_cb read_cb, void *context);
55 // Unregisters |reader| fro
[all...]
/system/core/logd/
H A DLogListener.h25 LogReader *reader; member in class:LogListener
28 LogListener(LogBuffer *buf, LogReader *reader);
H A DLogAudit.h25 LogReader *reader; member in class:LogAudit
30 LogAudit(LogBuffer *buf, LogReader *reader, int fdDmesg);
H A DLogKlog.h28 LogReader *reader; member in class:LogKlog
44 LogKlog(LogBuffer *buf, LogReader *reader, int fdWrite, int fdRead, bool auditd);
H A DLogListener.cpp31 LogListener::LogListener(LogBuffer *buf, LogReader *reader) : argument
34 reader(reader) {
104 reader->notifyNewLog();
H A DCommandListener.h33 CommandListener(LogBuffer *buf, LogReader *reader, LogListener *swl);
45 ShutdownCmd(LogBuffer *buf, LogReader *reader, LogListener *swl);
H A DFlushCommand.cpp25 FlushCommand::FlushCommand(LogReader &reader, argument
31 mReader(reader),
40 // log reader socket. Here we manage and associated the reader
H A DLogTimes.cpp26 LogTimeEntry::LogTimeEntry(LogReader &reader, SocketClient *client, argument
35 mReader(reader),
83 LogReader &reader = me->mReader; local
84 LastLogTimes &times = reader.logbuf().mTimes;
97 reader.release(client);
111 prctl(PR_SET_NAME, "logd.reader.per");
H A Dmain.cpp328 // transitory per-client threads are created for each reader.
399 // socket connection, and as a reader lock on a range of log
418 LogReader *reader = new LogReader(logBuf); local
419 if (reader->startListener()) {
427 LogListener *swl = new LogListener(logBuf, reader);
436 CommandListener *cl = new CommandListener(logBuf, reader, swl);
450 al = new LogAudit(logBuf, reader, dmesg ? fdDmesg : -1);
455 kl = new LogKlog(logBuf, reader, fdDmesg, fdPmesg, al != NULL);
H A DLogAudit.cpp40 LogAudit::LogAudit(LogBuffer *buf, LogReader *reader, int fdDmesg) : argument
43 reader(reader),
233 reader->notifyNewLog();
H A DLogTimes.h51 LogTimeEntry(LogReader &reader, SocketClient *client, bool nonBlock,
H A DLogKlog.cpp175 LogKlog::LogKlog(LogBuffer *buf, LogReader *reader, int fdWrite, int fdRead, bool auditd) : argument
178 reader(reader),
643 reader->notifyNewLog();
H A DCommandListener.cpp35 CommandListener::CommandListener(LogBuffer *buf, LogReader * /*reader*/,
50 CommandListener::ShutdownCmd::ShutdownCmd(LogBuffer *buf, LogReader *reader, argument
54 mReader(*reader),
H A DLogBufferElement.cpp193 uint64_t LogBufferElement::flushTo(SocketClient *reader, LogBuffer *parent) { argument
223 uint64_t retval = reader->sendDatav(iovec, 2) ? FLUSH_ERROR : mSequence;
H A DLogBuffer.cpp336 // First there is a prep phase where we discover the reader region lock that
368 // lock is causing us to buffer too much in the logs to help the reader(s),
369 // and will tell the slowest reader thread to skip log entries, and if
370 // persistent and hits a further threshold, kill the reader thread.
607 // kick a misbehaving log reader client off the island
625 // Do not save the whitelist if we are reader range limited
638 // kick a misbehaving log reader client off the island
690 SocketClient *reader, const uint64_t start, bool privileged,
694 uid_t uid = reader->getUid();
739 max = element->flushTo(reader, thi
689 flushTo( SocketClient *reader, const uint64_t start, bool privileged, int (*filter)(const LogBufferElement *element, void *arg), void *arg) argument
[all...]
/system/bt/osi/test/
H A Deager_reader_test.cpp87 static void expect_data(eager_reader_t *reader, void *context) { argument
93 EXPECT_EQ((size_t)1, eager_reader_read(reader, &byte, 1, true));
100 static void expect_data_multibyte(eager_reader_t *reader, void *context) { argument
107 int bytes_read = eager_reader_read(reader, buffer, bytes_to_read, false);
118 eager_reader_t *reader = eager_reader_new(pipefd[0], &allocator_malloc, BUFFER_SIZE, SIZE_MAX, "test_thread"); local
119 ASSERT_TRUE(reader != NULL);
120 eager_reader_free(reader);
124 eager_reader_t *reader = eager_reader_new(pipefd[0], &allocator_malloc, BUFFER_SIZE, SIZE_MAX, "test_thread"); local
127 eager_reader_register(reader, thread_get_reactor(read_thread), expect_data, (void *)small_data);
132 eager_reader_free(reader);
137 eager_reader_t *reader = eager_reader_new(pipefd[0], &allocator_malloc, BUFFER_SIZE, SIZE_MAX, "test_thread"); local
[all...]
/system/extras/simpleperf/
H A Dcmd_record_test.cpp63 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance("perf.data"); local
64 ASSERT_TRUE(reader != nullptr);
65 std::vector<std::unique_ptr<const Record>> records = reader->DataSection();
82 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance("perf.data"); local
83 ASSERT_TRUE(reader != nullptr);
84 const FileHeader* file_header = reader->FileHeader();
87 ASSERT_GT(reader->FeatureSectionDescriptors().size(), 0u);
H A Drecord_file_test.cpp70 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(filename); local
71 ASSERT_TRUE(reader != nullptr);
72 const FileHeader* file_header = reader->FileHeader();
74 std::vector<const FileAttr*> attrs = reader->AttrSection();
77 std::vector<uint64_t> ids = reader->IdsForAttr(attrs[0]);
81 std::vector<std::unique_ptr<const Record>> records = reader->DataSection();
88 std::vector<SectionDesc> sections = reader->FeatureSectionDescriptors();
91 reinterpret_cast<const perf_event_header*>(reader->DataAtOffset(sections[0].offset));
96 ASSERT_TRUE(reader->Close());
H A Denvironment.cpp41 LineReader reader(fp);
43 if ((line = reader.ReadLine()) != nullptr) {
83 LineReader reader(fp);
85 while ((line = reader.ReadLine()) != nullptr) {
87 char name[reader.MaxLineSize()];
88 char module[reader.MaxLineSize()];
148 LineReader reader(fp);
150 while ((line = reader.ReadLine()) != nullptr) {
152 char name[reader.MaxLineSize()];
259 LineReader reader(f
[all...]
H A Drecord_file.cpp327 auto reader = std::unique_ptr<RecordFileReader>(new RecordFileReader(filename, fd)); local
328 if (!reader->MmapFile()) {
331 return reader;
/system/bt/hci/src/
H A 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);
97 LOG_ERROR("%s unable to create eager reader for the event uart serial port.", __func__);
103 LOG_ERROR("%s unable to create eager reader for the acl-in uart serial port.", __func__);
181 static void event_event_stream_has_bytes(UNUSED_ATTR eager_reader_t *reader, UNUSED_ATTR void *context) { argument
185 static void event_acl_stream_has_bytes(UNUSED_ATTR eager_reader_t *reader, UNUSED_ATTR void *context) { argument
H A Dhci_hal_h4.c54 static void event_uart_has_bytes(eager_reader_t *reader, void *context);
87 LOG_ERROR("%s unable to create eager reader for the uart serial port.", __func__);
220 static void event_uart_has_bytes(eager_reader_t *reader, UNUSED_ATTR void *context) { argument
225 if (eager_reader_read(reader, &type_byte, 1, true) == 0) {

Completed in 303 milliseconds