Skip to content

Commit fb63f38

Browse files
committed
context: Remove unnecessary checks, add comment
1 parent 5b47939 commit fb63f38

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/kernel/context.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ void Context::jump(void* location, context_func func)
3131
{
3232
// store so we can call it later
3333
destination = func;
34-
assert(destination);
3534
// switch to stack from @location
3635
__context_switch((uintptr_t) location);
3736
}
@@ -40,10 +39,10 @@ void Context::create(unsigned stack_size, context_func func)
4039
{
4140
// store so we can call it later
4241
destination = func;
43-
assert(destination);
4442
// create and switch to new stack
4543
char* stack_mem = new char[stack_size];
4644
assert(stack_mem);
45+
// aligned to 16 byte boundary
4746
uintptr_t start = (uintptr_t) (stack_mem+stack_size) & ~0xF;
4847
__context_switch(start);
4948
delete[] stack_mem;

0 commit comments

Comments
 (0)