Merge changes I04498a3c,I8f757551
* changes:
Merge commit 'a2c0d4ff19b9c4403b29b6b1851526fb402965a2' as 'third_party/lksctp-tools'
Squashed 'third_party/lksctp-tools/' content from commit 200eca7f1
diff --git a/aos/events/shm_event_loop.cc b/aos/events/shm_event_loop.cc
index e30e2f2..de941c3 100644
--- a/aos/events/shm_event_loop.cc
+++ b/aos/events/shm_event_loop.cc
@@ -160,7 +160,8 @@
class SimpleShmFetcher {
public:
explicit SimpleShmFetcher(const Channel *channel)
- : lockless_queue_memory_(channel),
+ : channel_(channel),
+ lockless_queue_memory_(channel),
lockless_queue_(lockless_queue_memory_.memory(),
lockless_queue_memory_.config()),
data_storage_(static_cast<AlignedChar *>(aligned_alloc(
@@ -218,12 +219,13 @@
// being written to, which means you are pretty far behind.
CHECK(read_result != ipc_lib::LocklessQueue::ReadResult::OVERWROTE)
<< ": Got behind while reading and the last message was modified "
- "out "
- "from under us while we were reading it. Don't get so far "
- "behind.";
+ "out from under us while we were reading it. Don't get so far "
+ "behind. "
+ << configuration::CleanedChannelToString(channel_);
CHECK(read_result != ipc_lib::LocklessQueue::ReadResult::TOO_OLD)
- << ": The next message is no longer available.";
+ << ": The next message is no longer available. "
+ << configuration::CleanedChannelToString(channel_);
return read_result == ipc_lib::LocklessQueue::ReadResult::GOOD;
}
@@ -267,18 +269,20 @@
// being written to, which means you are pretty far behind.
CHECK(read_result != ipc_lib::LocklessQueue::ReadResult::OVERWROTE)
<< ": Got behind while reading and the last message was modified "
- "out "
- "from under us while we were reading it. Don't get so far "
- "behind.";
+ "out from under us while we were reading it. Don't get so far "
+ "behind."
+ << configuration::CleanedChannelToString(channel_);
CHECK(read_result != ipc_lib::LocklessQueue::ReadResult::NOTHING_NEW)
- << ": Queue index went backwards. This should never happen.";
+ << ": Queue index went backwards. This should never happen. "
+ << configuration::CleanedChannelToString(channel_);
// We fell behind between when we read the index and read the value.
// This isn't worth recovering from since this means we went to sleep
// for a long time in the middle of this function.
CHECK(read_result != ipc_lib::LocklessQueue::ReadResult::TOO_OLD)
- << ": The next message is no longer available.";
+ << ": The next message is no longer available. "
+ << configuration::CleanedChannelToString(channel_);
return read_result == ipc_lib::LocklessQueue::ReadResult::GOOD;
}
@@ -291,6 +295,7 @@
void UnregisterWakeup() { lockless_queue_.UnregisterWakeup(); }
private:
+ const Channel *const channel_;
MMapedQueue lockless_queue_memory_;
ipc_lib::LocklessQueue lockless_queue_;
diff --git a/aos/ipc_lib/shared_mem.cc b/aos/ipc_lib/shared_mem.cc
index 3bb7267..461e254 100644
--- a/aos/ipc_lib/shared_mem.cc
+++ b/aos/ipc_lib/shared_mem.cc
@@ -18,7 +18,7 @@
#define AOS_SHM_NAME "/aos_shared_mem"
// Size of the shared mem segment.
// This must fit in the tmpfs for /dev/shm/
-#define SIZEOFSHMSEG (4096 * 0x3000)
+#define SIZEOFSHMSEG (4096 * 0x800)
void init_shared_mem_core(aos_shm_core *shm_core) {
memset(&shm_core->time_offset, 0 , sizeof(shm_core->time_offset));
diff --git a/aos/logging/implementations.cc b/aos/logging/implementations.cc
index 5b324b1..89fc904 100644
--- a/aos/logging/implementations.cc
+++ b/aos/logging/implementations.cc
@@ -250,7 +250,7 @@
} // namespace
RawQueue *GetLoggingQueue() {
- return RawQueue::Fetch("LoggingQueue", sizeof(LogMessage), 1323, 40000);
+ return RawQueue::Fetch("LoggingQueue", sizeof(LogMessage), 1323, 10000);
}
void RegisterQueueImplementation() {