2003-10-13 17:18:52 +00:00
|
|
|
[Need to write better notes.]
|
|
|
|
|
|
|
|
Look for files named *386* or *FreeBSD* and you'll see what
|
|
|
|
you need to implement for your architecture of choice.
|
|
|
|
|
|
|
|
The hardest thing is probably the assembly routines:
|
|
|
|
src/lib9/tas-$SYSTYPE.s and src/libthread/asm-$SYSTYPE-$OBJTYPE.s.
|
|
|
|
The former is a test and set used to implement shared-memory
|
|
|
|
spin locks. The latter is a stripped down setjmp and longjmp
|
|
|
|
used to implement stack switching in the thread library.
|
|
|
|
Also, src/libthread/$OBJTYPE.c needs to know how to set up a stack
|
|
|
|
frame for the given object type.
|
|
|
|
|
|
|
|
If you're only interested in mk and sam, you don't need to
|
2004-03-02 17:52:49 +00:00
|
|
|
write any assembly to do a port. Acme and samterm require everything
|
2003-10-13 17:18:52 +00:00
|
|
|
though, since it uses libthread.
|
|
|
|
|