9os

Experimental kernel using plan9 ideas for embedded device
git clone git://git.simple-cc.org/9os
Log | Files | Refs | README | LICENSE

ctx.c (189B)


      1 #include <os9/os9.h>
      2 
      3 int
      4 dupctx(Task *tp)
      5 {
      6 	tp->ctx.entry = proc->ctx.entry;
      7 
      8 	return 1;
      9 }
     10 
     11 void
     12 ictx(Task *tp, void *fn)
     13 {
     14 	tp->ctx.stack = (void *) tp->stack.va;
     15 	tp->ctx.entry = fn;
     16 }