PR_IMPLEMENT(PRUword) PR_GetStackSpaceLeft(PRThread* t)
PR_IMPLEMENT(PRWord *) PR_GetGCRegisters(PRThread *t, int isCurrent, int *np)
PR_IMPLEMENT(PRUword)PR_GetStackSpaceLeft(PRThread* t){    PRThread *current = PR_CurrentThread();    PRWord *sp, *esp;    int stack_end;#if defined(WIN16)    /*    ** Under WIN16, the stack of the current thread is always mapped into    ** the "task stack" (at SS:xxxx).  So, if t is the current thread, scan    ** the "task stack".  Otherwise, scan the "cached stack" of the inactive    ** thread...    */    if (t == current) {        sp  = (PRWord*) &stack_end;        esp = (PRWord*) _pr_top_of_task_stack;        PR_ASSERT(sp <= esp);    } else {        sp  = (PRWord*) PR_GetSP(t);        esp = (PRWord*) t->stack->stackTop;	PR_ASSERT((t->stack->stackSize == 0) ||                 ((sp >  (PRWord*)t->stack->stackBottom) &&		  (sp <= (PRWord*)t->stack->stackTop)));    }#else   /* ! WIN16 */#ifdef HAVE_STACK_GROWING_UP    if (t == current) {        esp = (PRWord*) &stack_end;    } else {        esp = (PRWord*) PR_GetSP(t);    }    sp = (PRWord*) t->stack->stackTop;    if (t->stack->stackSize) {        PR_ASSERT((esp > (PRWord*)t->stack->stackTop) &&                  (esp < (PRWord*)t->stack->stackBottom));    }#else   /* ! HAVE_STACK_GROWING_UP */    if (t == current) {        sp = (PRWord*) &stack_end;    } else {        sp = (PRWord*) PR_GetSP(t);    }    esp = (PRWord*) t->stack->stackTop;    if (t->stack->stackSize) {	PR_ASSERT((sp > (PRWord*)t->stack->stackBottom) &&		  (sp < (PRWord*)t->stack->stackTop));    }#endif  /* ! HAVE_STACK_GROWING_UP */#endif  /* ! WIN16 */    return (PRUword)t->stack->stackSize - ((PRWord)esp - (PRWord)sp);}