From: Jorrit Herder Date: Fri, 5 Aug 2005 09:41:15 +0000 (+0000) Subject: Various small cleanups and comments added. X-Git-Tag: v3.1.0~446 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/style.css?a=commitdiff_plain;h=b96c389e78befc70f61075e59c6873f9a74aa19e;p=minix.git Various small cleanups and comments added. --- diff --git a/kernel/clock.c b/kernel/clock.c index 008039db3..1b47081d6 100755 --- a/kernel/clock.c +++ b/kernel/clock.c @@ -8,22 +8,21 @@ * Changes: * Mar 18, 2004 clock interface moved to SYSTEM task (Jorrit N. Herder) * Sep 30, 2004 source code documentation updated (Jorrit N. Herder) - * Sep 24, 2004 redesigned timers and alarms (Jorrit N. Herder) + * Sep 24, 2004 redesigned alarm timers (Jorrit N. Herder) * - * The function do_clocktick() is not triggered from the clock library, but - * by the clock's interrupt handler when a watchdog timer has expired or - * another user process must be scheduled. + * The function do_clocktick() is not triggered by the clock's interrupt + * handler when a watchdog timer has expired or a process must be scheduled. * * In addition to the main clock_task() entry point, which starts the main * loop, there are several other minor entry points: * clock_stop: called just before MINIX shutdown * get_uptime: get realtime since boot in clock ticks - * set_timer: set a watchdog timer (*, see note below!) - * reset_timer: reset a watchdog timer (*) + * set_timer: set a watchdog timer (+) + * reset_timer: reset a watchdog timer (+) * calc_elapsed: do timing measurements: get delta ticks and pulses * read_clock: read the counter of channel 0 of the 8253A timer * - * (*) The CLOCK task keeps tracks of watchdog timers for the entire kernel. + * (+) The CLOCK task keeps tracks of watchdog timers for the entire kernel. * The watchdog functions of expired timers are executed in do_clocktick(). * It is crucial that watchdog functions cannot block, or the CLOCK task may * be blocked. Do not send() a message when the receiver is not expecting it. diff --git a/kernel/system.c b/kernel/system.c index 6fb2f810c..438a72091 100755 --- a/kernel/system.c +++ b/kernel/system.c @@ -21,7 +21,6 @@ * get_randomness: accumulate randomness in a buffer * * Changes: - * 2004 to 2005 many new system calls (see system.h) (Jorrit N. Herder) * Aug 04, 2005 check if kernel call is allowed (Jorrit N. Herder) * Jul 20, 2005 send signal to services with message (Jorrit N. Herder) * Jan 15, 2005 new, generalized virtual copy function (Jorrit N. Herder) diff --git a/kernel/system/do_copy.c b/kernel/system/do_copy.c index d685a4cfa..e10630422 100644 --- a/kernel/system/do_copy.c +++ b/kernel/system/do_copy.c @@ -9,6 +9,9 @@ * m5_l2: CP_DST_ADDR * m5_i2: CP_DST_PROC_NR * m5_l3: CP_NR_BYTES + * + * Changes: + * Jan 20, 2005 updated to use new virtual_copy() (Jorrit N. Herder) */ #include "../system.h" diff --git a/kernel/system/do_devio.c b/kernel/system/do_devio.c index 5d22d63b8..fe6028784 100644 --- a/kernel/system/do_devio.c +++ b/kernel/system/do_devio.c @@ -6,6 +6,9 @@ * m2_i1: DIO_TYPE (flag indicating byte, word, or long) * m2_l1: DIO_PORT (port to read/ write) * m2_l2: DIO_VALUE (value to write/ return value read) + * + * Changes: + * Feb 02, 2004 created to support user-space drivers (Jorrit N. Herder) */ #include "../system.h" diff --git a/kernel/system/do_exit.c b/kernel/system/do_exit.c index 3eac7891b..71c860ca7 100644 --- a/kernel/system/do_exit.c +++ b/kernel/system/do_exit.c @@ -3,6 +3,9 @@ * * The parameters for this system call are: * m1_i1: PR_PROC_NR (slot number of exiting process) + * + * Changes: + * Sep 09, 2004 updated to allow services to exit (Jorrit N. Herder) */ #include "../system.h" diff --git a/kernel/system/do_getinfo.c b/kernel/system/do_getinfo.c index 9159a79d1..1a03a631b 100644 --- a/kernel/system/do_getinfo.c +++ b/kernel/system/do_getinfo.c @@ -7,6 +7,9 @@ * m1_i1: I_VAL_LEN (maximum length expected, optional) * m1_p2: I_VAL_PTR2 (second, optional pointer) * m1_i2: I_VAL_LEN2 (second length or process nr) + * + * Changes: + * May 24, 2004 Created. (Jorrit N. Herder) */ #include "../system.h" diff --git a/kernel/system/do_getksig.c b/kernel/system/do_getksig.c index 8e3d0fe64..a8814252f 100644 --- a/kernel/system/do_getksig.c +++ b/kernel/system/do_getksig.c @@ -5,6 +5,8 @@ * m2_i1: SIG_PROC # process with pending signals * m2_l1: SIG_MAP # bit map with pending signals * + * Changes: + * Oct 24, 2004 Created. (Jorrit N. Herder) */ #include "../system.h" diff --git a/kernel/system/do_int86.c b/kernel/system/do_int86.c index 004d4b9ea..41c631306 100644 --- a/kernel/system/do_int86.c +++ b/kernel/system/do_int86.c @@ -3,6 +3,9 @@ * * The parameters for this system call are: * m1_p1: INT86_REG86 + * + * Changes: + * Jul 30, 2005 created to support BIOS driver (Philip Homburg) */ #include "../system.h" diff --git a/kernel/system/do_irqctl.c b/kernel/system/do_irqctl.c index ae349c60c..f76965df1 100644 --- a/kernel/system/do_irqctl.c +++ b/kernel/system/do_irqctl.c @@ -7,6 +7,9 @@ * m5_i1: IRQ_POLICY (irq policy allows reenabling interrupts) * m5_l3: IRQ_HOOK_ID (provides index to be returned on interrupt) * ,, ,, (returns index of irq hook assigned at kernel) + * + * Changes: + * Feb 24, 2004 Created to support user-space drivers (Jorrit N. Herder) */ #include "../system.h" diff --git a/kernel/system/do_kill.c b/kernel/system/do_kill.c index 442a0e4e8..648b35479 100644 --- a/kernel/system/do_kill.c +++ b/kernel/system/do_kill.c @@ -4,6 +4,9 @@ * The parameters for this system call are: * m2_i1: SIG_PROC # process to signal/ pending * m2_i2: SIG_NUMBER # signal number to send to process + * + * Changes: + * Jul 09, 2005 updated to signal system processes (Jorrit N. Herder) */ #include "../system.h" diff --git a/kernel/system/do_memset.c b/kernel/system/do_memset.c index 0235c2e11..fe37a40cc 100644 --- a/kernel/system/do_memset.c +++ b/kernel/system/do_memset.c @@ -5,6 +5,9 @@ * m2_p1: MEM_PTR (virtual address) * m2_l1: MEM_COUNT (returns physical address) * m2_l2: MEM_PATTERN (size of datastructure) + * + * Changes: + * Jun 21, 2005 created to speed up exec(2) (Ben J. Gras) */ #include "../system.h" diff --git a/kernel/system/do_nice.c b/kernel/system/do_nice.c index 879ae32ff..ec7cc07b3 100644 --- a/kernel/system/do_nice.c +++ b/kernel/system/do_nice.c @@ -4,6 +4,9 @@ * The parameters for this system call are: * m1_i1: PR_PROC_NR process number to change priority * m1_i2: PR_PRIORITY the new priority + * + * Changes: + * Jun 21, 2005 created for nice(2) system call (Ben J. Gras) */ #include "../system.h" diff --git a/kernel/system/do_privctl.c b/kernel/system/do_privctl.c index 8c2e8011c..45ebec4e0 100644 --- a/kernel/system/do_privctl.c +++ b/kernel/system/do_privctl.c @@ -3,6 +3,9 @@ * * The parameters for this system call are: * m1_i1: PR_PROC_NR (process number of caller) + * + * Changes: + * Jul 13, 2005 created to dynamically start services (Jorrit N. Herder) */ #include "../system.h" diff --git a/kernel/system/do_sdevio.c b/kernel/system/do_sdevio.c index 7ca526ddb..4084a8a4e 100644 --- a/kernel/system/do_sdevio.c +++ b/kernel/system/do_sdevio.c @@ -8,6 +8,9 @@ * m2_p1: DIO_VEC_ADDR (virtual address of buffer) * m2_l2: DIO_VEC_SIZE (number of elements) * m2_i2: DIO_VEC_PROC (process where buffer is) + * + * Changes: + * May 24, 2004 Created to support user-space drivers (Jorrit N. Herder) */ #include "../system.h" diff --git a/kernel/system/do_segctl.c b/kernel/system/do_segctl.c index 9b29e5f22..91c88cb0f 100644 --- a/kernel/system/do_segctl.c +++ b/kernel/system/do_segctl.c @@ -7,6 +7,9 @@ * m4_l1: SEG_SELECT (return segment selector here) * m4_l2: SEG_OFFSET (return offset within segment here) * m4_l5: SEG_INDEX (return index into remote memory map here) + * + * Changes: + * Jul 13, 2004 created to support user-space drivers (Jorrit N. Herder) */ #include "../system.h" #include "../protect.h" diff --git a/kernel/system/do_unused.c b/kernel/system/do_unused.c index c0278ade7..010f8d013 100644 --- a/kernel/system/do_unused.c +++ b/kernel/system/do_unused.c @@ -1,4 +1,10 @@ - +/* This file provides a catch-all handler for unused system calls. A system + * call may be unused when it is not defined or when it is disabled in the + * kernel's configuration. + * + * Changes: + * Oct 10, 2004 created (Jorrit N. Herder) + */ #include "../system.h" /*===========================================================================* @@ -7,8 +13,7 @@ PUBLIC int do_unused(m) message *m; /* pointer to request message */ { - kprintf("SYSTEM got unused request %d", m->m_type); - kprintf("from %d.\n", m->m_source); + kprintf("SYSTEM: got unused request %d from %d", m->m_type, m->m_source); return(EBADREQUEST); /* illegal message type */ } diff --git a/kernel/system/do_vcopy.c b/kernel/system/do_vcopy.c index 47260cfc5..46543e0d0 100644 --- a/kernel/system/do_vcopy.c +++ b/kernel/system/do_vcopy.c @@ -5,6 +5,9 @@ * m1_i3: VCP_VEC_SIZE size of copy request vector * m1_p1: VCP_VEC_ADDR address of vector at caller * m1_i2: VCP_NR_OK number of successfull copies + * + * Changes: + * Apr 12, 2005 updated to use new virtual_copy() (Jorrit N. Herder) */ #include "../system.h" diff --git a/kernel/system/do_vdevio.c b/kernel/system/do_vdevio.c index dfc4a6405..ef3dbe984 100644 --- a/kernel/system/do_vdevio.c +++ b/kernel/system/do_vdevio.c @@ -6,6 +6,9 @@ * m2_i1: DIO_TYPE (flag indicating byte, word, or long) * m2_p1: DIO_VEC_ADDR (pointer to port/ value pairs) * m2_i2: DIO_VEC_SIZE (number of ports to read or write) + * + * Changes: + * Apr 18, 2004 created to support user-space drivers (Jorrit N. Herder) */ #include "../system.h" diff --git a/kernel/table.c b/kernel/table.c index 8645c1d3d..93082917f 100755 --- a/kernel/table.c +++ b/kernel/table.c @@ -72,7 +72,7 @@ PUBLIC char *t_stack[TOT_STACK_SPACE / sizeof(char *)]; #define DRV_M (USR_M | s(SYSTEM) | s(CLOCK) | s(LOG_PROC_NR) | s(TTY_PROC_NR)) /* Define kernel calls that processes are allowed to make. This is not looking - * very nice, but we really need to set access rights on a per call basis. + * very nice, but we need to define the access rights on a per call basis. * Note that the system services manager has all bits on, because it should * be allowed to distribute rights to services that it starts. */