Exemplo n.º 1
0
dtid_t RemoteSetThread( dtid_t tid )
{
    unsigned            err;

    if( HaveRemoteRunThread() )
        return( RemoteSetRunThreadWithErr( tid, &err ) );
    else
        return( RemoteSetThreadWithErr( tid, &err ) );
}
Exemplo n.º 2
0
dtid_t RemoteSetThread( dtid_t tid )
{
    error_handle    errh;

    if( HaveRemoteRunThread() ) {
        return( RemoteSetRunThreadWithErr( tid, &errh ) );
    } else {
        return( RemoteSetThreadWithErr( tid, &errh ) );
    }
}
Exemplo n.º 3
0
void RunThreadNotify( void )
{
    thread_state    *thd;

    if( HeadThd && HaveRemoteRunThread() ) {
        RemotePollRunThread();

        if( RunThreadWnd ) {
            for( thd = HeadThd; thd != NULL; thd = thd->link ) {
                RemoteUpdateRunThread( thd );
            }
            WndRepaint( RunThreadWnd );
        }
    }
}
Exemplo n.º 4
0
static thread_state     *AddThread( dtid_t tid, unsigned state )
{
    thread_state    **owner;
    thread_state    *thd;
    char            name[UTIL_LEN];

    owner =  &HeadThd;
    for( ;; ) {
        thd = *owner;
        if( thd == NULL ) break;
        if( tid < thd->tid ) break;
        if( tid == thd->tid ) {
            if( _IsOn( SW_THREAD_EXTRA_CHANGED ) ) {
                *owner = thd->link;
                state = thd->state & ~THD_DEAD;
                _Free( thd );
                break;
            }
            thd->state &= ~THD_DEAD;
            return( thd );
        }
        owner = &thd->link;
    }
    if( HaveRemoteRunThread() )
        RemoteRunThdName( tid, name );
    else
        RemoteThdName( tid, name );
    _Alloc( thd, sizeof( thread_state ) + strlen( name ) );
    if( thd == NULL ) return( NULL );
    thd->link = *owner;
    *owner = thd;
    strcpy( thd->name, name );
    thd->tid = tid;
    thd->state = state;
    thd->cs = 0;
    thd->eip = 0;
    thd->extra[0] = 0;
    return( thd );
}