blob: 396ab3ecd47bb1f05d0b998ddce48aed7d5083e9 (
plain) (
tree)
|
|
#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;
}
|