Add the ability to pin shared memory for reads

This can increase performance for some specific use cases with large
messages.

Change-Id: I38deaf3ce85a70c0ac11510757d193fd39ad29bb
diff --git a/aos/configuration.cc b/aos/configuration.cc
index 927e9d3..834ab5b 100644
--- a/aos/configuration.cc
+++ b/aos/configuration.cc
@@ -299,6 +299,11 @@
         continue;
       }
 
+      CHECK_EQ(c->read_method() == ReadMethod::PIN, c->num_readers() != 0)
+          << ": num_readers may be set if and only if read_method is PIN,"
+             " if you want 0 readers do not set PIN: "
+          << CleanedChannelToString(c);
+
       // Attempt to insert the channel.
       auto result = channels.insert(CopyFlatBuffer(c));
       if (!result.second) {