refactor
This commit is contained in:
@@ -872,7 +872,7 @@ fn ipcClient() void {
|
||||
/// prove the block/wake and reply-routing paths. (Kernel tasks, so no user ELF.)
|
||||
fn ipcCallTest() void {
|
||||
log("DANOS-TEST-BEGIN: ipc-call\n", .{});
|
||||
ipc_endpoint = ipcsync.createEndpoint().?;
|
||||
ipc_endpoint = ipcsync.createIpcEndpoint().?;
|
||||
ipc_replies_ok = false;
|
||||
ipc_done = false;
|
||||
scheduler.spawn(ipcServer, 5); // above this task, so the workers run
|
||||
@@ -900,7 +900,7 @@ var cap_done: bool = false;
|
||||
/// verify it, then reply handing back a capability of its own.
|
||||
fn capServer() void {
|
||||
const me = scheduler.current();
|
||||
cap_ep_y = ipcsync.createEndpoint().?;
|
||||
cap_ep_y = ipcsync.createIpcEndpoint().?;
|
||||
const h_y = ipcsync.installHandle(me, cap_ep_y); // the handle to send back in the reply
|
||||
|
||||
var reply_buffer: [8]u8 = .{0} ** 8;
|
||||
@@ -923,7 +923,7 @@ fn capServer() void {
|
||||
/// Client half of "open": mint a capability, send it in a call, receive one back.
|
||||
fn capClient() void {
|
||||
const me = scheduler.current();
|
||||
cap_ep_x = ipcsync.createEndpoint().?;
|
||||
cap_ep_x = ipcsync.createIpcEndpoint().?;
|
||||
const h_x = ipcsync.installHandle(me, cap_ep_x);
|
||||
|
||||
var message: [8]u8 = .{0} ** 8;
|
||||
@@ -945,7 +945,7 @@ fn capClient() void {
|
||||
/// equal) and was *shared*, not moved (refcount bumped to 2).
|
||||
fn capabilityTest() void {
|
||||
log("DANOS-TEST-BEGIN: ipc-cap\n", .{});
|
||||
cap_endpoint = ipcsync.createEndpoint().?;
|
||||
cap_endpoint = ipcsync.createIpcEndpoint().?;
|
||||
cap_server_got_x = false;
|
||||
cap_client_got_y = false;
|
||||
cap_done = false;
|
||||
@@ -1017,7 +1017,7 @@ fn dmaTest() void {
|
||||
/// the device-claim check and lands its first real use with the first PCI driver.
|
||||
fn msiTest() void {
|
||||
log("DANOS-TEST-BEGIN: msi\n", .{});
|
||||
const endpoint = ipcsync.createEndpoint().?;
|
||||
const endpoint = ipcsync.createIpcEndpoint().?;
|
||||
|
||||
const flags = sync.enter();
|
||||
const vector = irq.msiBind(endpoint, 0) catch {
|
||||
@@ -1567,7 +1567,7 @@ fn irqFreeTest() void {
|
||||
return;
|
||||
};
|
||||
|
||||
const endpoint = ipcsync.createEndpoint() orelse {
|
||||
const endpoint = ipcsync.createIpcEndpoint() orelse {
|
||||
check("allocated an endpoint", false);
|
||||
result();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user