]> Zhao Yanbai Git Server - minix.git/commitdiff
Updated drivers according to syslib interface changes.
authorJorrit Herder <jnherder@minix3.org>
Fri, 29 Jul 2005 15:00:22 +0000 (15:00 +0000)
committerJorrit Herder <jnherder@minix3.org>
Fri, 29 Jul 2005 15:00:22 +0000 (15:00 +0000)
drivers/at_wini/at_wini.c
drivers/floppy/floppy.c
drivers/fxp/fxp.c
drivers/log/log.c
drivers/memory/memory.c
drivers/printer/printer.c
drivers/rtl8139/rtl8139.c
drivers/tty/console.c
drivers/tty/keyboard.c
drivers/tty/tty.c

index 479037539cc35a0f0628d53998647a26b56cb3cc..1e32d32cb6f293aed888e3c45c16d654830c95c1 100644 (file)
@@ -696,7 +696,7 @@ struct command *cmd;                /* Command block */
    * controller was not able to execute the command. Leftover timeouts are
    * simply ignored by the main loop. 
    */
-  sys_syncalrm(SELF, wakeup_ticks, 0);
+  sys_setalarm(wakeup_ticks, 0);
 
   w_status = STATUS_ADMBSY;
   w_command = cmd->command;
@@ -1114,7 +1114,7 @@ unsigned cnt;
    * controller was not able to execute the command. Leftover timeouts are
    * simply ignored by the main loop. 
    */
-  sys_syncalrm(SELF, wakeup_ticks, 0);
+  sys_setalarm(wakeup_ticks, 0);
 
 #if _WORD_SIZE > 2
   if (cnt > 0xFFFE) cnt = 0xFFFE;      /* Max data per interrupt. */
index eb6b839927ce60d4b2a69792c011c3c31b430d64..829d0317d1e81cc7c554d1a80be3bf25ee4009db 100644 (file)
@@ -339,7 +339,7 @@ PRIVATE void f_expire_tmrs(struct driver *dp, message *m_ptr)
        f_next_timeout = TMR_NEVER;
   } else {                                       /* set new sync alarm */
        f_next_timeout = f_timers->tmr_exp_time;
-       if ((s=sys_syncalrm(SELF, f_next_timeout, 1)) != OK)
+       if ((s=sys_setalarm(f_next_timeout, 1)) != OK)
                panic("FLOPPY","Couldn't set synchronous alarm.", s);
   }
 }
@@ -368,7 +368,7 @@ tmr_func_t watchdog;                        /* watchdog function to be called */
    */
   if (f_timers->tmr_exp_time != f_next_timeout) {
        f_next_timeout = f_timers->tmr_exp_time; 
-       if ((s=sys_syncalrm(SELF, f_next_timeout, 1)) != OK)
+       if ((s=sys_setalarm(f_next_timeout, 1)) != OK)
                panic("FLOPPY","Couldn't set synchronous alarm.", s);
   }
 }
index bf411560ce199306b35f6d6c7d2e562b79e45e43..3e46c7d1d0274ef396a85687d0c7a1d7d71e8691 100644 (file)
@@ -2385,9 +2385,9 @@ tmr_func_t watchdog;                      /* watchdog function to be called */
                fxp_timers->tmr_exp_time < fxp_next_timeout)
        {
                fxp_next_timeout= fxp_timers->tmr_exp_time; 
-               printf("fxp_set_timer: calling sys_syncalrm for %d (now+%d)\n",
+               printf("fxp_set_timer: calling sys_setalarm for %d (now+%d)\n",
                        fxp_next_timeout, fxp_next_timeout-now);
-               r= sys_syncalrm(SELF, fxp_next_timeout, 1);
+               r= sys_setalarm(fxp_next_timeout, 1);
                if (r != OK)
                        panic("FXP","unable to set synchronous alarm", r);
        }
@@ -2420,7 +2420,7 @@ PRIVATE void fxp_expire_timers()
   else
   {                                      /* set new alarm */
        fxp_next_timeout = fxp_timers->tmr_exp_time;
-       r= sys_syncalrm(SELF, fxp_next_timeout, 1);
+       r= sys_setalarm(fxp_next_timeout, 1);
        if (r != OK)
                panic("FXP","Unable to set synchronous alarm.", r);
   }
index fb890af90015dd45466dcbe390a824603073ddf3..9052c5159d2b851abeebc55fbcb4c57d2a4ed9c8 100644 (file)
@@ -137,7 +137,7 @@ subwrite(struct logdevice *log, int count, int proc_nr, vir_bytes user_vir)
                log->log_status = subread(log, log->log_iosize,
                        log->log_proc_nr, log->log_user_vir);
                printf("alert for revive %d..\n", log->log_source);
-               alert(log->log_source); 
+               notify(log->log_source); 
                printf("alert for revive done..\n");
                log->log_revive_alerted = 1;
        } 
@@ -153,7 +153,7 @@ subwrite(struct logdevice *log, int count, int proc_nr, vir_bytes user_vir)
                 * swallow all the data (log_size > 0).
                 */
                if(log->log_selected & SEL_RD) {
-                       alert(log->log_select_proc);
+                       notify(log->log_select_proc);
                        log->log_select_alerted = 1;
 #if LOG_DEBUG
                        printf("log notified %d\n", log->log_select_proc);
index 98f1b131752fa80eb967d8147e8381a6afeb7fe0..fd6f0073ab2f5c5cc5a3b53290c5cdeab344aa6d 100644 (file)
@@ -396,8 +396,8 @@ message *m_ptr;                             /* pointer to alarm message */
   }
 
   /* Schedule new alarm for next m_random call. */
-  if (OK != (s=sys_syncalrm(SELF, KRANDOM_PERIOD, 0)))
-       report("MEM", "sys_syncalarm failed", s);
+  if (OK != (s=sys_setalarm(KRANDOM_PERIOD, 0)))
+       report("MEM", "sys_setalarm failed", s);
 }
 
 /*============================================================================*
index 81b0538dd52ea3c1e012b3031be297f61e8e2ea3..9d570f4789862bb0dac3c7b94a3da499d6f86405 100644 (file)
@@ -258,7 +258,7 @@ PRIVATE void output_done()
 #else
     revive_pending = TRUE;
     revive_status = status;
-    alert(caller);
+    notify(caller);
 #endif
 }
 
index 337bda7d76c2cc629148c59cb27d39baee579a12..1616bd26e4a22cfc702ff639734ec524a43f2c1b 100755 (executable)
@@ -459,7 +459,7 @@ message *mp;
 
                tmra_inittimer(&rl_watchdog);
                /* Use a synchronous alarm instead of a watchdog timer. */
-               sys_syncalrm(SELF, HZ, 0);
+               sys_setalarm(HZ, 0);
        }
 
        port = mp->DL_PORT;
@@ -2352,7 +2352,7 @@ timer_t *tp;
        int i;
        re_t *rep;
        /* Use a synchronous alarm instead of a watchdog timer. */
-       sys_setalarm(SELF, HZ, 0);
+       sys_setalarm(HZ, 0);
 
        for (i= 0, rep = &re_table[0]; i<RE_PORT_NR; i++, rep++)
        {
index d13e27861447648b120e79ce6337b40af60890f2..839d618a6e3a91524a1d0fbf59b8fd8ce600f5c5 100644 (file)
@@ -765,8 +765,8 @@ PRIVATE void beep()
   tmrs_settimer(&tty_timers, &tmr_stop_beep, now+B_TIME, stop_beep, NULL);
   if (tty_timers->tmr_exp_time != tty_next_timeout) {
        tty_next_timeout = tty_timers->tmr_exp_time;
-       if ((s=sys_syncalrm(SELF, tty_next_timeout, 1)) != OK)
-               panic("TTY","Console couldn't set syn alarm.", s);
+       if ((s=sys_setalarm(tty_next_timeout, 1)) != OK)
+               panic("TTY","Console couldn't set alarm.", s);
   }
 }
 
index 215ffa32d2678e04ceeec68b0ef87dc3a60adb6f..4b8485018882c2822bd23a6d8dbe91652616a9aa 100644 (file)
@@ -539,7 +539,7 @@ int scode;                  /* scan code for a function key */
   /* See if an observer is registered and send it a message. */
   if (proc_nr != NONE) { 
       m.NOTIFY_TYPE = FKEY_PRESSED;
-      alert(proc_nr);
+      notify(proc_nr);
   }
   return(TRUE);
 }
index 26dcbad7b376f84b3b1100b259befed986581f2e..3998c4e5b381f5ea0879940c27c999aaf044a9a9 100644 (file)
@@ -213,12 +213,10 @@ PUBLIC void main(void)
 
                if (sigismember(&sigset, SIGKSTOP)) {
                        cons_stop();            /* switch to primary console */
-#if DEAD_CODE
                        if (irq_hook_id != -1) {
                                sys_irqdisable(&irq_hook_id);
                                sys_irqrmpolicy(KEYBOARD_IRQ, &irq_hook_id);
                        }
-#endif
                } 
                if (sigismember(&sigset, SIGTERM)) cons_stop(); 
                if (sigismember(&sigset, SIGKMESS)) do_new_kmess(&tty_mess);
@@ -847,7 +845,7 @@ PUBLIC int select_retry(struct tty *tp)
        }
 #else
        if (select_try(tp, tp->tty_select_ops))
-               alert(tp->tty_select_proc);
+               notify(tp->tty_select_proc);
 #endif
 
        return OK;
@@ -896,7 +894,7 @@ tty_t *tp;                  /* TTY to check for events. */
   if (tp->tty_incum >= tp->tty_min && tp->tty_inleft > 0) {
 #if NEW_REVIVE
        if (tp->tty_inrepcode == REVIVE) {
-               alert(tp->tty_incaller);
+               notify(tp->tty_incaller);
                tp->tty_inrevived = 1;
        } else {
                tty_reply(tp->tty_inrepcode, tp->tty_incaller, 
@@ -973,7 +971,7 @@ register tty_t *tp;         /* pointer to terminal to read from */
   if (tp->tty_inleft == 0) {
 #if NEW_REVIVE
        if (tp->tty_inrepcode == REVIVE) {
-               alert(tp->tty_incaller);
+               notify(tp->tty_incaller);
                tp->tty_inrevived = 1;
        } else {
                tty_reply(tp->tty_inrepcode, tp->tty_incaller, 
@@ -1605,7 +1603,7 @@ PRIVATE void expire_timers(void)
   if (tty_timers == NULL) tty_next_timeout = TMR_NEVER;
   else {                                         /* set new sync alarm */
        tty_next_timeout = tty_timers->tmr_exp_time;
-       if ((s=sys_syncalrm(SELF, tty_next_timeout, 1)) != OK)
+       if ((s=sys_setalarm(tty_next_timeout, 1)) != OK)
                panic("TTY","Couldn't set synchronous alarm.", s);
   }
 }
@@ -1641,7 +1639,7 @@ int enable;                       /* set timer if true, otherwise unset */
   if (tty_timers == NULL) tty_next_timeout = TMR_NEVER;
   else if (tty_timers->tmr_exp_time != tty_next_timeout) { 
        tty_next_timeout = tty_timers->tmr_exp_time;
-       if ((s=sys_syncalrm(SELF, tty_next_timeout, 1)) != OK)
+       if ((s=sys_setalarm(tty_next_timeout, 1)) != OK)
                panic("TTY","Couldn't set synchronous alarm.", s);
   }
 }