**
** 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)
** +------------+---------+---------+--------+-------+---------+
** +------------+---------+---------+---------------+
**
** $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
** Import of dpeth 3c501/3c509b/.. ethernet driver by
** Giovanni Falzoni <fgalzoni@inwind.it>.
#endif
/* Request function key for debug dumps */
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);
#ifdef ETH_IGN_PROTO
int s;
/* 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);
/* Scan the timers queue for expired timers. Dispatch the watchdog function
int s;
/* Get the current time. */
- if ((s=sys_getuptime(&now)) != OK)
+ if ((s=getuptime(&now)) != OK)
panic("FLOPPY","Couldn't get uptime from clock.", s);
/* Add the timer to the local timer queue. */
int r;
/* Get the current time. */
- r= sys_getuptime(&now);
+ r= getuptime(&now);
if (r != OK)
panic("FXP","unable to get uptime from clock", r);
int r;
/* Get the current time to compare the timers against. */
- r= sys_getuptime(&now);
+ r= getuptime(&now);
if (r != OK)
panic("FXP","Unable to get uptime from clock.", r);
* Apr 29, 2005 added null byte generator (Jorrit N. Herder)
* Apr 27, 2005 added random device handling (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)
* Apr 20, 1992 device dependent/independent split (Kees J. Bot)
*/
#include "../libdriver/driver.h"
#include <sys/ioc_memory.h>
#include "../../kernel/const.h"
+#include "../../kernel/config.h"
#include "../../kernel/type.h"
#define NR_DEVS 7 /* number of minor devices */
struct driver *dp;
message *m_ptr;
{
-/* Check device number on open. Give I/O privileges to a process opening
- * /dev/mem or /dev/kmem. This may be needed in case of memory mapped I/O.
+/* Check device number on open. (This used to give I/O privileges to a
+ * 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 (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);
}
#include <unistd.h>
#include <sys/ioc_memory.h>
#include "../../kernel/const.h"
+#include "../../kernel/config.h"
#include "../../kernel/type.h"
#define tmra_ut timer_t
reply.DL_PROC = rep->re_client;
reply.DL_STAT = status | ((u32_t) err << 16);
reply.DL_COUNT = rep->re_read_s;
- if (OK != (r = sys_getuptime(&now)))
- panic("dp8390","sys_getuptime() failed:", r);
+ if (OK != (r = getuptime(&now)))
+ panic("dp8390","getuptime() failed:", r);
reply.DL_CLCK = now;
r= send(rep->re_client, &reply);
#include "tty.h"
#include "../../kernel/const.h"
+#include "../../kernel/config.h"
#include "../../kernel/type.h"
/* Definitions used by the console driver. */
int port_b_val, s;
/* 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);
if (!beeping) {
/* Set timer channel 2, square wave, with given frequency. */
#include "tty.h"
#include "keymaps/us-std.src"
#include "../../kernel/const.h"
+#include "../../kernel/config.h"
#include "../../kernel/type.h"
#include "../../kernel/proc.h"
/* See if an observer is registered and send it a message. */
if (proc_nr != NONE) {
m.NOTIFY_TYPE = FKEY_PRESSED;
+#if DEAD_CODE
notify(proc_nr, &m);
+#else
+ alert(proc_nr);
+#endif
}
return(TRUE);
}
case SYN_ALARM: /* fall through */
expire_timers(); /* run watchdogs of expired timers */
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 */
expire_timers(); /* run watchdogs of expired timers */
continue; /* contine to check for events */
+ }
case NEW_KMESS: /* new kernel message is available */
do_new_kmess(&tty_mess);
continue;
int s;
/* 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);
/* Scan the queue of timers for expired timers. This dispatch the watchdog
int s;
/* 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);
if (enable) {
exp_time = now + tty_ptr->tty_termios.c_cc[VTIME] * (HZ/10);