mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[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:
@@ -116,7 +116,8 @@ scheduler::add_thread(TCB *t)
|
||||
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
|
||||
// move them to the appropriate lists.
|
||||
|
||||
@@ -18,11 +18,11 @@ for obj in syscalls.exposes:
|
||||
|
||||
for cap in obj.caps:
|
||||
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
|
||||
|
||||
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()
|
||||
]]]*/
|
||||
/// [[[end]]]
|
||||
|
||||
Reference in New Issue
Block a user