Blob


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