blob: ddb94b995e422a3cbfb4a27bd957fa792d37bb1c [file] [log] [blame]
rscf305dff2003-10-13 17:18:52 +00001[Need to write better notes.]
2
3Look for files named *386* or *FreeBSD* and you'll see what
4you need to implement for your architecture of choice.
5
6The hardest thing is probably the assembly routines:
7src/lib9/tas-$SYSTYPE.s and src/libthread/asm-$SYSTYPE-$OBJTYPE.s.
8The former is a test and set used to implement shared-memory
9spin locks. The latter is a stripped down setjmp and longjmp
10used to implement stack switching in the thread library.
11Also, src/libthread/$OBJTYPE.c needs to know how to set up a stack
12frame for the given object type.
13
14If you're only interested in mk and sam, you don't need to
15write any assembly to do a port. Samterm requires everything
16though, since it uses libthread.
17