Renamed some system library functionality.
This commit is contained in:
parent
272a8496ac
commit
279250889f
8 changed files with 29 additions and 24 deletions
|
@ -13,11 +13,11 @@
|
||||||
**
|
**
|
||||||
** m_type DL_PORT DL_PROC DL_COUNT DL_MODE DL_ADDR
|
** m_type DL_PORT DL_PROC DL_COUNT DL_MODE DL_ADDR
|
||||||
** +------------+---------+---------+--------+-------+---------+
|
** +------------+---------+---------+--------+-------+---------+
|
||||||
** | HARD_INT | | | | | | NOTIFICATION|0
|
** | HARD_INT | | | | | |
|
||||||
** +------------+---------+---------+--------+-------+---------+
|
** +------------+---------+---------+--------+-------+---------+
|
||||||
** | SYN_ALARM | | | | | | NOTIFICATION|1
|
** | SYN_ALARM | | | | | |
|
||||||
** +------------+---------+---------+--------+-------+---------+
|
** +------------+---------+---------+--------+-------+---------+
|
||||||
** | HARD_STOP | | | | | | NOTIFICATION|4
|
** | HARD_STOP | | | | | |
|
||||||
** +------------+---------+---------+--------+-------+---------+
|
** +------------+---------+---------+--------+-------+---------+
|
||||||
** | FKEY_PRESSED | | | | | (99)
|
** | FKEY_PRESSED | | | | | (99)
|
||||||
** +------------+---------+---------+--------+-------+---------+
|
** +------------+---------+---------+--------+-------+---------+
|
||||||
|
@ -49,6 +49,9 @@
|
||||||
** +------------+---------+---------+---------------+
|
** +------------+---------+---------+---------------+
|
||||||
**
|
**
|
||||||
** $Log$
|
** $Log$
|
||||||
|
** Revision 1.2 2005/07/14 15:15:17 jnherder
|
||||||
|
** Renamed some system library functionality.
|
||||||
|
**
|
||||||
** Revision 1.1 2005/06/29 10:16:46 beng
|
** Revision 1.1 2005/06/29 10:16:46 beng
|
||||||
** Import of dpeth 3c501/3c509b/.. ethernet driver by
|
** Import of dpeth 3c501/3c509b/.. ethernet driver by
|
||||||
** Giovanni Falzoni <fgalzoni@inwind.it>.
|
** Giovanni Falzoni <fgalzoni@inwind.it>.
|
||||||
|
@ -557,7 +560,7 @@ PUBLIC int main(void)
|
||||||
#endif
|
#endif
|
||||||
/* Request function key for debug dumps */
|
/* Request function key for debug dumps */
|
||||||
fkeys = sfkeys = 0; bit_set(sfkeys, 8);
|
fkeys = sfkeys = 0; bit_set(sfkeys, 8);
|
||||||
if ((fkey_map(fkeys, sfkeys)) != OK)
|
if ((fkey_map(&fkeys, &sfkeys)) != OK)
|
||||||
printf("%s: couldn't program Shift+F8 key (%d)\n", DevName, errno);
|
printf("%s: couldn't program Shift+F8 key (%d)\n", DevName, errno);
|
||||||
|
|
||||||
#ifdef ETH_IGN_PROTO
|
#ifdef ETH_IGN_PROTO
|
||||||
|
|
|
@ -325,7 +325,7 @@ PRIVATE void f_expire_tmrs(struct driver *dp)
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
/* Get the current time to compare the timers against. */
|
/* Get the current time to compare the timers against. */
|
||||||
if ((s=sys_getuptime(&now)) != OK)
|
if ((s=getuptime(&now)) != OK)
|
||||||
panic("FLOPPY","Couldn't get uptime from clock.", s);
|
panic("FLOPPY","Couldn't get uptime from clock.", s);
|
||||||
|
|
||||||
/* Scan the timers queue for expired timers. Dispatch the watchdog function
|
/* Scan the timers queue for expired timers. Dispatch the watchdog function
|
||||||
|
@ -354,7 +354,7 @@ tmr_func_t watchdog; /* watchdog function to be called */
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
/* Get the current time. */
|
/* Get the current time. */
|
||||||
if ((s=sys_getuptime(&now)) != OK)
|
if ((s=getuptime(&now)) != OK)
|
||||||
panic("FLOPPY","Couldn't get uptime from clock.", s);
|
panic("FLOPPY","Couldn't get uptime from clock.", s);
|
||||||
|
|
||||||
/* Add the timer to the local timer queue. */
|
/* Add the timer to the local timer queue. */
|
||||||
|
|
|
@ -2364,7 +2364,7 @@ tmr_func_t watchdog; /* watchdog function to be called */
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
/* Get the current time. */
|
/* Get the current time. */
|
||||||
r= sys_getuptime(&now);
|
r= getuptime(&now);
|
||||||
if (r != OK)
|
if (r != OK)
|
||||||
panic("FXP","unable to get uptime from clock", r);
|
panic("FXP","unable to get uptime from clock", r);
|
||||||
|
|
||||||
|
@ -2400,7 +2400,7 @@ PRIVATE void fxp_expire_timers()
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
/* Get the current time to compare the timers against. */
|
/* Get the current time to compare the timers against. */
|
||||||
r= sys_getuptime(&now);
|
r= getuptime(&now);
|
||||||
if (r != OK)
|
if (r != OK)
|
||||||
panic("FXP","Unable to get uptime from clock.", r);
|
panic("FXP","Unable to get uptime from clock.", r);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
* Apr 29, 2005 added null byte generator (Jorrit N. Herder)
|
* Apr 29, 2005 added null byte generator (Jorrit N. Herder)
|
||||||
* Apr 27, 2005 added random device handling (Jorrit N. Herder)
|
* Apr 27, 2005 added random device handling (Jorrit N. Herder)
|
||||||
* Apr 09, 2005 added support for boot device (Jorrit N. Herder)
|
* Apr 09, 2005 added support for boot device (Jorrit N. Herder)
|
||||||
* Sep 03, 2004 secured code with ENABLE_USERPRIV (Jorrit N. Herder)
|
|
||||||
* Jul 26, 2004 moved RAM driver to user-space (Jorrit N. Herder)
|
* Jul 26, 2004 moved RAM driver to user-space (Jorrit N. Herder)
|
||||||
* Apr 20, 1992 device dependent/independent split (Kees J. Bot)
|
* Apr 20, 1992 device dependent/independent split (Kees J. Bot)
|
||||||
*/
|
*/
|
||||||
|
@ -21,6 +20,7 @@
|
||||||
#include "../libdriver/driver.h"
|
#include "../libdriver/driver.h"
|
||||||
#include <sys/ioc_memory.h>
|
#include <sys/ioc_memory.h>
|
||||||
#include "../../kernel/const.h"
|
#include "../../kernel/const.h"
|
||||||
|
#include "../../kernel/config.h"
|
||||||
#include "../../kernel/type.h"
|
#include "../../kernel/type.h"
|
||||||
|
|
||||||
#define NR_DEVS 7 /* number of minor devices */
|
#define NR_DEVS 7 /* number of minor devices */
|
||||||
|
@ -230,18 +230,12 @@ PRIVATE int m_do_open(dp, m_ptr)
|
||||||
struct driver *dp;
|
struct driver *dp;
|
||||||
message *m_ptr;
|
message *m_ptr;
|
||||||
{
|
{
|
||||||
/* Check device number on open. Give I/O privileges to a process opening
|
/* Check device number on open. (This used to give I/O privileges to a
|
||||||
* /dev/mem or /dev/kmem. This may be needed in case of memory mapped I/O.
|
* process opening /dev/mem or /dev/kmem. This may be needed in case of
|
||||||
|
* memory mapped I/O. With system calls to do I/O this is no longer needed.)
|
||||||
*/
|
*/
|
||||||
if (m_prepare(m_ptr->DEVICE) == NIL_DEV) return(ENXIO);
|
if (m_prepare(m_ptr->DEVICE) == NIL_DEV) return(ENXIO);
|
||||||
|
|
||||||
#if (CHIP == INTEL) && ENABLE_USERPRIV && ENABLE_USERIOPL
|
|
||||||
if (m_device == MEM_DEV || m_device == KMEM_DEV) {
|
|
||||||
sys_enable_iop(m_ptr->PROC_NR);
|
|
||||||
report("MEM", "sys_enable_iop for proc nr", m_ptr->PROC_NR);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return(OK);
|
return(OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/ioc_memory.h>
|
#include <sys/ioc_memory.h>
|
||||||
#include "../../kernel/const.h"
|
#include "../../kernel/const.h"
|
||||||
|
#include "../../kernel/config.h"
|
||||||
#include "../../kernel/type.h"
|
#include "../../kernel/type.h"
|
||||||
|
|
||||||
#define tmra_ut timer_t
|
#define tmra_ut timer_t
|
||||||
|
@ -1902,8 +1903,8 @@ int may_block;
|
||||||
reply.DL_PROC = rep->re_client;
|
reply.DL_PROC = rep->re_client;
|
||||||
reply.DL_STAT = status | ((u32_t) err << 16);
|
reply.DL_STAT = status | ((u32_t) err << 16);
|
||||||
reply.DL_COUNT = rep->re_read_s;
|
reply.DL_COUNT = rep->re_read_s;
|
||||||
if (OK != (r = sys_getuptime(&now)))
|
if (OK != (r = getuptime(&now)))
|
||||||
panic("dp8390","sys_getuptime() failed:", r);
|
panic("dp8390","getuptime() failed:", r);
|
||||||
reply.DL_CLCK = now;
|
reply.DL_CLCK = now;
|
||||||
|
|
||||||
r= send(rep->re_client, &reply);
|
r= send(rep->re_client, &reply);
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "tty.h"
|
#include "tty.h"
|
||||||
|
|
||||||
#include "../../kernel/const.h"
|
#include "../../kernel/const.h"
|
||||||
|
#include "../../kernel/config.h"
|
||||||
#include "../../kernel/type.h"
|
#include "../../kernel/type.h"
|
||||||
|
|
||||||
/* Definitions used by the console driver. */
|
/* Definitions used by the console driver. */
|
||||||
|
@ -746,7 +747,7 @@ PRIVATE void beep()
|
||||||
int port_b_val, s;
|
int port_b_val, s;
|
||||||
|
|
||||||
/* Fetch current time in advance to prevent beeping delay. */
|
/* Fetch current time in advance to prevent beeping delay. */
|
||||||
if ((s=sys_getuptime(&now)) != OK)
|
if ((s=getuptime(&now)) != OK)
|
||||||
panic("TTY","Console couldn't get clock's uptime.", s);
|
panic("TTY","Console couldn't get clock's uptime.", s);
|
||||||
if (!beeping) {
|
if (!beeping) {
|
||||||
/* Set timer channel 2, square wave, with given frequency. */
|
/* Set timer channel 2, square wave, with given frequency. */
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "tty.h"
|
#include "tty.h"
|
||||||
#include "keymaps/us-std.src"
|
#include "keymaps/us-std.src"
|
||||||
#include "../../kernel/const.h"
|
#include "../../kernel/const.h"
|
||||||
|
#include "../../kernel/config.h"
|
||||||
#include "../../kernel/type.h"
|
#include "../../kernel/type.h"
|
||||||
#include "../../kernel/proc.h"
|
#include "../../kernel/proc.h"
|
||||||
|
|
||||||
|
@ -538,7 +539,11 @@ int scode; /* scan code for a function key */
|
||||||
/* See if an observer is registered and send it a message. */
|
/* See if an observer is registered and send it a message. */
|
||||||
if (proc_nr != NONE) {
|
if (proc_nr != NONE) {
|
||||||
m.NOTIFY_TYPE = FKEY_PRESSED;
|
m.NOTIFY_TYPE = FKEY_PRESSED;
|
||||||
|
#if DEAD_CODE
|
||||||
notify(proc_nr, &m);
|
notify(proc_nr, &m);
|
||||||
|
#else
|
||||||
|
alert(proc_nr);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,10 +199,11 @@ PUBLIC void main(void)
|
||||||
case SYN_ALARM: /* fall through */
|
case SYN_ALARM: /* fall through */
|
||||||
expire_timers(); /* run watchdogs of expired timers */
|
expire_timers(); /* run watchdogs of expired timers */
|
||||||
continue; /* contine to check for events */
|
continue; /* contine to check for events */
|
||||||
case HARD_INT: /* hardware interrupt notification */
|
case HARD_INT: { /* hardware interrupt notification */
|
||||||
do_interrupt(&tty_mess);/* fetch chars from keyboard */
|
do_interrupt(&tty_mess);/* fetch chars from keyboard */
|
||||||
expire_timers(); /* run watchdogs of expired timers */
|
expire_timers(); /* run watchdogs of expired timers */
|
||||||
continue; /* contine to check for events */
|
continue; /* contine to check for events */
|
||||||
|
}
|
||||||
case NEW_KMESS: /* new kernel message is available */
|
case NEW_KMESS: /* new kernel message is available */
|
||||||
do_new_kmess(&tty_mess);
|
do_new_kmess(&tty_mess);
|
||||||
continue;
|
continue;
|
||||||
|
@ -1494,7 +1495,7 @@ PRIVATE void expire_timers(void)
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
/* Get the current time to compare the timers against. */
|
/* Get the current time to compare the timers against. */
|
||||||
if ((s=sys_getuptime(&now)) != OK)
|
if ((s=getuptime(&now)) != OK)
|
||||||
panic("TTY","Couldn't get uptime from clock.", s);
|
panic("TTY","Couldn't get uptime from clock.", s);
|
||||||
|
|
||||||
/* Scan the queue of timers for expired timers. This dispatch the watchdog
|
/* Scan the queue of timers for expired timers. This dispatch the watchdog
|
||||||
|
@ -1521,7 +1522,7 @@ int enable; /* set timer if true, otherwise unset */
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
/* Get the current time to calculate the timeout time. */
|
/* Get the current time to calculate the timeout time. */
|
||||||
if ((s=sys_getuptime(&now)) != OK)
|
if ((s=getuptime(&now)) != OK)
|
||||||
panic("TTY","Couldn't get uptime from clock.", s);
|
panic("TTY","Couldn't get uptime from clock.", s);
|
||||||
if (enable) {
|
if (enable) {
|
||||||
exp_time = now + tty_ptr->tty_termios.c_cc[VTIME] * (HZ/10);
|
exp_time = now + tty_ptr->tty_termios.c_cc[VTIME] * (HZ/10);
|
||||||
|
|
Loading…
Reference in a new issue