[libj6] Add log area and severity to j6::syslog()

User code can now set the log area and severity of log messages. This also updates the j6_log
syscall to take these parameters, but removes all calls to it except through j6::syslog().
This commit is contained in:
Justin C. Miller
2024-02-24 13:39:24 -08:00
parent a1e2c58afc
commit bc46c9a7d5
22 changed files with 114 additions and 77 deletions

View File

@@ -12,7 +12,7 @@ namespace j6 {
void
condition::wait()
{
j6::syslog("Waiting on condition %lx", this);
j6::syslog(j6::logs::app, j6::log_level::verbose, "Waiting on condition %lx", this);
uint32_t v = __atomic_add_fetch(&m_state, 1, __ATOMIC_ACQ_REL);
j6_status_t s = j6_futex_wait(&m_state, v, 0);
while (s == j6_status_futex_changed) {
@@ -20,7 +20,7 @@ condition::wait()
if (v == 0) break;
s = j6_futex_wait(&m_state, v, 0);
}
j6::syslog("Woke on condition %lx", this);
j6::syslog(j6::logs::app, j6::log_level::verbose, "Woke on condition %lx", this);
}
void