Move spc2pcoreid and pcoreid2spc into header file
authorKevin Klues <klueska@cs.berkeley.edu>
Mon, 28 Sep 2015 21:52:33 +0000 (14:52 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 24 Nov 2015 19:48:50 +0000 (14:48 -0500)
commitd72cd7fae7f2cd94e7b286c73f6e6768104a1745
tree4c90458653fc7b5a7a6aee4f57cbb1e9597ca0a0
parent5e62a22a95933b2661e94c049d03dcbac142cdc9
Move spc2pcoreid and pcoreid2spc into header file

All of schedule.c, coreprov.c and corealloc.c will need access to these
functions, and we want them to be fast. To make this possible, we move
the *definition* of these functions into the corerequest.h header file
(otherwise we would just put their declaration in the header). It's a
little unfortunate that we need to extern in the all_pcores variable
(mostly because this ties us to an implementation where all pcores are
allocated next to each other in memory), but it's worth it to make this
call fast.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/corerequest.h
kern/src/schedule.c