/* pause.c (rsxnt) -- Copyright (c) 1996-1997 Rainer Schnitker */

#include "rsxnt.h"

void __pause(void)
{
    EMXPROCESS *p = _rsxnt_get_process_ptr();
    int retv;

    p->p_status = PS_SLEEP;
    retv = WaitForSingleObject(p->hEventSignal, INFINITE);
    p->p_status = PS_RUN;

#ifdef EMX_SYS_LIB
    if (retv != WAIT_TIMEOUT)
        _rsxnt_check_signals();
#endif
}
