"THREAD.H" (Zoomer-only)


/********************************************************************
 *
 * PROJECT:     GEOS Programming Frequently Asked Questions
 * MODULE:      The FAQ
 * FILE:        sdkfaq.txt
 *
 * DESCRIPTION:
 *      This FAQ contains programming questions related to the SDK.
 *      For more general information about the SDK, please see the
 *      Geoworks web site (http://www.geoworks.com/). You may
 *      request more information or order the SDK by calling
 *      1-800-GEOS-SDK (inside the U.S.), FAXing 510-814-4250, or
 *      sending email to orders@geoworks.com.
 *
 *******************************************************************/

Q. We need to run background tasks on the Zoomer. I use ThreadCreate
   to start background task, but Glue reports:

   Error MAP1BKG.GP 19: Usage of THREADCREATE requires geos minor protocol 9,
   but platform files only allow minor protocol 3

A. This is caused by an enhancement in our new kernel. Since Casio
   Z-7000 and Tandy Z-PDA use the old kernel, it cannot use the additions
   to thread create.  To overcome this, you can call ThreadCreate_Old.
   To use ThreadCreate_Old, you must provide the prototype for it and
   at surround the call with push/pop of the si register.  Here is an
   example:

    extern ThreadHandle
        _pascal ThreadCreate_Old(word priority,
             word valueToPass,
             word (*startRoutine)(word valuePassed),
             word stackSize,
             GeodeHandle owner);
    .
    .
    .
    _asm push si;
    thread = ThreadCreate_Old(<put args in here>);
    _asm pop si;