Commit graph

567 commits

Author SHA1 Message Date
Thomas Veerman c8d0edc06a - Refactor mthread structure fields to prevent name clashes
- Remove sanity checks for initialized mutexes and condition variables. This
  significantly boosts performance. The checks can be turned back on by
  compiling libmthread with MTHREAD_STRICT. According to POSIX operations on
  uninitialized variables are a MAY fail if, therefore allowing this
  optimization.
- Test59 has to be accommodated to the lack of sanity checks on uninitialized
  variables in the library. It specifically tests for them and will run into
  segfaults when the checks are absent in the library.
- Fix a few bugs related to the scheduler
- Do some general code cleanups
2011-03-18 10:29:54 +00:00
Dirk Vogt 97980446a4 Cleaning up Makefiles (thx antoine) 2011-03-07 13:54:17 +00:00
Dirk Vogt aca0749d71 Small fix, implemented getvid/did 2011-03-07 13:31:48 +00:00
Gianluca Guida 693842c855 Sync NBSD libc errno.h with minix errno.h
This patch fixes some wrong error code number in nbsd libc's sys/errno.h
and adds new ones.

As in NetBSD the errno.h is used to automatically generate errlist.c array,
EBADCPU set to 1000 to be a bit too large, so we instruct the awk script
to stop at EDEADEPT (ELAST).
2011-03-04 22:37:43 +00:00
Gianluca Guida b87af1c325 Fix stat, add fstat and other NBSD libc fixes.
This patch changes the NBSD libc stat implemenation and adds
fstat (and headers), taken from current libc.
It also adds weaks alias to functions in the resolver that
were removed from public use in NetBSD but that are still
used by Minix, and fixes a NetBSD non-REENTRANT bug in
in gen/initdir.c.
2011-03-04 22:31:31 +00:00
Gianluca Guida 98af1ee195 NBSD libc: fix forgot weak_alias
This patch add a few weak_alias forgotten, so that non-internal
symbols are defined to be used from application.

Modifying only the minix-specific part, this patch needs no update
to minix-port.patch.
2011-03-03 16:44:18 +00:00
Ben Gras 493ea15714 rename aligned() macro to _minix_aligned 2011-03-02 16:05:59 +00:00
Ben Gras 81b63473c0 minor fix for clang - do_unbind() becomes void 2011-02-27 00:10:33 +00:00
Arun Thomas 25a790a631 VM and kernel support for ELF 2011-02-26 23:00:55 +00:00
Dirk Vogt e94953a396 added libddekit 2011-02-25 12:40:31 +00:00
Dirk Vogt 8c8e44d0ae libdevman: IPC wrapper for devman 2011-02-25 12:28:07 +00:00
Dirk Vogt 0908191386 _mount.c: don't check for excutable if MS_EXISTING is set 2011-02-22 17:59:08 +00:00
Dirk Vogt 083d30afbb added libusb, a IPC abstraction lib for USB stuff 2011-02-22 10:23:38 +00:00
Gianluca Guida dc75514afc Set MACHINE_ARCH and MACHINE_CPU to in NBSD libc Makefile 2011-02-22 09:22:26 +00:00
Gianluca Guida 7193ee9890 Add Minix-specific siglist.c 2011-02-22 09:19:14 +00:00
Gianluca Guida 8aa9382e58 Simplify (and fix) NBSD libc's weak references of getcwd. 2011-02-22 09:08:24 +00:00
Ben Gras 0b920bb1cd clang - let buildsystem figure out how to invoke AR, etc., for clang too. 2011-02-22 01:08:29 +00:00
Gianluca Guida 7b9d99251f Fix signal handling in NBSD libc.
lib/nbsd_libc/minix-port.patch updated.
2011-02-21 18:06:54 +00:00
Ben Gras cba6e667da clang: support for building elf using temporary elf-targeted binutils. 2011-02-21 16:06:58 +00:00
Gianluca Guida 4f294c247f Add NBSDLibc Minix specific files.
This patch mainly copies and modifies files existing in
the current libc implementing minix specific functions.

To keep consisten with the NetBSD libc, we remove 
namespace stubs and we use "namespace.h" and weak
links.
2011-02-17 17:11:09 +00:00
Gianluca Guida 3c9575aadc Clean up NetBSD libc Minix port.
This patch add the proper .if/.else/.endif to the Makefiles, add places I forgot #ifdef __minix and remove newlines.
2011-02-15 16:31:16 +00:00
Gianluca Guida ad4dda469f Port NetBSD libc functions to Minix.
This patch contains changes to NetBSD libc code base to make it
compile and work on Minix. Some of them are due to actual NetBSD
libc bugs, as we're compiling it in non-reentrant mode and with
a.out support, something not exactly frequent in NetBSD.
Others are proper fixes to port it to Minix (mostly sa_len
parameter missing in socket and a few mmap from files).
2011-02-15 12:19:40 +00:00
Gianluca Guida b6cbf7203b Import unmodified NetBSD libc in trunk
This patch imports the unmodified current version of NetBSD libc.
The NetBSD includes are in /nbsd_include, while the libc code itself is 
split between lib/nbsd_libc and common/lib/libc.
2011-02-14 19:36:03 +00:00
Erik van der Kouwe b096b323d1 Fix comment mutilated by find/replace 2011-02-02 14:53:49 +00:00
Ben Gras dee29bbd3c some extra math functions from netbsd for netpbm. 2011-01-30 23:40:51 +00:00
Ben Gras dc1cc91df1 <ansi.h> -> <minix/ansi.h> 2011-01-28 11:35:02 +00:00
Erik van der Kouwe 04229f0581 Servers request TSC freq from kernel rather than each one measuring it individually 2011-01-11 11:03:37 +00:00
Arun Thomas 4fe0dfa9aa libc and csu updates for ELF 2010-12-10 23:04:04 +00:00
Arun Thomas d824b54d82 csu/build support for ELF 2010-12-10 22:20:12 +00:00
Arun Thomas 372b873413 VFS/RS support for ELF 2010-12-10 09:27:56 +00:00
Dirk Vogt 9ed280d1ec decouple file system server start/termination from mount/umount 2010-11-23 19:34:56 +00:00
Arun Thomas 7a4149a3f5 For GCC/clang, don't build in ACK int64 routines 2010-11-19 12:36:44 +00:00
Tomas Hruby 504abf4b34 Inlining 64bit integer handling functions
- if gcc/clang is used the C functions that use long long can be
  inlined to get better performance (yes, it makes difference)
2010-11-18 16:37:40 +00:00
Dirk Vogt 6208131459 libdriver without mandatory driver main loop 2010-11-17 15:10:20 +00:00
Dirk Vogt c22564335f Added possibility to inject input events to tty
M    include/Makefile
A    include/minix/input.h
M    include/minix/com.h
M    drivers/tty/keyboard.c
M    drivers/tty/tty.c
M    drivers/tty/tty.h
M    include/minix/syslib.h
M    lib/libsys/Makefile
A    lib/libsys/input.c
2010-11-17 14:53:07 +00:00
Arun Thomas f0ab18377d GCC/clang: int64 routines in C 2010-11-12 18:38:10 +00:00
Arun Thomas aaaad89244 Use int64 functions consistently
Instead of manipulating the u64_t type directly, use the
ex64hi()/ex64lo()/make64() functions.
2010-11-07 23:35:29 +00:00
Arun Thomas 998af6f111 Move minix/paths.h to paths.h
Also, merge in relevant macros from NetBSD
2010-11-06 20:40:15 +00:00
Arun Thomas 40fb96b838 Remove revision IDs from files 2010-11-04 01:13:59 +00:00
Ben Gras efcfaf4b96 stdio: split vsprintf and vsnprintf
- workaround for linking problems
2010-11-02 22:05:40 +00:00
Ben Gras 51d9144e9f stdio/freopen.c: fill __iotab table with stream pointer
- lets fclose()d and then freopen()ed streams be fclose()d again
    without error
2010-11-02 22:02:50 +00:00
Ben Gras 09569d399f stdio/fclose.c: reset _buf
- if the stream gets freopen()ed, avoid buffer being seen as valid
2010-11-02 22:01:47 +00:00
Erik van der Kouwe 470a185909 Add libdriver support for async ioctl replies 2010-10-08 09:33:18 +00:00
Erik van der Kouwe ada0b4ca04 Fix warnings due to missing __dead attribute on exit 2010-10-05 07:25:47 +00:00
Erik van der Kouwe 591201c1a0 Fix warnings in libmthread 2010-10-04 20:19:40 +00:00
Erik van der Kouwe b0eaf0bc27 make system server vprintf check for NULL 2010-10-04 17:53:18 +00:00
Ben Gras 68de328ac1 make the asynsend table size NPROCS-dependent.
this is a fix for e.g. the situation where lots of processes die
instantly, and PM has to send an asyn msg for each one to VFS, and
panics if there are too many. there are likely more situations in
which this table should be dependent on the no. of processes.

reported by pikpik on #minix3.
2010-10-01 14:39:04 +00:00
Thomas Veerman a7072a5e1c Revamp the mthread library and update test59
Before, the 'main thread' of a process was never taken into account anywhere in
the library, causing mutexes not to work properly (and consequently, neither
did the condition variables). For example, if the 'main thread' (that is, the
thread which is started at the beginning of a process; not a spawned thread by
the library) would lock a mutex, it wasn't actually locked.
2010-09-30 13:44:13 +00:00
Tomas Hruby 74c5cd7668 The profile utility can set the sprofiling mode
- profile --nmi | --rtc sets the profiling mode

- --rtc is default, uses BIOS RTC, cannot profile kernel the presetted
  frequency values apply

- --nmi is only available in APIC mode as it uses the NMI watchdog, -f
  allows any frequency in Hz

- both modes use compatible data structures
2010-09-23 10:49:42 +00:00
David van Moolenbroek adbc4e4ea7 libsys: tsc_to_micros support for large TSC delta values 2010-09-23 09:26:42 +00:00