We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b47939 commit fb63f38Copy full SHA for fb63f38
1 file changed
src/kernel/context.cpp
@@ -31,7 +31,6 @@ void Context::jump(void* location, context_func func)
31
{
32
// store so we can call it later
33
destination = func;
34
- assert(destination);
35
// switch to stack from @location
36
__context_switch((uintptr_t) location);
37
}
@@ -40,10 +39,10 @@ void Context::create(unsigned stack_size, context_func func)
40
39
41
42
43
44
// create and switch to new stack
45
char* stack_mem = new char[stack_size];
46
assert(stack_mem);
+ // aligned to 16 byte boundary
47
uintptr_t start = (uintptr_t) (stack_mem+stack_size) & ~0xF;
48
__context_switch(start);
49
delete[] stack_mem;
0 commit comments