Commit graph

434 commits

Author SHA1 Message Date
Ben Gras
aa6ff4c8be lib: setprogname() + getsubopt() 2010-06-26 00:44:24 +00:00
Arun Thomas
c0c8d25799 Rename mkfiles from minix.*.mk to bsd.*.mk
Makes things easier for pkgsrc
2010-06-25 18:29:09 +00:00
Ben Gras
45e4cce8c2 libc stubs for statvfs, contributed by Buccapatnam Tirumala, Gautam. 2010-06-23 23:51:29 +00:00
Erik van der Kouwe
50539c12f5 Remove obsolete mstats call 2010-06-23 10:43:08 +00:00
Ben Gras
24a5f48921 lib - a pwrite() implementation (Contributed by Buccapatnam Tirumala, Gautam) 2010-06-22 22:04:43 +00:00
Ben Gras
ddc3f62290 strptime() for minix. 2010-06-22 21:42:49 +00:00
Ben Gras
08f731bae0 original strptime. 2010-06-22 21:41:56 +00:00
Ben Gras
08e4312998 forget netbsd strptime. 2010-06-22 21:41:20 +00:00
Ben Gras
c7050eea55 original netbsd strptime 2010-06-22 21:37:54 +00:00
Ben Gras
81056ac999 stdio: j modifier for %d. (Contributed by Buccapatnam Tirumala, Gautam) 2010-06-22 16:22:17 +00:00
Tomas Hruby
21725c107d cd subdir && $(MAKE) targets -> $(MAKE) -C subdir targets
- first step towards parallel building
2010-06-22 12:03:09 +00:00
Ben Gras
15210b3e06 forget about multiple zeros on non-ack compiler, tracker item 457 2010-06-22 09:40:04 +00:00
Ben Gras
82dee9dbc3 add LC_MESSAGES 2010-06-22 09:31:16 +00:00
Ben Gras
6c0fcd575e lib: getproname: only return last path component 2010-06-20 00:24:35 +00:00
Ben Gras
3cc5e1add4 lib: no visibility features; fixes gcc warnings 2010-06-20 00:24:11 +00:00
Ben Gras
f60593cc35 libraries: fgetln() from pkgsrc branch. 2010-06-18 14:02:00 +00:00
Arun Thomas
042b5bf606 We have sys/cdefs.h now, so remove hacks. 2010-06-17 15:14:57 +00:00
Ben Gras
7b7091e905 zlib includes in lib/libz, install them too in /usr/include from toplevel makefile. 2010-06-17 15:05:20 +00:00
Ben Gras
ae947059e6 libraries, includes: libz: original libz source files with minix makefile. 2010-06-17 13:29:20 +00:00
David van Moolenbroek
eeab8e0680 libdriver: make partition code use a contiguous buffer 2010-06-13 10:40:22 +00:00
Arun Thomas
1b2c01db1b Makefile updates:
Turn on optimization
Remove some redundancy in FLAGS
2010-06-11 16:05:36 +00:00
Arun Thomas
f0a158d8c1 More cleanup to remove MM and FS references 2010-06-10 14:04:46 +00:00
David van Moolenbroek
2758519ed2 Change default hostname resolution order
Hostnames that contain at least one period, are now first attempted
to be resolved as FQDNs, before adding local domains is tried.
2010-06-10 11:14:36 +00:00
Ben Gras
1ce7983ee3 lib: declarations that needed ANSIfication since prototypes are declared 2010-06-09 13:01:11 +00:00
Ben Gras
c046958745 crtso.S: save *argv[] and argc globally, to be used by getprogname(). 2010-06-09 12:10:31 +00:00
Ben Gras
ba9990cc00 libc: minor minix changes for new netbsd files 2010-06-09 12:09:39 +00:00
Ben Gras
60d52d68da libc: add original netbsd files 2010-06-09 12:08:32 +00:00
Ben Gras
a0147a8c32 libutil: minix efun.c 2010-06-09 12:05:53 +00:00
Ben Gras
7b87ff5b11 libutil: original netbsd efun.c 2010-06-09 12:05:04 +00:00
Tomas Hruby
1207fcc6f0 int to endpoint_t conversions in mmap 2010-06-09 09:14:53 +00:00
Ben Gras
cccfe8e0ce lib: move tzfile.h from lib/libc/stdtime/ to include/ for general usage. 2010-06-08 19:11:42 +00:00
Arun Thomas
4c10a31440 Remove legacy MM, FS, and FS_PROC_NR macros 2010-06-08 13:58:01 +00:00
Ben Gras
035c5a369c move drivers/random SHA implementation to libutil and header to <minix/sha2.h> 2010-06-02 22:58:29 +00:00
Kees van Reeuwijk
36e12d5bd8 Use endpoint_t for the destination of mini_send and _syscall, and the
source of mini_receive.

Also some small cleanup.
2010-06-02 21:51:32 +00:00
Thomas Veerman
6bbcab3ec4 Clean up MFS a bit:
- Remove unused includes.
 - Add include guards to headers.
 - Use unsigned variables in case they're never going to hold a negative
   value. This causes GCC's complaints to disappear and should make flexelint
   a lot happier, too.
 - Make functions private when they're used only within a module.
 - Remove unused variables.
 - Add casts where appropriate.
2010-06-01 12:35:33 +00:00
Erik van der Kouwe
8bca982581 Remove those annoying $Id and $Revision tags 2010-05-31 20:00:08 +00:00
Erik van der Kouwe
8d06457241 Remove obsolete _fpu_present variable from crtso.S 2010-05-27 09:46:42 +00:00
Erik van der Kouwe
a31e9b0400 Oops, committed too much 2010-05-27 09:20:50 +00:00
Erik van der Kouwe
fc7438181b Avoid use of C++ reserved word class in headers (reported by Aki Goto, tracker item 375) 2010-05-27 09:18:49 +00:00
Arun Thomas
b48b037fbe Reorganize some directories
servers/hgfs/hgfs_server => servers/hgfs
servers/hgfs/libhgfs => lib/libhgfs
servers/rs/service => commands/service
drivers/memory/memory_driver => drivers/memory
drivers/memory/ramdisk => drivers/ramdisk
2010-05-26 22:49:57 +00:00
Tomas Hruby
a8111c5027 Various small scheduling related fixes 2010-05-26 07:16:39 +00:00
Erik van der Kouwe
1f11a57141 Oops, last commit included more than was intended 2010-05-20 08:07:47 +00:00
Erik van der Kouwe
5f15ec05b2 More system processes, this was not enough for the release script to run on some configurations 2010-05-20 08:05:07 +00:00
Arun Thomas
b0159ad168 Buildsystem changes for GCC
-Makefile updates
-Update mkdep
-Build fixes/warning cleanups for some programs
-Restore leading underscores on global syms in kernel asm files
-Increase ramdisk size
2010-05-19 13:24:15 +00:00
Erik van der Kouwe
77d5243f4a More sensible description for EPERM from http://www.opengroup.org/onlinepubs/000095399/basedefs/errno.h.html 2010-05-19 11:51:49 +00:00
Tomas Hruby
b09bcf6779 Scheduling server (by Bjorn Swift)
In this second phase, scheduling is moved from PM to its own
scheduler (see r6557 for phase one). In the next phase we hope to a)
include useful information in the "out of quantum" message and b)
create some simple scheduling policy that makes use of that
information.

When the system starts up, PM will iterate over its process table and
ask SCHED to take over scheduling unprivileged processes. This is
done by sending a SCHEDULING_START message to SCHED. This message
includes the processes endpoint, the parent's endpoint and its nice
level. The scheduler adds this process to its schedproc table, issues
a schedctl, and returns its own endpoint to PM - as the endpoint of
the effective scheduler. When a process terminates, a SCHEDULING_STOP
message is sent to the scheduler.

The reason for this effective endpoint is for future compatibility.
Some day, we may have a scheduler that, instead of scheduling the
process itself, forwards the SCHEDULING_START message on to another
scheduler.

PM has information on who schedules whom. As such, scheduling
messages from user-land are sent through PM. An example is when
processes change their priority, using nice(). In that case, a
getsetpriority message is sent to PM, which then sends a
SCHEDULING_SET_NICE to the process's effective scheduler.

When a process is forked through PM, it inherits its parent's
scheduler, but is spawned with an empty quantum. As before, a request
to fork a process flows through VM before returning to PM, which then
wakes up the child process. This flow has been modified slightly so
that PM notifies the scheduler of the new process, before waking up
the child process. If the scheduler fails to take over scheduling,
the child process is torn down and the fork fails with an erroneous
value.

Process priority is entirely decided upon using nice levels. PM
stores a copy of each process's nice level and when a child is
forked, its parent's nice level is sent in the SCHEDULING_START
message. How this level is mapped to a priority queue is up to the
scheduler. It should be noted that the nice level is used to
determine the max_priority and the parent could have been in a lower
priority when it was spawned. To prevent a CPU intensive process from
hawking the CPU by continuously forking children that get scheduled
in the max_priority, the scheduler should determine in which queue
the parent is currently scheduled, and schedule the child in that
same queue.

Other fixes: The USER_Q in kernel/proc.h was incorrectly defined as
NR_SCHED_QUEUES/2. That results in a "off by one" error when
converting priority->nice->priority for nice=0. This also had the
side effect that if someone were to set the MAX_USER_Q to something
else than 0, then USER_Q would be off.
2010-05-18 13:39:04 +00:00
David van Moolenbroek
9ba65d2ea8 This patch switches the MINIX3 ethernet driver stack from a port-based
model to an instance-based model. Each ethernet driver instance is now
responsible for exactly one network interface card. The port field in
/etc/inet.conf now acts as an instance field instead.

This patch also updates the data link protocol. This update:
- eliminates the concept of ports entirely;
- eliminates DL_GETNAME entirely;
- standardizes on using m_source for IPC and DL_ENDPT for safecopies;
- removes error codes from TASK/STAT replies, as they were unused;
- removes a number of other old or unused fields;
- names and renames a few other fields.

All ethernet drivers have been changed to:
- conform to the new protocol, and exactly that;
- take on an instance number based on a given "instance" argument;
- skip that number of PCI devices in probe iterations;
- use config tables and environment variables based on that number;
- no longer be limited to a predefined maximum of cards in any way;
- get rid of any leftover non-safecopy support and other ancient junk;
- have a correct banner protocol figure, or none at all.

Other changes:
* Inet.conf is now taken to be line-based, and supports #-comments.
  No existing installations are expected to be affected by this.
* A new, select-based asynchio library replaces the old one.
  Kindly contributed by Kees J. Bot.
* Inet now supports use of select() on IP devices.
  Combined, the last two changes together speed up dhcpd
  considerably in the presence of multiple interfaces.
* A small bug has been fixed in nonamed.
2010-05-17 22:22:53 +00:00
Erik van der Kouwe
7570df267f Full 64-bit multitplication and division added to u64 library 2010-05-17 16:44:26 +00:00
Arun Thomas
5706670029 Convert boot/ and commands/ over to bsdmake 2010-05-12 16:28:54 +00:00
Ben Gras
c5c25e7abc kernel/vm: change pde table info from single buffer to explicit per-process.
makes code in kernel more readable, and allows better sanity checking on
using the pde info.
2010-05-12 08:31:05 +00:00