aos: Make SetCurrentThreadAffinity errors a bit nicer

When the SetCurrentThreadAffinity call fails, it prints this error
message:

    Check failed: sched_setaffinity(0, sizeof(cpuset), &cpuset) == 0: Invalid argument [22]

It doesn't actually tell you what CPUs you tried to set. That can make
debugging harder. This patch fixes that by enhancing the error message
to print the set of CPUs that were pass in.

Change-Id: I3ae58f8a6c38b564b3706517a73e9ad43d85ef53
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/realtime.h b/aos/realtime.h
index caf0daa..261eb26 100644
--- a/aos/realtime.h
+++ b/aos/realtime.h
@@ -3,6 +3,7 @@
 
 #include <sched.h>
 
+#include <ostream>
 #include <string_view>
 
 #include "glog/logging.h"
@@ -28,6 +29,9 @@
 // name can have a maximum of 16 characters.
 void SetCurrentThreadName(const std::string_view name);
 
+// Stringifies the cpu_set_t for streams.
+std::ostream &operator<<(std::ostream &stream, const cpu_set_t &cpuset);
+
 // Creates a cpu_set_t from a list of CPUs.
 inline cpu_set_t MakeCpusetFromCpus(std::initializer_list<int> cpus) {
   cpu_set_t result;