mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[kernel] Add spam logging to trace mailbox calls
Added a new IPC log category, and logging of mailbox calls in it. Also added some logs in init's service locator to help track down the bug fixed in the previous commit.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <j6/types.h>
|
||||
#include <j6/protocols/service_locator.h>
|
||||
#include <j6/syscalls.h>
|
||||
#include <j6/syslog.hh>
|
||||
#include <util/node_map.h>
|
||||
|
||||
#include "service_locator.h"
|
||||
@@ -32,6 +33,8 @@ service_locator_start(j6_handle_t mb)
|
||||
j6_handle_t give_handle = j6_handle_invalid;
|
||||
uint64_t proto_id;
|
||||
|
||||
j6::syslog("SL> Starting service locator on mbx handle %x", mb);
|
||||
|
||||
while (true) {
|
||||
uint64_t data_len = sizeof(uint64_t);
|
||||
j6_status_t s = j6_mailbox_respond(mb, &tag,
|
||||
@@ -53,6 +56,8 @@ service_locator_start(j6_handle_t mb)
|
||||
break;
|
||||
}
|
||||
|
||||
j6::syslog("SL> Registering handle %x for proto %x", give_handle, proto_id);
|
||||
|
||||
services.insert( {proto_id, give_handle} );
|
||||
tag = j6_proto_base_status;
|
||||
data = j6_status_ok;
|
||||
@@ -66,10 +71,13 @@ service_locator_start(j6_handle_t mb)
|
||||
|
||||
{
|
||||
auto found = services.find(proto_id);
|
||||
if (found != services.end())
|
||||
if (found != services.end()) {
|
||||
j6::syslog("SL> Found handle %x for proto %x", give_handle, proto_id);
|
||||
give_handle = found->second;
|
||||
else
|
||||
} else {
|
||||
j6::syslog("SL> Found no handles for proto %x", proto_id);
|
||||
give_handle = j6_handle_invalid;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user