Commit graph

171 commits

Author SHA1 Message Date
Jorrit Herder 42ab148155 Reorganized system call library; uses separate file per call now.
New configuration header file to include/ exclude functionality.
Extracted privileged features from struct proc and create new struct priv.
Renamed various system calls for readability.
2005-07-14 15:12:12 +00:00
Jorrit Herder bac6068857 Rewrite of process scheduling:
- current and maximum priority per process;
- quantum size and current ticks left per process;
- max number of full quantums in a row allow
  (otherwise current priority is decremented)
2005-06-30 15:55:19 +00:00
Jorrit Herder a408699ce0 Cleaned up process table structure: removed p_type, p_pendcount.
Removed stop sequence when MINIX is shut down.
Disabled send mask checks --- to be replaced by proper mechanism.
Fixed bug relating to 'shutdown -x'.
Simplified clock accounting of realtime.
Updated Makefiles for mkdept script.
2005-06-24 16:24:40 +00:00
Ben Gras 3eeff022fb Added function read_cpu_flags() that returns current cpu flags as a
long.  This is used to check for interrupts being disabled at the time
of a lock() call, if enabled in config.h. The number of times this
happens is then counted in the kinfo structure. These events (recursive
lockings) lead to nasty race conditions.
2005-06-20 14:53:13 +00:00
Jorrit Herder 403580e95b Removed unused code in proc.c. New message passing code with pointer pointers
is now in use. Rewrote ready() and unready() fuctions.
2005-06-20 11:26:48 +00:00
Jorrit Herder 47e3d11e42 Fixed code passed to boot monitor after shutdown. 2005-06-17 09:40:02 +00:00
Jorrit Herder e0a98a4d65 * Fixed bug relating to nested locking in interrupt handlers. The nested lock
caused interrupts to be reenabled (due to unlock), which caused a race. The
problems were especially visible on slower machines.
* Relocated free memory parsing to process manager. This saved quite some
code at the kernel level. Text size was reduced by about 650 bytes.
* Removed locks for updating the realtime in the clock's main loop and the
get_uptime function. Interrupts are no longer reentrant, so realtime is
immediately updated.
2005-06-17 09:09:54 +00:00
Jorrit Herder f2a85e58d9 Various updates.
* Removed some variants of the SYS_GETINFO calls from the kernel;
  replaced them with new PM and utils libary functionality. Fixed
  bugs in utils library that used old get_kenv() variant.
* Implemented a buffer in the kernel to gather random data.
  Memory driver periodically checks this for /dev/random.
  A better random algorithm can now be implemented in the driver.
  Removed SYS_RANDOM; the SYS_GETINFO call is used instead.
* Remove SYS_KMALLOC from the kernel. Memory allocation can now
  be done at the process manager with new 'other' library functions.
2005-06-03 13:55:06 +00:00
Jorrit Herder 322ec9ef8b Moved stime, time, times POSIX calls from FS to PM. Removed child time
accounting from kernel (now in PM).  Large amount of files in this commit
is due to system time problems during development.
2005-05-31 09:50:51 +00:00
Jorrit Herder c2be104821 Improved NOTIFY system: fixed a minor error, ignore pending notifications
on SENDREC system calls. To be done: resource (buffer pool) management;
make it structurally impossible to run out of buffers.
2005-05-27 12:44:14 +00:00
Jorrit Herder 77c3213948 Optimized scheduling code. Old code is still available withing DEAD_CODE
and NEW_SCHED_Q definitions. Some minor problems are being traced at the
moment. This commit is meant to backup my files.
  --- Jorrit
2005-05-26 13:17:57 +00:00
Jorrit Herder 0899f82ab2 Fixed some minor issues with the NOTIFY call. 2005-05-24 14:35:58 +00:00
Ben Gras 0f55ebe90a Initialisation required for optional debugging code. 2005-05-24 12:30:51 +00:00
Jorrit Herder ccd17ecfed New NOTIFY system call! Queued at kernel. Duplicate messages (with same source
and type) are overwritten with newer flags/ arguments. The interface from
within the kernel is lock_notify(). User processes can make a system call with
notify(). NOTIFY fully replaces the old notification mechanism.
2005-05-24 10:06:17 +00:00
Ben Gras cafbbedbba Fix to let FXP driver send messages.
Removed banner talking about the known hang-bug (it's fixed,
practically speaking).
2005-05-20 12:39:36 +00:00
Jorrit Herder 614f49b557 Fixed some comments and reorganized some code.
Fixed minor bug in notify() function.
2005-05-18 10:36:23 +00:00
Jorrit Herder 1ecc6bf3b3 Removed 'system process' magic from PM and FS. 2005-05-13 08:57:08 +00:00
Ben Gras d0c3e8f818 . added rm_irq_handler which un-links an irq handler from the linked
list of handlers, callable by irqctl system call
 . workaround for hanging keyboard bug after shutdown.. if key is pressed
   during or after shutdown procedure, keyboard stops working. It looks like
   irq 1 gets stuck high if no keyboard reading is done (e.g. because the
   irq is masked or tty driver has exited). Workaround is to leave irqs
   enabled until the last second, and call shutdown() immediately after the
   last driver has stopped (tty task). This way the chance of an unserviced
   interrupt occuring is negligible.
2005-05-12 16:06:37 +00:00
Jorrit Herder ac0995259d *** empty log message *** 2005-05-02 14:30:04 +00:00
Jorrit Herder 89ac678b9b *** empty log message *** 2005-04-29 15:36:43 +00:00
Ben Gras 9865aeaa79 Initial revision 2005-04-21 14:53:53 +00:00