| pid | The process ID of the new thread. It must be between 0 and the maximum number of processes specified for the BZ_Init() function when the kernel was started. The process ID should not be identical to the caller. It also should not be the same as any already existing process, but if it is, then that process will be killed and substituted with the new one. |
| stack | A pointer to the end of a memory are that will be the stack for the new thread. It should be at 8-byte aligned, although on the ARM7TDMI core 4-byte alignment is sufficient. Note that if you create the stack by declaring and integer array, the pointer you pass here must be a pointer to the integer after the last element of the array. That is, if you define
static int stack[ SIZE ];
then you must pass stack + SIZE here. |
| func | A pointer to a void function taking a void pointer argument. That will be the entry point of your new thread. That function must never return; if it does, the system will crash. |
| parm | The argument to pass to the new thread when it starts. |