#include "tasking.h" #include "string.h" #include "assert.h" void tcb_stack_push(tcb_t *tcb, void *data, size_t len) { assert(tcb != NULL); void *spo = (void*)(tcb->ksp - len); assert(spo >= tcb->stack); memcpy(spo, data, len); tcb->ksp = (uintptr_t)spo; }