[kernel] Fix up formatting

Two minor issues: scheduler::prune wasn't formatted correctly, and
j6/caps.h was not using the ull prefix when shifting 64 bit numbers.
(It's doubtful an object would get more than 32 caps any time soon, but
better to be correct.)
This commit is contained in:
Justin C. Miller
2022-01-30 20:52:43 -08:00
parent 9945ebab34
commit 343622d4e5
2 changed files with 4 additions and 3 deletions

View File

@@ -116,7 +116,8 @@ scheduler::add_thread(TCB *t)
t->time_left = quantum(t->priority); t->time_left = quantum(t->priority);
} }
void scheduler::prune(run_queue &queue, uint64_t now) void
scheduler::prune(run_queue &queue, uint64_t now)
{ {
// Find processes that are ready or have exited and // Find processes that are ready or have exited and
// move them to the appropriate lists. // move them to the appropriate lists.

View File

@@ -18,11 +18,11 @@ for obj in syscalls.exposes:
for cap in obj.caps: for cap in obj.caps:
name = f"j6_cap_{obj.name}_{cap}" name = f"j6_cap_{obj.name}_{cap}"
cog.outl(f"#define {name:<30} (1 << {i})") cog.outl(f"#define {name:<30} (1ull << {i})")
i += 1 i += 1
name = f"j6_cap_{obj.name}_all" name = f"j6_cap_{obj.name}_all"
cog.outl(f"#define {name:<30} ((1<<{i})-1)") cog.outl(f"#define {name:<30} ((1ull<<{i})-1)")
cog.outl() cog.outl()
]]]*/ ]]]*/
/// [[[end]]] /// [[[end]]]