Contrary to popular believe, Palm OS 5 is preemptive when it comes to multi-threading. However, there is still only a single thread which runs all user programs. Thus if that thread does not perform the right calls, then the entire system will freeze.
Native Programs Are Not Documented
Native ARM programs are not documented. The general way that was intended to have ARM native code was essentially to write your program and compile it to m68k and then have ARM specified subroutines called PNOlets. There are native applications, however the format is not really known. However there has been some reverse engineering of the format, however that reverse engineering is only available in Russian.
All system calls (the traps in m68k) essentially offset a system global
r9?), perform some math, and then treat the address as a function
pointer. Libraries are also loaded into this register and mapped to specific
offsets. The system calls that are the most popular would be the HAL, DAL, and
There is no user exposed threading API, at least in the Palm OS SDK. However, threads can still be created by using internal system APIs. The APIs are quite simple. Using the non-documented thread APIs in general is superior to using the sound API to create threads. If threads are created using the sound API, then all sounds will stutter unless the threads exit quickly after execution.
There are a hard limit of either 16 or 32 threads (I believe it to be 32). Note that there will be one lost thread for the sound API and another lost thread usually used by the system to run all of the user space code.