Beispiel #1
0
static void schedule(void)
{
        register PD     *p;

                                                /* run through lists    */
                                                /*   until someone is   */
                                                /*   on the rlr or the  */
                                                /*   fork list          */
        do
        {
#if USE_STOP_INSN_TO_FREE_HOST_CPU
          stop_until_interrupt();
#endif
                                                /* poll the keyboard    */
          chkkbd();
                                                /* now move drl         */
                                                /*   processes to rlr   */
          while ( drl )
          {
            drl = (p = drl) -> p_link;
            disp_act(p);
          }
                                                /* check if there is    */
                                                /*   something to run   */
        } while ( !rlr && !fpcnt );
}
Beispiel #2
0
LONG bconin2(void)
{
    WORD old_sr;
    ULONG value;

    while (!bconstat2()) {
#if USE_STOP_INSN_TO_FREE_HOST_CPU
        stop_until_interrupt();
#endif
    }
    /* disable interrupts */
    old_sr = set_sr(0x2700);

    ikbdiorec.head += 4;
    if (ikbdiorec.head >= ikbdiorec.size) {
        ikbdiorec.head = 0;
    }
    value = *(ULONG_ALIAS *) (ikbdiorec.buf + ikbdiorec.head);

    /* restore interrupts */
    set_sr(old_sr);
    return value;
}