Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions  Download package

externC void en51Finish (  ) 

call this function if a task has finished execution

Parameters:
none 
Returns:
none

Definition at line 468 of file ven51.c.

References en71AlterTaskCnt(), en71LongTermMoveLock(), en81_NotifyCoordinator(), sqlyieldthread(), and vsShowMaxStackUse().

{
#   undef  MF__
#   define MF__ MOD__"en51Finish"
    ten50_UKT_Control               * this_ukt = THIS_UKT_CTRL;

    DBGIN_T (this_ukt->curr_task->index);

    /* Don't move this task during finish and next startup phase... */
    en71LongTermMoveLock( this_ukt->curr_task, TASK_IS_INACTIVE, true );

    /* PTS 1110953 */
    if ( XPARAM(showMaxStackUse) )
    {
        vsShowMaxStackUse( this_ukt->curr_task->index, eo92GetTaskTypeName(this_ukt->curr_task->type) );
    }

    /* - alter task activ counters */
    en71AlterTaskCnt( this_ukt->curr_task, SUB_ACTIVE_COUNTER );

    switch ( this_ukt->curr_task->type )
    {
    case TT_EV:
    case TT_UT:
    case TT_US:
        /* 
         * Wait for the REQ_INITOK request from requestor 
         */
        MSGD (( INFO_VCON_WAITING, this_ukt->curr_task->index ));
        this_ukt->curr_task->state = TSK_INACTIVE;
        GOTO_DISP (&this_ukt);

        if ( this_ukt->curr_quu->req_type != REQ_INITOK )
        {
            MSGALL (( ERR_ILLEGAL_REQUEST, "initial", this_ukt->curr_quu->req_type ));
            vabort ( WRITE_CORE );
        }
        e73_dl_enqu ( & KGS-> freelist, this_ukt->curr_quu );
        this_ukt->curr_quu = 0 ;
        break;

    case TT_TW:
        /*
        *  Crash server after bufwriter wrote trace (and dump).
        */
        switch ( KGS->state )
        {
        case SERVER_SHUTDOWNKILL :
        case SERVER_SHUTDOWNREINIT :
            KGS->state = SERVER_KILL;
            MSGD (( INFO_CHANGE_STATE, "KILL", KGS->state ));
            /*FALLTHROUGH*/
        case SERVER_KILL :
        case SERVER_STOP :
            en81_NotifyCoordinator(1);
            /* PTS 1108470 */
            while( en51_NeverStop )
            {
                sqlyieldthread();
            }
            /* PTS 1111155 */
            break;

        default:
            break;
        }
        MSGD (( ERR_VFINISH_TW_DUR_NORM_OP )) ;
        break;
    default:
        this_ukt->curr_task->state = TSK_INITIALIZED_EO00;
        break;
    }
    DBGOUT_T(this_ukt->curr_task->index)
}


Generated by  Doxygen 1.6.0   Back to index