Пример #1
0
/*                 *****  do_shutdown  *****

   This is the main system shutdown function, and the ONLY function
   that should EVER be called to shut the system down. It calls one
   or more of the above static helper functions as needed.
*/
void do_shutdown()
{
TID tid;
#if defined(_MSVC_)
    if ( sysblk.shutimmed )
        do_shutdown_now();
    else
    {
#endif // defined(_MSVC_)
        if(is_wait_sigq_pending())
            cancel_wait_sigq();
        else
            if(can_signal_quiesce() && !signal_quiesce(0,0))
                create_thread(&tid, DETACHED, do_shutdown_wait,
                              NULL, "do_shutdown_wait");
            else
                do_shutdown_now();
#if defined(_MSVC_)
    }
#endif // defined(_MSVC_)
}
Пример #2
0
/*                 *****  do_shutdown  *****

   This is the main system shutdown function, and the ONLY function
   that should EVER be called to shut the system down. It calls one
   or more of the above static helper functions as needed.
*/
void do_shutdown()
{
TID tid;
    if(is_wait_sigq_pending())
        cancel_wait_sigq();
    else
        if(can_signal_quiesce() && !signal_quiesce(0,0))
            create_thread(&tid, DETACHED, do_shutdown_wait,
                          NULL, "do_shutdown_wait");
        else
            do_shutdown_now();
}
Пример #3
0
/*                     do_shutdown_wait

   This function simply waits for the CPUs to stop and then calls
   the above do_shutdown_now function to perform the actual shutdown
   (which releases the device configuration, etc)
*/
static void do_shutdown_wait()
{
    logmsg(_("HHCIN098I Shutdown initiated\n"));
    wait_sigq_resp();
    do_shutdown_now();
}