sched_getcpu implements a Unixy interface; to a first order
approximation, Unix would only know about what we would think
of as a 'vcore': Unix and Linux view the world as if they
provide a virtual layer around the *entire* computer, but
Akaros's MCP is not like that: it's a subset of the machine.

Anyway, hide the pcore ID from the legacy interface: if someone
wants to do something esoteric where they need to know the pcore
ID they can use parlib directly.

Change-Id: I9627c9c1d6b21282cd07b24b30c097f4d3726748
Signed-off-by: Dan Cross <[email protected]>
---
 .../gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/sched_getcpu.c     | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git 
a/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/sched_getcpu.c 
b/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/sched_getcpu.c
index dbd27ff..26da57a 100644
--- a/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/sched_getcpu.c
+++ b/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/sched_getcpu.c
@@ -21,11 +21,5 @@
 
 int sched_getcpu(void)
 {
-       int vcid;
-
-       vcid = vcore_id();
-       if (vcid == -1)
-               return -1;
-
-       return __procinfo.vcoremap[vcid].pcoreid;
+       return vcore_id();
 }
-- 
2.8.0.rc3.226.g39d4020

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to