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

Merge Slite with main branch, for discussion. #445

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
2 changes: 1 addition & 1 deletion src/components/implementation/capmgr/simple/capmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ capmgr_initthd_create(spdid_t client, thdid_t *tid)
thdcap_t capmgr_initaep_create(spdid_t child, struct cos_aep_info *aep, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax, asndcap_t *sndret) { BUG(); return 0; }

thdcap_t
capmgr_thd_create_thunk(thdclosure_index_t idx, thdid_t *tid)
capmgr_thd_create_thunk(thdclosure_index_t idx, thdid_t *tid, struct cos_dcb_info **dcb)
{
compid_t client = (compid_t)cos_inv_token();
struct cm_thd *t;
Expand Down
4 changes: 2 additions & 2 deletions src/components/implementation/sched/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ sched_thd_create_closure(thdclosure_index_t idx)
dci = sched_child_defci_get(sched_childinfo_find(c));
if (!dci) return 0;

t = sl_thd_aep_alloc_ext(dci, NULL, idx, 0, 0, 0, 0, 0, NULL);
t = sl_thd_aep_alloc_ext(dci, NULL, idx, 0, 0, 0, 0, 0, NULL, NULL);
if (!t) return 0;

return sl_thd_thdid(t);
Expand All @@ -105,7 +105,7 @@ sched_aep_create_closure(thdclosure_index_t id, int owntc, cos_channelkey_t key,
dci = sched_child_defci_get(sched_childinfo_find(c));
if (!dci) return 0;

t = sl_thd_aep_alloc_ext(dci, NULL, id, 1, owntc, key, ipiwin, ipimax, rcv);
t = sl_thd_aep_alloc_ext(dci, NULL, id, 1, owntc, key, ipiwin, ipimax, NULL, rcv);
if (!t) return 0;

return sl_thd_thdid(t);
Expand Down
2 changes: 1 addition & 1 deletion src/components/implementation/sched/sched_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ sched_childinfo_init_component(compid_t id)
}

assert(bitmap_check(schedinfo->cpubmp, cos_cpuid()));
initthd = sl_thd_initaep_alloc(child_dci, NULL, childflags & COMP_FLAG_SCHED, childflags & COMP_FLAG_SCHED ? 1 : 0, 0, 0, 0); /* TODO: rate information */
initthd = sl_thd_initaep_alloc(child_dci, NULL, childflags & COMP_FLAG_SCHED, childflags & COMP_FLAG_SCHED ? 1 : 0, 0, 0, 0, NULL); /* TODO: rate information */
assert(initthd); /* Failure here? Capability manager likely needs to be depended on with capmgr_create */
sched_child_initthd_set(schedinfo, initthd);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test_thds_create_switch(void)

perfdata_init(&pd[cos_cpuid()], "COS THD => COS_THD_SWITCH", test_results, ARRAY_SIZE);

ts = cos_thd_alloc(&booter_info, booter_info.comp_cap, bounceback, NULL);
ts = cos_thd_alloc(&booter_info, booter_info.comp_cap, bounceback, NULL, 0, 0);
if (EXPECT_LL_LT(1, ts, "Thread Creation: Cannot Allocate")) {
return;
}
Expand Down Expand Up @@ -152,7 +152,7 @@ test_async_endpoints_perf(void)

/* parent rcv capabilities */
tcp = cos_thd_alloc(&booter_info, booter_info.comp_cap, async_thd_parent_perf,
(void *)BOOT_CAPTBL_SELF_INITTHD_CPU_BASE);
(void *)BOOT_CAPTBL_SELF_INITTHD_CPU_BASE, 0, 0);
if(EXPECT_LL_LT(1, tcp, "Test Async Endpoints")) return;
tccp = cos_tcap_alloc(&booter_info);
if(EXPECT_LL_LT(1, tccp, "Test Async Endpoints")) return;
Expand All @@ -164,7 +164,7 @@ test_async_endpoints_perf(void)
}

/* child rcv capabilities */
tcc = cos_thd_alloc(&booter_info, booter_info.comp_cap, async_thd_fn_perf, (void *)tcp);
tcc = cos_thd_alloc(&booter_info, booter_info.comp_cap, async_thd_fn_perf, (void *)tcp, 0, 0);
if(EXPECT_LL_LT(1, tcc, "Test Async Endpoints")) return;
tccc = cos_tcap_alloc(&booter_info);
if(EXPECT_LL_LT(1, tccc, "Test Async Endpoints")) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ test_async_endpoints(void)

/* parent rcv capabilities */
tcp = cos_thd_alloc(&booter_info, booter_info.comp_cap, async_thd_parent,
(void *)BOOT_CAPTBL_SELF_INITTHD_CPU_BASE);
(void *)BOOT_CAPTBL_SELF_INITTHD_CPU_BASE, 0, 0);
if (EXPECT_LL_LT(1, tcp, "Test Async Endpoints")) {
return;
}
Expand All @@ -118,7 +118,7 @@ test_async_endpoints(void)
}

/* child rcv capabilities */
tcc = cos_thd_alloc(&booter_info, booter_info.comp_cap, async_thd_fn, (void *)tcp);
tcc = cos_thd_alloc(&booter_info, booter_info.comp_cap, async_thd_fn, (void *)tcp, 0, 0);
if (EXPECT_LL_LT(1, tcc, "Test Async Endpoints")) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test_captbl_expands(void)
int i;
compcap_t cc;

cc = cos_comp_alloc(&booter_info, booter_info.captbl_cap, booter_info.pgtbl_cap, (vaddr_t)NULL);
cc = cos_comp_alloc(&booter_info, booter_info.captbl_cap, booter_info.pgtbl_cap, 0, (vaddr_t)NULL, (vaddr_t)NULL);
if (EXPECT_LL_LT(1, cc, "Capability Table Expansion")) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ test_inv(void)

perfdata_init(&result, "SINV", test_results, ARRAY_SIZE);

cc = cos_comp_alloc(&booter_info, booter_info.captbl_cap, booter_info.pgtbl_cap, (vaddr_t)NULL);
cc = cos_comp_alloc(&booter_info, booter_info.captbl_cap, booter_info.pgtbl_cap, 0, (vaddr_t)NULL, (vaddr_t)NULL);
if (EXPECT_LL_LT(1, cc, "Invocation: Cannot Allocate")) return;
ic = cos_sinv_alloc(&booter_info, cc, (vaddr_t)__inv_test_serverfn, 0xdead);
if (EXPECT_LL_LT(1, ic, "Invocation: Cannot Allocate")) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ test_timer(void)
long long time, mask;
tcap_time_t timer, thd_timeout;

tc = cos_thd_alloc(&booter_info, booter_info.comp_cap, spinner, NULL);

tc = cos_thd_alloc(&booter_info, booter_info.comp_cap, spinner, NULL, 0, 0);
printc("thd alloc done\n");
perfdata_init(&result, "COS THD => COS_THD_SWITCH", test_results, ARRAY_SIZE);

for (i = 0; i <= TEST_ITER; i++){
Expand Down Expand Up @@ -139,7 +139,7 @@ exec_cluster_alloc(struct exec_cluster *e, cos_thd_fn_t fn, void *d, arcvcap_t p
{
e->tcc = cos_tcap_alloc(&booter_info);
if (EXPECT_LL_LT(1, e->tcc, "Cluster Allocation: TCAP ALLOC")) return -1;
e->tc = cos_thd_alloc(&booter_info, booter_info.comp_cap, fn, d);
e->tc = cos_thd_alloc(&booter_info, booter_info.comp_cap, fn, d, 0, 0);
if (EXPECT_LL_LT(1, e->tc, "Cluster Allocation: THD ALLOC")) return -1;
e->rc = cos_arcv_alloc(&booter_info, e->tc, e->tcc, booter_info.comp_cap, parentc);
if (EXPECT_LL_LT(1, e->rc, "Cluster Allocation: ARCV ALLOC")) return -1;
Expand Down
8 changes: 4 additions & 4 deletions src/components/implementation/tests/kernel_tests/k_test_thd.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test_thds_create_switch(void)
intptr_t i = THD_ARG;
int ret;

ts = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_thd_arg, (void *)i);
ts = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_thd_arg, (void *)i, 0, 0);
if (EXPECT_LL_LT(1, ts, "Thread Creation: Cannot Allocate")) {
return;
}
Expand Down Expand Up @@ -72,7 +72,7 @@ test_mthds_ring(void)
count = 0;

for (i = 0; i < TEST_NTHDS; i++) {
thd_test[i] = cos_thd_alloc(&booter_info, booter_info.comp_cap, thd_fn_mthds_ring, (void *)i);
thd_test[i] = cos_thd_alloc(&booter_info, booter_info.comp_cap, thd_fn_mthds_ring, (void *)i, 0, 0);
if (EXPECT_LL_LT(1, thd_test[i], "Thread Ring: Cannot Allocate")) {
return;
}
Expand Down Expand Up @@ -113,7 +113,7 @@ test_mthds_classic(void)
thdcap_t ts;
int i, ret;

ts = cos_thd_alloc(&booter_info, booter_info.comp_cap, thd_fn_mthds_classic, NULL);
ts = cos_thd_alloc(&booter_info, booter_info.comp_cap, thd_fn_mthds_classic, NULL, 0, 0);
if (EXPECT_LL_LT(1, ts, "Thread Classic: Cannot Allocate")) {
return;
}
Expand Down Expand Up @@ -151,7 +151,7 @@ test_thds_tls(void)
int ret;

for (i = 0; i < TEST_NTHDS; i++) {
ts[i] = cos_thd_alloc(&booter_info, booter_info.comp_cap, thd_tls, (void *)i);
ts[i] = cos_thd_alloc(&booter_info, booter_info.comp_cap, thd_tls, (void *)i, 0, 0);
if (EXPECT_LL_LT(1, ts[i], "Thread TLS: Cannot Allocate")) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,22 @@ test_run_unit_kernel(void)
/* Kernel Tests */
printc("\n");
PRINTC("Unit Test Started:\n\n");
PRINTC("timer:\n");
test_timer();
PRINTC("test_tcap_budgets: \n");
test_tcap_budgets();
PRINTC("2timers:\n");
test_2timers();
test_2timers();
PRINTC("thds:\n");
test_thds();
PRINTC("mem_alloc:\n");
test_mem_alloc();
PRINTC("endpoints:\n");
test_async_endpoints();
PRINTC("inv:\n");
test_inv();
PRINTC("captbl_expands:\n");
test_captbl_expands();
}

Expand All @@ -53,7 +62,7 @@ main(void)
int i;

PRINTC("Kernel Tests\n");
termthd[cos_cpuid()] = cos_thd_alloc(&booter_info, booter_info.comp_cap, term_fn, NULL);
termthd[cos_cpuid()] = cos_thd_alloc(&booter_info, booter_info.comp_cap, term_fn, NULL, 0, 0);
assert(termthd[cos_cpuid()]);

cyc_per_usec = cos_hw_cycles_per_usec(BOOT_CAPTBL_SELF_INITHW_BASE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cos_init(void)

while (!init_done);

termthd[cos_cpuid()] = cos_thd_alloc(&booter_info, booter_info.comp_cap, term_fn, NULL);
termthd[cos_cpuid()] = cos_thd_alloc(&booter_info, booter_info.comp_cap, term_fn, NULL, 0, 0);
assert(termthd[cos_cpuid()]);
if (cos_cpuid() == 0) PRINTC("Micro Booter Xcore started.\n");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ test_ipi_interference(void)
if (EXPECT_LL_LT(1, tcc, "IPI Interference: TCAP Allocation"))
return;

t = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_rcv_fn, NULL);
t = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_rcv_fn, NULL, 0, 0);
if (EXPECT_LL_LT(1, t, "IPI Inteference: Thread Allocation"))
return;

Expand All @@ -205,7 +205,7 @@ test_ipi_interference(void)
rcv[cos_cpuid()] = r;
while (!rcv[TEST_SND_CORE]) ;

t = cos_thd_alloc(&booter_info, booter_info.comp_cap, rcv_spinner, NULL);
t = cos_thd_alloc(&booter_info, booter_info.comp_cap, rcv_spinner, NULL, 0, 0);
if (EXPECT_LL_LT(1, t, "IPI Interference: Thread Allocation"))
return;

Expand All @@ -230,7 +230,7 @@ test_ipi_interference(void)
if (EXPECT_LL_LT(1, tcc, "IPI Interference: TCAP Allocation"))
return;

t = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_asnd_fn, NULL);
t = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_asnd_fn, NULL, 0, 0);
if (EXPECT_LL_LT(1, t, "IPI Interference: Thread Allocation"))
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test_rcv_crt(void)
asndcap_t snd = 0;

if ((word_t)cos_cpuid() == i) continue;
thd = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_ipi_fn, (void *)i);
thd = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_ipi_fn, (void *)i, 0, 0);
assert(thd);

rcv = cos_arcv_alloc(&booter_info, thd, BOOT_CAPTBL_SELF_INITTCAP_CPU_BASE, booter_info.comp_cap, BOOT_CAPTBL_SELF_INITRCV_CPU_BASE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ test_ipi_roundtrip(void)
return;


t = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_rcv_fn, NULL);
t = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_rcv_fn, NULL, 0, 0);
if (EXPECT_LL_LT(1, t, "IPI ROUNDTRIP: Thread Allocation"))
return;

Expand Down Expand Up @@ -196,7 +196,7 @@ test_ipi_roundtrip(void)

/* Test Sender Time */

t = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_asnd_fn, NULL);
t = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_asnd_fn, NULL, 0, 0);
if (EXPECT_LL_LT(1, t, "IPI ROUNDTRIP: Thread Allocation"))
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ test_ipi_switch(void)
if (EXPECT_LL_LT(1, tcc, "IPI SWITCH: TCAP Allocation"))
return;

t = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_rcv_fn, NULL);
t = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_rcv_fn, NULL, 0, 0);
if (EXPECT_LL_LT(1, t, "IPI SWITCH: Thread Allocation"))
return;

Expand All @@ -207,7 +207,7 @@ test_ipi_switch(void)
rcv[cos_cpuid()] = r;
while (!rcv[TEST_SND_CORE]) ;

t = cos_thd_alloc(&booter_info, booter_info.comp_cap, rcv_spinner, NULL);
t = cos_thd_alloc(&booter_info, booter_info.comp_cap, rcv_spinner, NULL, 0, 0);
if (EXPECT_LL_LT(1, t, "IPI SWITCH: Thread Allocation"))
return;

Expand All @@ -226,7 +226,7 @@ test_ipi_switch(void)

/* Test RCV1: Corresponding Send */

t = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_asnd_fn, NULL);
t = cos_thd_alloc(&booter_info, booter_info.comp_cap, test_asnd_fn, NULL, 0, 0);
if (EXPECT_LL_LT(1, t, "IPI SWITCH: Thread Allocation"))
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ test_thds(void)
int failure = 0;

for (; i < TEST_N_THDS; i++) {
test_ts[cos_cpuid()][i] = capmgr_thd_create(__test_thd_fn, (void *)i, &tid);
/* Hard coded dcb address for now */
test_ts[cos_cpuid()][i] = capmgr_thd_create(__test_thd_fn, (void *)i, &tid, NULL);
assert(test_ts[cos_cpuid()][i]);

if (cos_thd_switch(test_ts[cos_cpuid()][i])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test_aeps(void)
asndcap_t snd;

printc("\tCreating AEP [%lu]\n", i);
ret = cos_aep_tcap_alloc(&(test_aep[i]), BOOT_CAPTBL_SELF_INITTCAP_BASE, aep_thd_fn, (void *)i);
ret = cos_aep_tcap_alloc(&(test_aep[i]), BOOT_CAPTBL_SELF_INITTCAP_BASE, aep_thd_fn, (void *)i, 0, 0);
assert(ret == 0);

snd = cos_asnd_alloc(ci, test_aep[i].rcv, ci->captbl_cap);
Expand Down Expand Up @@ -125,7 +125,7 @@ cos_init(void)
cos_defcompinfo_init();

for (id = 0; id < CHILD_COMP_COUNT; id++) {
vaddr_t vm_range, addr;
vaddr_t vm_range, addr, dcbaddr;
pgtblcap_t child_utpt;
int is_sched = ((id == CHILD_SCHED_ID) ? 1 : 0);
struct cos_compinfo *child_ci = cos_compinfo_get(&child_defci[id]);
Expand All @@ -135,8 +135,10 @@ cos_init(void)
assert(child_utpt);

cos_meminfo_init(&(child_ci->mi), BOOT_MEM_KM_BASE, CHILD_UNTYPED_SIZE, child_utpt);
//cos_defcompinfo_child_alloc(&child_defci[id], (vaddr_t)&__cosrt_upcall_entry,
// (vaddr_t)BOOT_MEM_VM_BASE, BOOT_CAPTBL_FREE, is_sched);
cos_defcompinfo_child_alloc(&child_defci[id], (vaddr_t)&__cosrt_upcall_entry,
(vaddr_t)BOOT_MEM_VM_BASE, BOOT_CAPTBL_FREE, is_sched);
(vaddr_t)BOOT_MEM_VM_BASE, BOOT_CAPTBL_FREE, is_sched, &dcbaddr);

printc("\t\tCopying new capabilities\n");
ret = cos_cap_cpy_at(child_ci, BOOT_CAPTBL_SELF_CT, ci, child_ci->captbl_cap);
Expand All @@ -147,6 +149,7 @@ cos_init(void)
assert(ret == 0);
ret = cos_cap_cpy_at(child_ci, BOOT_CAPTBL_SELF_COMP, ci, child_ci->comp_cap);
assert(ret == 0);
/* FIXME: copy BOOT_CAPTBL_SELF_SCB cap?? */

ret = cos_cap_cpy_at(child_ci, BOOT_CAPTBL_SELF_INITTHD_BASE, ci,
cos_sched_aep_get(&child_defci[id])->thd);
Expand Down
25 changes: 15 additions & 10 deletions src/components/interface/capmgr/capmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,23 @@ thdcap_t COS_STUB_DECL(capmgr_initthd_create)(spdid_t child, thdid_t *tid);
thdcap_t capmgr_initaep_create(spdid_t child, struct cos_aep_info *aep, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax, asndcap_t *sndret);
thdcap_t COS_STUB_DECL(capmgr_initaep_create)(spdid_t child, struct cos_aep_info *aep, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax, asndcap_t *sndret);

thdcap_t capmgr_thd_create(cos_thd_fn_t fn, void *data, thdid_t *tid);
thdcap_t capmgr_aep_create(struct cos_aep_info *a, cos_aepthd_fn_t fn, void *data, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax);
thdcap_t capmgr_thd_create(cos_thd_fn_t fn, void *data, thdid_t *tid, struct cos_dcb_info **dcb);
thdcap_t capmgr_aep_create(struct cos_aep_info *a, cos_aepthd_fn_t fn, void *data, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax, struct cos_dcb_info **dcb);

thdcap_t capmgr_thd_create_thunk(thdclosure_index_t idx, thdid_t *tid);
thdcap_t COS_STUB_DECL(capmgr_thd_create_thunk)(thdclosure_index_t idx, thdid_t *tid);
thdcap_t capmgr_thd_create_thunk(thdclosure_index_t idx, thdid_t *tid, struct cos_dcb_info **dcb);
thdcap_t COS_STUB_DECL(capmgr_thd_create_thunk)(thdclosure_index_t idx, thdid_t *tid, struct cos_dcb_info **dcb);

thdcap_t capmgr_aep_create_thunk(struct cos_aep_info *a, thdclosure_index_t idx, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax);
thdcap_t COS_STUB_DECL(capmgr_aep_create_thunk)(struct cos_aep_info *a, thdclosure_index_t idx, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax);
thdcap_t capmgr_aep_create_thunk(struct cos_aep_info *a, thdclosure_index_t idx, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax, struct cos_dcb_info **dcb);
thdcap_t COS_STUB_DECL(capmgr_aep_create_thunk)(struct cos_aep_info *a, thdclosure_index_t idx, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax, struct cos_dcb_info **dcb);

thdcap_t capmgr_thd_create_ext(spdid_t child, thdclosure_index_t idx, thdid_t *tid);
thdcap_t COS_STUB_DECL(capmgr_thd_create_ext)(spdid_t child, thdclosure_index_t idx, thdid_t *tid);
thdcap_t capmgr_thd_create_ext(spdid_t child, thdclosure_index_t idx, thdid_t *tid, struct cos_dcb_info **dcb);
thdcap_t COS_STUB_DECL(capmgr_thd_create_ext)(spdid_t child, thdclosure_index_t idx, thdid_t *tid, struct cos_dcb_info **dcb);

thdcap_t capmgr_aep_create_ext(spdid_t child, struct cos_aep_info *a, thdclosure_index_t idx, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax, arcvcap_t *extrcv);
thdcap_t COS_STUB_DECL(capmgr_aep_create_ext)(spdid_t child, struct cos_aep_info *a, thdclosure_index_t idx, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax, arcvcap_t *extrcv);
thdcap_t capmgr_aep_create_ext(spdid_t child, struct cos_aep_info *a, thdclosure_index_t idx, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax, struct cos_dcb_info **dcb, arcvcap_t *extrcv);
thdcap_t COS_STUB_DECL(capmgr_aep_create_ext)(spdid_t child, struct cos_aep_info *a, thdclosure_index_t idx, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax, struct cos_dcb_info **dcb, arcvcap_t *extrcv);

thdcap_t capmgr_thd_retrieve(spdid_t child, thdid_t t, thdid_t *inittid);
thdcap_t capmgr_thd_retrieve_next(spdid_t child, thdid_t *tid);

arcvcap_t capmgr_rcv_create(spdid_t child, thdid_t tid, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax);
arcvcap_t COS_STUB_DECL(capmgr_rcv_create)(spdid_t child, thdid_t tid, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax);
Expand All @@ -55,4 +58,6 @@ asndcap_t COS_STUB_DECL(capmgr_asnd_rcv_create)(arcvcap_t rcv);
asndcap_t capmgr_asnd_key_create(cos_channelkey_t key);
asndcap_t COS_STUB_DECL(capmgr_asnd_key_create)(cos_channelkey_t key);

int capmgr_thd_migrate(thdid_t tid, thdcap_t tc, cpuid_t core);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes. Not sure we have this at all. Might be dead code?


#endif /* CAPMGR_H */
8 changes: 4 additions & 4 deletions src/components/interface/capmgr/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
#include <cos_thd_init.h>

thdcap_t
capmgr_thd_create(cos_thd_fn_t fn, void *data, thdid_t *tid)
capmgr_thd_create(cos_thd_fn_t fn, void *data, thdid_t *tid, struct cos_dcb_info **dcb)
{
thdclosure_index_t idx = cos_thd_init_alloc(fn, data);

if (idx < 1) return 0;

return capmgr_thd_create_thunk(idx, tid);
return capmgr_thd_create_thunk(idx, tid, dcb);
}

thdcap_t
capmgr_aep_create(struct cos_aep_info *a, cos_aepthd_fn_t fn, void *data, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax)
capmgr_aep_create(struct cos_aep_info *a, cos_aepthd_fn_t fn, void *data, int owntc, cos_channelkey_t key, microsec_t ipiwin, u32_t ipimax, struct cos_dcb_info **dcb)
{
thdclosure_index_t idx = cos_thd_init_alloc(cos_aepthd_fn, (void *)a);

if (idx < 1) return 0;
a->fn = fn;
a->data = data;

return capmgr_aep_create_thunk(a, idx, owntc, key, ipiwin, ipimax);
return capmgr_aep_create_thunk(a, idx, owntc, key, ipiwin, ipimax, dcb);
}
Loading