These two request are handled by the same function in some FSes, which
prevents us from using two different kinds of messages.
Change-Id: Iede3a0251d8d84ca7f121c56f30f42b045b0c737
Those messages offer a simple array of the given type. This should allow
for fast and simple prototyping.
When a protocol is fixed, then proper message types should be defined.
Change-Id: I4e98eeb0493924f3015862a51d14d894315e2bc2
This implements a near noop setpgid, unless the use is one equivalent
to setsid, in which case it will behave as such.
Also activates setpgrp, which is implemented in terms of setpgid.
Change-Id: I84411cb1957351aa1d3985623cd9e69bdf6f8d4c
. define _MINIX_SYSTEM for all system code from minix.service.mk
. hide some system-level declarations and definitions
behind _MINIX_SYSTEM to cleanly fix host tool build problems on
Minix (such as: NONE being defined and paddr_t being used but not
declared)
. the similar definition _SYSTEM is unsuitable as it changes the
values of errno definitions
Change-Id: I407de79e2575115243a074b16e79546a279cfa3e
Change the kernel to add features to vircopy and safecopies so that
transparent copy fixing won't happen to avoid deadlocks, and such copies
fail with EFAULT.
Transparently making copying work from filesystems (as normally done by
the kernel & VM when copying fails because of missing/readonly memory)
is problematic as it can happen that, for file-mapped ranges, that that
same filesystem that is blocked on the copy request is needed to satisfy
the memory range, leading to deadlock. Dito for VFS itself, if done with
a blocking call.
This change makes the copying done from a filesystem fail in such cases
with EFAULT by VFS adding the CPF_TRY flag to the grants. If a FS call
fails with EFAULT, VFS will then request the range to be made available
to VM after the FS is unblocked, allowing it to be used to satisfy the
range if need be in another VFS thread.
Similarly, for datacopies that VFS itself does, it uses the failable
vircopy variant and callers use a wrapper that talk to VM if necessary
to get the copy to work.
. kernel: add CPF_TRY flag to safecopies
. kernel: only request writable ranges to VM for the
target buffer when copying fails
. do copying in VFS TRY-first
. some fixes in VM to build SANITYCHECK mode
. add regression test for the cases where
- a FS system call needs memory mapped in a process that the
FS itself must map.
- such a range covers more than one file-mapped region.
. add 'try' mode to vircopy, physcopy
. add flags field to copy kernel call messages
. if CP_FLAG_TRY is set, do not transparently try
to fix memory ranges
. for use by VFS when accessing user buffers to avoid
deadlock
. remove some obsolete backwards compatability assignments
. VFS: let thread scheduling work for VM requests too
Allows VFS to make calls to VM while suspending and resuming
the currently running thread. Does currently not work for the
main thread.
. VM: add fix memory range call for use by VFS
Change-Id: I295794269cea51a3163519a9cfe5901301d90b32
The constants ANY, NONE, and SELF are now a function of the way the
endpoint number is split between a generation number and a process
slot number, rather than the other way around. This allows for the
use of bit masking and shifting instead of the previous (and more
expensive) multiplication and division.
Change-Id: Id890eea74435444128c75eb0c89816b948f43c0b
This patch adds pthread compatibility by using libmthread.
To use this with a program using pthreads, you have to replace
#include <pthread>
with
#define _MTHREADIFY_PTHREADS
#include <minix/mthreads>
This also changes the initialization function to be a constructor, which
is implicitly called before the call to main. This allows for
conformance with pthreads, while not paying a high price by checking on
each mthread_* call whether the library has been initialized or not.
As mthread_init is now a constructor, it also has been set as static, and
relevent calls removed from programs using it.
Change-Id: I2aa375db557958d2bee9a70d285aabb990c88f00
- Fix for possible unset uid/gid in toproto
- Fix for default mtree style
- Update libelf
- Importing libexecinfo
- Resynchronize GCC, mpc, gmp, mpfr
- build.sh: Replace params with show-params.
This has been done as the make target has been renamed in the same
way, while a new target named params has been added. This new
target generates a file containing all the parameters, instead of
printing it on the console.
- Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
get getservbyport() out of the inner loop
Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
. use netbsd sigframe, sigcontext struct
. netbsd sigframe *contains* sigcontext; use that directly
in kernel sigsend
. drop two fields from minix x86 stackframe.h (process context)
that were unused, retadr and st
use in-sigframe sigcontext
Change-Id: Ib59d699596dc3a78163dee59f19730482fdddf11
. use <sys/ioccom.h> to make ioctls
. use netbsd <sys/ioctl.h>, include minix ioctls
. convert to varargs ioctl() like netbsd
Change-Id: Id5165780df48172b28bf0003603516d30d7c1abb
- Defining CLOCKS_PER_SEC = 100, instead of 60.
This define is here for legacy reasons, use sysconf(_SC_CLK_TCK) to
retrieve the actual number of clock tick per second of the system in
new code.
- Moving stime prototype to minix/sysutil.h
Change-Id: I76a73cd53ac2361845f2917f62af4125adfc615d
Also removing lseek64, pread64, pwrite64.
Those functions have lost their "raison d'être", when off_t switched to
64bits.
Change-Id: I5aea35f01d6d10e3d6578a70323da7be5eca315a