Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slite and parallel runtime work #402

Open
wants to merge 144 commits into
base: ppos
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
1d10a97
Remove unused console.c
phanikishoreg Feb 3, 2018
fa6012c
Cleaning up namespace in platform/i386
phanikishoreg Feb 3, 2018
83503b3
rename miniacpi to acpi.
phanikishoreg Feb 4, 2018
a3f514e
Moved ACPI MADT specifics out of LAPIC.c
phanikishoreg Feb 4, 2018
72f7eb1
Added support for IOAPIC (disabled PIC)
phanikishoreg Feb 5, 2018
0c1b503
Merge branch 'ppos' of https://github.com/gwsystems/composite into io…
phanikishoreg Feb 5, 2018
17a0a81
Basic support for multiple IOAPICs (not tested with multiple)
phanikishoreg Feb 5, 2018
37d3449
Cleanup from self-review of the PR
phanikishoreg Feb 5, 2018
b7342e3
ioapic mask/unmask (untested)
phanikishoreg Feb 7, 2018
e15ba5b
Review feedback fixes
phanikishoreg Feb 9, 2018
1ed8310
IOAPIC bugfixes
phanikishoreg Mar 9, 2018
1d31ef1
Merge branch 'ppos' of https://github.com/gwsystems/composite into io…
phanikishoreg Apr 14, 2018
9a48aa2
Bugfix, enable/disable on HW_ATTACH/DETACH
phanikishoreg Apr 14, 2018
38687de
test
yzcode Apr 17, 2018
a77b6c1
set ldr for cores
yzcode Apr 19, 2018
5e89233
finish logical mode
yzcode Apr 21, 2018
0404169
change hw_asnd_caps to 2d array
yzcode Apr 21, 2018
2002aff
remove debug lines
yzcode Apr 21, 2018
a643b0c
add return value to chal_irq_XXX
yzcode Apr 21, 2018
73b339a
Merge pull request #1 from yzcode/ioapic
phanikishoreg Apr 21, 2018
b52203a
Merge pull request #346 from phanikishoreg/smp
gparmer Apr 21, 2018
3f34e15
fix hpet
yzcode Apr 23, 2018
43bc767
fix conflict
yzcode Apr 23, 2018
b6e847a
fix merge
yzcode Apr 23, 2018
29ae53e
fix merge 2
yzcode Apr 23, 2018
d542075
use non-legacy mode of hpet
yzcode Apr 24, 2018
e5d7145
Round-robin scheduling in sl (w/o priorities)
phanikishoreg Feb 14, 2019
1542f3c
Prototype for user-level dispatching of kernel-level thread resources
phanikishoreg Feb 14, 2019
a2c1cd3
Remove warnings with -O3 compilation
phanikishoreg Feb 14, 2019
735c723
Use RR in sl unit test
phanikishoreg Feb 14, 2019
45f6535
(incomplete) Modifications to have kernel shared DCB and SCB areas
phanikishoreg Feb 18, 2019
5913090
Fixed user-level dispatch which also works with timer interrupts
phanikishoreg Feb 22, 2019
d558e3b
Removed push and pop of registers (works!) and added TODOs
phanikishoreg Feb 22, 2019
35bfd0d
use offsets for kernel dispatch "ip" in user-level dispatch routine
phanikishoreg Feb 27, 2019
11e6312
User-level scheduling synchronization using sched_tok in the SCB
phanikishoreg Feb 28, 2019
bedf48e
scb and dcb capabilities and resources
phanikishoreg Mar 8, 2019
fb5a7e9
SCB and DCB capabilities
phanikishoreg Mar 11, 2019
8023104
bug in restore function
phanikishoreg Mar 17, 2019
230cec9
adds same component check for current kernel and user threads in lazy…
phanikishoreg Mar 17, 2019
08174b1
change function name to lazyupdate
phanikishoreg Mar 17, 2019
28c3f14
Bugfix in capmgr for copying initaep caps
phanikishoreg Mar 18, 2019
7f40fe0
Fixed user-level dispatch in root-scheduler component
phanikishoreg Mar 18, 2019
cc23348
Current state, with optimized sl_thd_yield
phanikishoreg Apr 1, 2019
89adbbc
Fix errors with GCC7, -r and -pie cannot be used together
phanikishoreg Apr 1, 2019
1b8c8c1
Removed debug printc
phanikishoreg Apr 1, 2019
f1dd90b
Fixed usage of interfaces with return values
phanikishoreg Apr 2, 2019
c5f2589
32bit compilation in gcc
phanikishoreg Apr 4, 2019
dd3a1f6
optimizing sched_events and pending : code not working yet
phanikishoreg Apr 5, 2019
5bfe50c
Fixed cos_ulsched_rcv, unit-tested for basic use!
phanikishoreg Apr 5, 2019
43096d8
Add OMP & GOMP backend in Composite
phanikishoreg Apr 18, 2019
656f5eb
Adds omp_dijkstra and more in gomp library
phanikishoreg Apr 21, 2019
a5f3180
Fixed naming: `sl_xcpu` to `sl_xcore` and `nparams` in API
phanikishoreg Apr 22, 2019
c6d0047
Modified sl_xcore allocation api to be synchronous
phanikishoreg Apr 22, 2019
f1ba822
Merge branch 'smp-ioapic' of https://github.com/gwsystems/composite i…
phanikishoreg Apr 23, 2019
4c83c03
Platform fixes beyond smp branch
phanikishoreg Apr 23, 2019
39e86e2
32bit compilation on a 64bit system
phanikishoreg Apr 23, 2019
a66997a
Merge branch 'usched_work' of https://github.com/phanikishoreg/compos…
phanikishoreg Apr 23, 2019
579d364
Bugfixes and cleanup after a massive merge
phanikishoreg Apr 23, 2019
0c75f1d
ICV api in cos_omp and move cos_gomp to directory
phanikishoreg Apr 29, 2019
4022a73
Initial Composite RunTime (crt) support for block points and mutexes
gparmer May 6, 2019
36a980c
Refined the tests for the blkpt-based lock implementation.
gparmer May 6, 2019
1f721c5
Maked one aspect of blockpoints work on multi-core: blocked thread tr…
gparmer May 7, 2019
ecce29d
Fixed spelling error in stacklist header comment
gparmer May 7, 2019
4f1820f
part: parallel runtime in composite, first draft
phanikishoreg May 8, 2019
7c0e7f7
Merge branch 'crt' of https://github.com/gwsystems/composite into uls…
phanikishoreg May 8, 2019
98169a7
FPRR: bitmap for priorities
phanikishoreg May 9, 2019
a2b6e58
crt_lock, stack-list multi-core and bugfixes in sl/capmgr/part/gomp
phanikishoreg May 10, 2019
81279e0
fixed task construct basic working
phanikishoreg May 11, 2019
4b2fb90
Added primitive, blocking message queue support
gparmer May 12, 2019
869e7ab
common init.c for omp execution
phanikishoreg May 12, 2019
d0fbd49
bugfixes in part and added bots-fib benchmark
phanikishoreg May 14, 2019
6632a20
block/wakeup thread pool in part
phanikishoreg May 14, 2019
3467e07
added bots sort, TODO: debug
phanikishoreg May 14, 2019
f979d29
part: idle thread on all cores to wakeup threads using sl_mod_part_fifo
phanikishoreg May 14, 2019
efcde0b
changed time output to use cos_time api in BOTS
phanikishoreg May 14, 2019
3482929
fix a race in dequeue
phanikishoreg May 15, 2019
648eef6
Thread migration kernel and user-level
phanikishoreg May 15, 2019
d19c3a3
use global main_task if no nesting for outer parallel construct
phanikishoreg May 15, 2019
14128a5
For migration, previously changed thd cap's size to take one full cache
phanikishoreg May 15, 2019
11a1623
fixed line-wraps for some.
phanikishoreg May 15, 2019
218490e
Fixed blocking and now fibonacci is way faster
phanikishoreg May 15, 2019
2f7c761
Bumped up number of cores.
phanikishoreg May 15, 2019
d88f400
fixed gcc warnings for -ve core id
phanikishoreg May 15, 2019
e2af6f8
yield api with timeout to program timers
phanikishoreg May 15, 2019
9b4d023
Merge branch 'crt' of https://github.com/gwsystems/composite into uls…
phanikishoreg May 15, 2019
8f870d8
use heap for deque
phanikishoreg May 15, 2019
fefa23d
Fixed a race in explicit task execution
phanikishoreg May 16, 2019
48bdcbc
fixed timer programming to be either for an earlier timeout
phanikishoreg May 16, 2019
271f23c
change to upcas in deque for core-local push/pop
phanikishoreg May 16, 2019
c91f6eb
fixed timeout based slowpath in sl
phanikishoreg May 17, 2019
bc0ae03
Modified part to use blocking vs yielding for synchronization
phanikishoreg May 17, 2019
25b108c
merge error fix: was causing general protection fault in ipi snd
phanikishoreg May 17, 2019
d6a64fb
consistency fix in lazy restore for preemption
phanikishoreg May 18, 2019
93c5203
Fixed explicit task allocation to use per-core list
phanikishoreg May 18, 2019
31dc99c
remove unnecessary pushes used in debugging
phanikishoreg May 18, 2019
8779376
schedule something instead of spinnning for response
phanikishoreg May 18, 2019
7776e50
fixing tied version in sort
phanikishoreg May 18, 2019
99af5e8
the last thread doesn't block after waking up master on barrier
phanikishoreg May 18, 2019
223b7d3
Fixed ipi preemption problem
phanikishoreg May 18, 2019
abb169b
Fixed ipi preemption problem
phanikishoreg May 18, 2019
363767e
Merge branch 'ulsched' of https://github.com/phanikishoreg/composite …
phanikishoreg May 18, 2019
1a4aa60
token checking code restored (missed in debugging)
phanikishoreg May 18, 2019
51f6cd9
Multiple wakeups cause race in SL.
phanikishoreg May 18, 2019
1dd7c44
Merge branch 'ulsched' of https://github.com/phanikishoreg/composite …
phanikishoreg May 18, 2019
48cd69b
Multiple wakeups cause race in SL.
phanikishoreg May 18, 2019
7dffdb4
fix comment
phanikishoreg May 19, 2019
84d860e
Modified to not use capmgr for now
phanikishoreg May 19, 2019
7bc6a9d
Fixed? :Thread blocking when it is already blocked
phanikishoreg May 20, 2019
ed7191c
Merge branch 'ulsched' of https://github.com/phanikishoreg/composite …
phanikishoreg May 20, 2019
f4554e4
Merge branch 'ulsched' of https://github.com/phanikishoreg/composite …
phanikishoreg May 20, 2019
e1bf367
Fixed end barrier for worker threads to not wait
phanikishoreg May 20, 2019
4bf72b0
Added more BOTS benchmarks - fft, sparselu (not working), strassen
phanikishoreg May 21, 2019
3269cd1
Fixed user-level sl_thd_rcv
phanikishoreg May 22, 2019
7c5d142
test program to test sl_thd_rcv(), uses IPIs for interrupts.
phanikishoreg May 22, 2019
357676b
SparseLU works but is not stable (remember to bump up number of tasks to
phanikishoreg May 22, 2019
e05963a
makefile fix: cannot clean ps on distclean (first time)
phanikishoreg May 22, 2019
8dc3f88
Timer programming only in the case of scheduler thread scheduling
phanikishoreg May 23, 2019
8e28bcf
Added the program for work-conservation problem analysis
phanikishoreg May 23, 2019
3ad80d2
random changes on the last 2 days
phanikishoreg May 24, 2019
ba5ef18
Merge branch 'ulsched_lastday' of github.com:phanikishoreg/composite …
phanikishoreg Sep 3, 2019
fd0aa64
bugfix after removing code duplication in capmgr
phanikishoreg Sep 13, 2019
d15bdf8
debugging sched thread user-level switch
phanikishoreg Sep 13, 2019
6d588a8
possible working sl_sched_rcv
phanikishoreg Sep 13, 2019
1268b9b
work : work generator using spinning
phanikishoreg Sep 16, 2019
dcd1d5e
hpet attach api in cos_kernel_api
phanikishoreg Sep 16, 2019
94e3a54
debugging userlevel rcv and sched
phanikishoreg Sep 19, 2019
6f65807
Merge branch 'slite' of https://github.com/phanikishoreg/composite in…
phanikishoreg Sep 20, 2019
b8a791e
crt_chan interface for standard in and out
phanikishoreg Sep 24, 2019
6520d9e
invocations + slite switch
phanikishoreg Sep 26, 2019
e5fbdc9
p2p channel api and multi-component test updated with p2p
phanikishoreg Oct 2, 2019
e092711
using p2p in hierarchical test
phanikishoreg Oct 2, 2019
4be00fd
switch to scheduler if there are more events pending in the kernel
phanikishoreg Oct 2, 2019
291e21b
pending for user-level rcv
phanikishoreg Oct 3, 2019
a2d2286
Timers disabled coz of cos_thd_switch in ul switch
phanikishoreg Oct 3, 2019
59de0a3
fixes in isolation and security tests
phanikishoreg Oct 7, 2019
57f3023
removed debug assert, cleaned up test programs
phanikishoreg Oct 17, 2019
529ae44
disable tcap check
phanikishoreg Oct 18, 2019
3ed8962
iters change in channel test
phanikishoreg Oct 18, 2019
89a2ee2
allow make clean all from src/
phanikishoreg Nov 1, 2019
b9b9006
part for NTHDS > 1 on single core and a test program
phanikishoreg Nov 1, 2019
11f53b4
Merge branch 'slite' of https://github.com/phanikishoreg/composite in…
phanikishoreg May 20, 2020
6d500f4
merge with my own branches first
phanikishoreg May 21, 2020
da5c2a4
Merge branch 'ppos' of https://github.com/gwsystems/composite into part
phanikishoreg May 22, 2020
bb1476b
indentation in kernel_tests is off completely
phanikishoreg May 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
MAKEFLAGS=--no-print-directory --section-alignment 0x1000 -I$(PWD)
#$(info Make flags $(MAKEFLAGS))

default: | all cp
default: | all

all: comps plat
all: comps plat cp

comps:
$(info )
Expand Down
21 changes: 11 additions & 10 deletions src/components/Makefile.comp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ MUSLBIN=$(MUSLDIR)/bin
MUSLCC=$(MUSLBIN)/musl-$(CC)
MUSLINC=-isystem$(MUSLDIR)/include

PSLIBDIR=$(LIBDIR)/ps
CKDIR=$(LIBDIR)/ck
CKLIBDIR=$(CKDIR)/lib
CKINCDIR=$(CKDIR)/include
Expand Down Expand Up @@ -40,26 +41,26 @@ LUAINC=-I$(LUADIR)/src -I$(LUABASE)/cos/include

INC_PATH=-I./ -I$(CDIR)/include/ -I$(CDIR)/interface/ -I$(SHAREDINC) -I$(CKINCDIR)
SHARED_FLAGS=-fno-merge-constants -nostdinc -nostdlib -fno-pic
OPT= -g -fvar-tracking
#OPT= -O3
OPT = -g -fvar-tracking
OPT += -O3
CFLAGS=-m32 -D__x86__ -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -fno-stack-protector -fno-omit-frame-pointer -Wno-unused-variable $(INC_PATH) $(MUSLINC) $(LWIPINC) $(LUAINC) $(OPT) $(SHARED_FLAGS)
CXXFLAGS=-fno-exceptions -fno-threadsafe-statics -Wno-write-strings $(CFLAGS)
LDFLAGS=-melf_i386
MUSLCFLAGS=$(CFLAGS) -lc -lgcc -Xlinker -r
ASFLAGS=-m32 $(INC_PATH) $(SHARED_FLAGS)

SERVER_STUB=s_stub.o
CLIENT_STUB=c_stub.o

LIBCOSDEFKERN=-lcos_kernel_api -lcos_defkernel_api
LIBSLCORE=$(LIBCOSDEFKERN) -lsl_sched -lheap -lsl_xcpu -lsl_child -lck
LIBSLCAPMGR=$(LIBSLCORE) -lsl_capmgr
LIBSLRAW=$(LIBSLCORE) -lsl_raw

GCC_PIE=$(shell gcc -v 2>&1 | grep -c "\--enable-default-pie")
ifeq ($(GCC_PIE),1)
MUSLCFLAGS+=-no-pie
LDFLAGS+=-no-pie
CFLAGS+=-fno-pie
CXXFLAGS+=-fno-pie
endif

SERVER_STUB=s_stub.o
CLIENT_STUB=c_stub.o

LIBCOSDEFKERN=-lcos_kernel_api -lcos_defkernel_api
LIBSLCORE=$(LIBCOSDEFKERN) -lsl_sched -lheap -lsl_xcore -lsl_child -lck
LIBSLCAPMGR=$(LIBSLCORE) -lsl_capmgr
LIBSLRAW=$(LIBSLCORE) -lsl_raw -lcos_dcb
2 changes: 1 addition & 1 deletion src/components/implementation/Makefile.subsubdir
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ TMP_STR2=tmp2
INCLUDE=-I../ $(DEP_INC) $(IF_INCLUDE) $(CINC)
LIB_LIBRARIES_PRE=$(DEP_LIB_EXIST)
LIB_LIBRARIES=$(strip $(LIB_LIBRARIES_PRE))
LIB_FLAGS=-L$(CKLIBDIR) -L$(LIBDIR) -L$(LIBCXXDIR) $(DEP_LIB) $(LIB_LIBRARIES) $(ADDITIONAL_LIBS)
LIB_FLAGS=-L$(PSLIBDIR) -L$(CKLIBDIR) -L$(LIBDIR) -L$(LIBCXXDIR) $(DEP_LIB) $(LIB_LIBRARIES) $(ADDITIONAL_LIBS)

C_SOURCES=$(C_OBJS:%.o=%.c)
CXX_SOURCES=$(CXX_OBJS:%.o=%.cc)
Expand Down
2 changes: 1 addition & 1 deletion src/components/implementation/capmgr/naive/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
C_OBJS=cap_mgr.c mem_mgr.c init.c
ASM_OBJS=
COMPONENT=capmgr.o
INTERFACES=capmgr channel
INTERFACES=capmgr channel work
DEPENDENCIES=
IF_LIB=
ADDITIONAL_LIBS=$(LIBSLRAW) -lsl_mod_fprr -lsl_thd_static_backend
Expand Down
31 changes: 28 additions & 3 deletions src/components/implementation/capmgr/naive/cap_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,27 @@ cap_info_thd_next(struct cap_comp_info *rci)
return NULL;
}

void
cap_info_cpu_initdcb_init(struct cap_comp_info *rci)
{
dcbcap_t initdcb = 0;
unsigned short init_off = 0;
vaddr_t initaddr = 0;
struct cos_compinfo *ci = cos_compinfo_get(cap_info_dci(rci));
struct cap_comp_cpu_info *rci_cpu = cap_info_cpu_local(rci);

if (rci->cid == 0 || rci->cid == cos_spd_id()) {
cos_dcb_info_init_ext(cap_info_cpu_dcbdata(rci_cpu), 0, 0, 0, 0);
return;
}

initaddr = rci->init_dcb_start + cos_cpuid() * PAGE_SIZE;
initdcb = cos_dcb_alloc(cos_compinfo_get(cos_defcompinfo_curr_get()), ci->pgtbl_cap, initaddr);
assert(initdcb);

cos_dcb_info_init_ext(cap_info_cpu_dcbdata(rci_cpu), ci, initdcb, initaddr, init_off);
}

struct cap_comp_info *
cap_info_comp_init(spdid_t spdid, captblcap_t captbl_cap, pgtblcap_t pgtbl_cap, compcap_t compcap,
capid_t cap_frontier, vaddr_t heap_frontier, spdid_t sched_spdid)
Expand All @@ -76,13 +97,16 @@ cap_info_comp_init(spdid_t spdid, captblcap_t captbl_cap, pgtblcap_t pgtbl_cap,

capci[spdid].cid = spdid;
cos_meminfo_init(&ci->mi, 0, 0, 0);
cos_compinfo_init(ci, pgtbl_cap, captbl_cap, compcap, heap_frontier, cap_frontier,
cos_compinfo_get(cos_defcompinfo_curr_get()));
cos_compinfo_init(ci, pgtbl_cap, captbl_cap, compcap, heap_frontier,
cap_frontier, cos_compinfo_get(cos_defcompinfo_curr_get()));

memset(rglb, 0, sizeof(struct cap_shmem_glb_info));
memset(cap_shi, 0, sizeof(struct cap_shmem_info));
cap_shi->cinfo = ci;

capci[spdid].init_dcb_start = heap_frontier - (NUM_CPU * PAGE_SIZE);
cap_info_cpu_initdcb_init(&capci[spdid]);

capci[spdid].initflag = 1;
ps_faa((unsigned long *)&cap_comp_count, 1);

Expand Down Expand Up @@ -336,7 +360,8 @@ cap_shmem_region_find(cos_channelkey_t key)
cbuf_t i, free = rglb->free_region_id;

for (i = 1; i <= free; i++) {
if (ps_load((unsigned long *)&rglb->region_keys[i - 1]) == key) {
cos_channelkey_t *k = &rglb->region_keys[i - 1];
if (ps_load((unsigned long *)k) == (unsigned long)key) {
id = i;
break;
}
Expand Down
34 changes: 26 additions & 8 deletions src/components/implementation/capmgr/naive/cap_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <capmgr.h>
#include <memmgr.h>
#include <bitmap.h>
#include <cos_dcb.h>

#define CAP_INFO_MAX_THREADS (MAX_NUM_THREADS)

Expand All @@ -29,12 +30,12 @@ struct cap_shmem_glb_info {
};

struct cap_comm_info {
arcvcap_t rcvcap; /* rcv capid in capmgr! */
cpuid_t rcvcpuid;
cycles_t ipiwin, ipiwin_start; /* TODO: synchronize TSC on all cores */
u32_t ipicnt, ipimax;
asndcap_t sndcap[NUM_CPU]; /* for cross-core asnds */
sinvcap_t sinvcap[NUM_CPU]; /* for each core (except for the same core!) */
arcvcap_t rcvcap; /* rcv capid in capmgr! */
cpuid_t rcvcpuid;
cycles_t ipiwin, ipiwin_start; /* TODO: synchronize TSC on all cores */
unsigned long ipicnt, ipimax;
asndcap_t sndcap[NUM_CPU]; /* for cross-core asnds */
sinvcap_t sinvcap[NUM_CPU]; /* for each core (except for the same core!) */
} cap_comminfo[CAP_INFO_MAX_THREADS];

struct cap_channelaep_info {
Expand All @@ -58,13 +59,16 @@ struct cap_comp_cpu_info {
int p_thd_iterator; /* iterator for parent to get all threads created by capmgr in this component so far! */
thdcap_t p_initthdcap; /* init thread's cap in parent */
thdid_t initthdid; /* init thread's tid */

struct cos_dcbinfo_data dcb_data;
} CACHE_ALIGNED;

struct cap_comp_info {
spdid_t cid;
struct cos_defcompinfo defci;
struct cap_shmem_info shminfo;
int initflag;
vaddr_t init_dcb_start;

struct cap_comp_cpu_info cpu_local[NUM_CPU];
};
Expand All @@ -74,6 +78,7 @@ struct cap_comp_info *cap_info_comp_init(spdid_t spdid, captblcap_t captbl_cap,

struct sl_thd *cap_info_thd_init(struct cap_comp_info *rci, struct sl_thd *t, cos_channelkey_t key);
struct sl_thd *cap_info_initthd_init(struct cap_comp_info *rci, struct sl_thd *t, cos_channelkey_t key);
void cap_info_cpu_initdcb_init(struct cap_comp_info *rci);

struct cap_comp_info *cap_info_comp_find(spdid_t s);
struct sl_thd *cap_info_thd_find(struct cap_comp_info *r, thdid_t t);
Expand Down Expand Up @@ -116,6 +121,12 @@ cap_info_cpu_local(struct cap_comp_info *c)
return &c->cpu_local[cos_cpuid()];
}

static inline struct cos_dcbinfo_data *
cap_info_cpu_dcbdata(struct cap_comp_cpu_info *c)
{
return &c->dcb_data;
}

static inline struct cap_comp_info *
cap_info_parent(struct cap_comp_info *r)
{
Expand All @@ -133,11 +144,18 @@ cap_info_is_parent(struct cap_comp_info *r, spdid_t p)
}

static inline int
cap_info_is_sched(spdid_t c)
cap_info_is_sched_core(spdid_t c, cpuid_t core)
{
if (core >= NUM_CPU) return 0;
if (!c) return 1; /* llbooter! */

return bitmap_check(cap_info_schedbmp[cos_cpuid()], c - 1);
return bitmap_check(cap_info_schedbmp[core], c - 1);
}

static inline int
cap_info_is_sched(spdid_t c)
{
return cap_info_is_sched_core(c, cos_cpuid());
}

static inline int
Expand Down
Loading