Beispiel #1
0
THREAD_CTL* CPPLIB( pgm_thread )// LOCATE THREAD_CTL FOR PROGRAM (.EXE)
    ( void )
{
    THREAD_CTL* retn;           // PGM THREAD (first WATCOM .EXE, .DLL active)

//
// is thread_data offset from fs ?
//
    retn = &_RWD_ThreadData;
    if( ! retn->flags.executable ) {
        retn = retn->call_base;
        if( retn == NULL || ! retn->flags.executable ) {
            RW_DTREG* not_used;
            retn = ThreadLookup( &not_used );
        }
    }
    return retn;
}
Beispiel #2
0
inline
static void dispatch_init(      // INITIALIZE DISPATCH BLOCK
    DISPATCH_EXC *dispatch,     // - dispatch control
    THROW_RO *throw_ro,         // - thrown R/O block
    rboolean is_zero,           // - true ==> thrown object is zero constant
    _RTCTL* rtc )               // - R/T control
{
    dispatch->ro = throw_ro;
    dispatch->rtc = rtc;
    dispatch->zero = is_zero;
    ThreadLookup( &dispatch->fs_last );
    dispatch->try_cmd = NULL;
    dispatch->exc = rtc->thr->excepts;
    if( 0 == throw_ro ) {
        dispatch->rethrow = true;
    } else {
        dispatch->rethrow = false;
    }
    dispatch->popped = false;
    dispatch->non_watcom = false;
    dispatch->fnexc_skip = NULL;
    dispatch->srch_ctl = rtc->thr->exc_pr;
}