[srv.init] Serve a service locator protocol from init
The init process now serves as a service locator for its children, passing all children a mailbox handle on which it is serving the service locator protocol.
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
|
||||
j6 = module("j6",
|
||||
kind = "lib",
|
||||
deps = [ "util" ],
|
||||
sources = [
|
||||
"init.cpp",
|
||||
"protocol_ids.cpp",
|
||||
"syscalls.s.cog",
|
||||
"sysconf.cpp.cog",
|
||||
],
|
||||
@@ -12,6 +14,8 @@ j6 = module("j6",
|
||||
"j6/errors.h",
|
||||
"j6/flags.h",
|
||||
"j6/init.h",
|
||||
"j6/protocols.h",
|
||||
"j6/protocols/service_locator.h",
|
||||
"j6/syscalls.h.cog",
|
||||
"j6/sysconf.h.cog",
|
||||
"j6/types.h",
|
||||
|
||||
12
src/libraries/j6/j6/protocols.h
Normal file
12
src/libraries/j6/j6/protocols.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
/// \file j6/protocols.h
|
||||
/// Common definition for j6 user-mode IPC protocols
|
||||
|
||||
enum j6_proto_base_tag
|
||||
{
|
||||
j6_proto_base_status,
|
||||
j6_proto_base_get_proto_id,
|
||||
j6_proto_base_proto_id,
|
||||
|
||||
j6_proto_base_first_proto_id /// The first protocol-specific ID
|
||||
};
|
||||
14
src/libraries/j6/j6/protocols/service_locator.h
Normal file
14
src/libraries/j6/j6/protocols/service_locator.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
/// \file j6/protocols/service_locator.h
|
||||
/// Definitions for the service locator protocol
|
||||
|
||||
#include <j6/protocols.h>
|
||||
|
||||
extern const uint64_t j6_proto_sl_id;
|
||||
|
||||
enum j6_proto_sl_tag
|
||||
{
|
||||
j6_proto_sl_register = j6_proto_base_first_proto_id,
|
||||
j6_proto_sl_find,
|
||||
j6_proto_sl_result,
|
||||
};
|
||||
4
src/libraries/j6/protocol_ids.cpp
Normal file
4
src/libraries/j6/protocol_ids.cpp
Normal file
@@ -0,0 +1,4 @@
|
||||
#include <util/hash.h>
|
||||
|
||||
extern "C"
|
||||
const uint64_t j6_proto_sl_id = "jsix.protocol.service_locator"_id;
|
||||
Reference in New Issue
Block a user