From: Justin Cinkelj <justin.cink...@xlab.si>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master

libc: implement sched_getcpu

Signed-off-by: Justin Cinkelj <justin.cink...@xlab.si>
Message-Id: <20170123104417.14205-1-justin.cink...@xlab.si>

---
diff --git a/libc/libc.cc b/libc/libc.cc
--- a/libc/libc.cc
+++ b/libc/libc.cc
@@ -108,6 +108,11 @@ int sched_yield()
     return 0;
 }

+extern "C" int sched_getcpu()
+{
+    return sched::cpu::current()->id;
+}
+
 extern "C"
 int getloadavg(double loadavg[], int nelem)
 {

--
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to