1. A method in a computer system for handling a call to an application programming interface routine of a preemptive multitasking subsystem of an operating system, the operating system also having a cooperative multitasking subsystem, comprising: receiving a call to the application programming interface routine by an application executing in the preemptive multitasking subsystem of the operating system; determining that the routine is implemented in the cooperative multitasking subsystem; in response to the receiving and determining steps, thunking the call by: converting the call to the application programming interface routine in the preemptive multitasking subsystem into a call to the implementation of the application programming interface routine in the cooperative multitasking subsystem; obtaining ownership of a synchronization mechanism regulating the invocation of all application programming interface routine implementations in the cooperative multitasking subsystem; and only after ownership of the synchronization mechanism has been obtained, calling the implementation of the application programming interface routine in the cooperative multitasking subsystem using the converted call.