Refactor location of DefaultAffinity().

Change-Id: I5fbebefb6db8fc2b65da0e4d87f5d7ed8c759918
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/realtime.h b/aos/realtime.h
index 55ef5f9..caf0daa 100644
--- a/aos/realtime.h
+++ b/aos/realtime.h
@@ -38,6 +38,15 @@
   return result;
 }
 
+// Returns the affinity representing all the CPUs.
+inline cpu_set_t DefaultAffinity() {
+  cpu_set_t result;
+  for (int i = 0; i < CPU_SETSIZE; ++i) {
+    CPU_SET(i, &result);
+  }
+  return result;
+}
+
 // Returns the current thread's CPU affinity.
 cpu_set_t GetCurrentThreadAffinity();