Commit graph

399 commits

Author SHA1 Message Date
Lionel Sambuc 7d98eee859 usr.bin/make: -j fix
The job option enable the usage of pipes to communicate with sub-makes.

On MINIX, it seems that there is possibility of receiving an EAGAIN on
such reads, even when it had previously been tested for POLLIN using
poll().

This patch is a workaround, by wrapping the read operation within a
do {} while(errno == EAGAIN && ...) loop.

Change-Id: Ia184c4d600efe7218d197820df87761604120862
2014-07-28 17:05:15 +02:00
Lionel Sambuc ac9fa699bd Fix perl build hanging on pipe
Change-Id: Ic1ff95f45c6082b9310b27783190ce8f92c2afad
2014-07-28 17:05:14 +02:00
Ben Gras 013226c417 vfs: call pipe_check before reviving select()
. select callback on close() on a pipe
	  would falsely revive a read-select on
	  the pipe
	. the extra pipe_check catches it
	. fixes the new import of the netbsd
	  make in -j N mode (make jobs that communicate
	  with pipes)
2014-07-28 17:05:14 +02:00
Ben Gras 58b8ff5ffa VFS: add F_FLUSH_FS_CACHE fcntl
This fcntl requests all cached blocks associated with the minor device
number associated with the regular file are invalidated. If the file
is a block special, invalidate the blocks associated with that minor
device instead.

This is to be used for a test that tests unmapped file-mapped memory
ranges whose blocks are not in the cache and therefore must be fetched
from a FS.

Change-Id: Ide914b2e88413aa90bd731ae587ca06fa5f13ebc
2014-07-28 17:05:14 +02:00
Ben Gras 565f13088f make vfs & filesystems use failable copying
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
2014-07-28 17:05:14 +02:00
Ben Gras 273c51a7d1 64-bit CDEV_POS
Change-Id: Iecdadf3dd92cc14525961976f51a9eb16a996d62
2014-07-28 17:05:11 +02:00
Ben Gras 3f3e78ef59 64-bit REQ_TRC_START, REQ_TRC_END
Change-Id: I567804209695b5ec0d83a453d93e36cbf8900f1a
2014-07-28 17:05:11 +02:00
Ben Gras e6daf20a69 64-bit VFS_LSEEK_OFF
Change-Id: Ic0b6d65cbde1033462b909436efa92464094f1ec
2014-07-28 17:05:11 +02:00
Ben Gras ed9076ccb4 64-bit VFS_VMCALL_OFFSET
Change-Id: I29725365a199f850420cd0e4e3902cf70dffe9ad
2014-07-28 17:05:10 +02:00
Ben Gras 188a5fde1f 64-bit VFS_TRUNCATE_OFF
Change-Id: I4bd5cc57ddda2525b0bec6f044f35196a2c21f2e
2014-07-28 17:05:10 +02:00
Ben Gras 4694fcc1d5 64-bit RES_FILE_SIZE
Change-Id: Ia17b4b4722f87fb35142948b62d4a8392ded5f73
2014-07-28 17:05:10 +02:00
Ben Gras fdd85c4d08 64-bit RES_SEEK_POS
Change-Id: Id13f06417f2f600db167bec7b33bc825742cae79
2014-07-28 17:05:10 +02:00
Ben Gras 978082bb0d 64-bit REQ_SEEK_POS
Change-Id: I2e51a188b171af0f0a02349e4eccbe78e7cc2e0c
2014-07-28 17:05:10 +02:00
Lionel Sambuc d3d33afe9f Experimental pthread compatibility library
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
2014-07-28 17:05:08 +02:00
Lionel Sambuc 84d9c625bf Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- 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
2014-07-28 17:05:06 +02:00
Ben Gras a1e1ae5ade <sys/fcntl.h>, remove O_REOPEN
Change-Id: Id6493f30bb0fec7460d01f357ada9b2c2a4f5eb7
2014-03-03 20:47:06 +01:00
Ben Gras 17587738d3 align <sys/ucontext.h> <sys/uio.h> <sys/un.h>
Change-Id: I70adf01fddf931a3a6931083adaa4bbe647ea6a3
2014-03-03 20:47:03 +01:00
Lionel Sambuc 3053b27247 include/limits.h: merged
Replacing SYMLOOP_MAX, SYMLINK_MAX, by _POSIX_SYMLOOP_MAX,
_POSIX_SYMLINK_MAX respectively.

Change-Id: I020c20b0dbf6d44e777879d786a20811f23d1561
2014-03-03 20:47:03 +01:00
Lionel Sambuc b33edbfe7a Removing VFS_UTIMENS_* field macros.
Change-Id: I3be1acfbb77b6e229d784d8dbc3ceec1b26abf90
2014-03-03 20:47:00 +01:00
Lionel Sambuc 175d3e7eae Changing the message union to anonymous.
This allows us to write things like this:
  message m;
  m.m_notify.interrupts = new_value;

or
  message *mp;
  mp->m_notify.interrupts = new_value;

The shorthands macro have been adapted for the new scheme, and will be
kept as long as we have generic messages being used.

Change-Id: Icfd02b5f126892b1d5d2cebe8c8fb02b180000f7
2014-03-03 20:46:47 +01:00
Lionel Sambuc 55d9e9954b Extending time_t to 64bits.
Change-Id: Ia96b8bfba19cb8179a0237a7d2122d415c24d73f
2014-03-03 20:45:28 +01:00
Lionel Sambuc 37598dccf1 Aligning dev_t to 64bits.
Change-Id: I630f72f8530dd4aaf05c35ca23683ae12c9f8328
2014-03-02 12:28:32 +01:00
Ben Gras 7120f34ec1 drop <minix/termios.h>, use clean <sys/termios.h>
. also implement some netbsd-style tty ioctls
	. also implement SIGINFO
	. also import netbsd stty
	. rename keymap minix CMIN (for ctrl+minus on numeric keypad)
	  to CNMIN; to keep unchanged control character default CMIN in
	  new <sys/ttydefaults.h>
	. convert CS[5678] logic in rs232 driver to explicit setting of LC
	  bits

Change-Id: I9b7d2963fe9aec00fb6e7535ef565b3191fc1c1d
2014-03-02 12:28:20 +01:00
Ben Gras a06e2ab395 big <utmp.h>-inspired netbsd switch
import/switch of:
init, getty, reboot, halt, shutdown, wall, last

changes:
	. change reboot() call to netbsd prototype and args
	. allows pristine <utmp.h>
	. use clean <sys/reboot.h> instead of <minix/reboot.h>
	. implement TIOCSCTTY for use by getty so getty can get
	  controlling terminal from init's child(ren)
	. allow NULL envp for exec

Change-Id: I5ca02cb4230857140c08794bbfeba7df982c58a3
2014-03-01 09:05:02 +01:00
Lionel Sambuc c3fc9df84a Adding ipc_ prefix to ipc primitives
* Also change _orig to _intr for clarity
 * Cleaned up {IPC,KER}VEC
 * Renamed _minix_kernel_info_struct to get_minix_kerninfo
 * Merged _senda.S into _ipc.S
 * Moved into separate files get_minix_kerninfo and _do_kernel_call
 * Adapted do_kernel_call to follow same _ convention as ipc functions
 * Drop patches in libc/net/send.c and libc/include/namespace.h

Change-Id: If4ea21ecb65435170d7d87de6c826328e84c18d0
2014-03-01 09:05:01 +01:00
David van Moolenbroek 24ec0d73b5 Clean up interface to PM and VFS
- introduce new call numbers, names, and field aliases;
- initialize request messages to zero for all ABI calls;
- format callnr.h in the same way as com.h;
- redo call tables in both servers;
- remove param.h namespace pollution in the servers;
- make brk(2) go to VM directly, rather than through PM;
- remove obsolete BRK, UTIME, and WAIT calls;
- clean up path copying routine in VFS;
- move remaining system calls from libminlib to libc;
- correct some errno-related mistakes in libc routines.

Change-Id: I2d8ec5d061cd7e0b30c51ffd77aa72ebf84e2565
2014-03-01 09:05:01 +01:00
David van Moolenbroek 2c8310fce6 VFS: store m_out as part of worker thread state
There is no need to pass pointers around when there is a structure
available that already stores other similar state, such as m_in.

Change-Id: I3164c5c55c71f443688103d1f0756c086eb05974
2014-03-01 09:05:00 +01:00
David van Moolenbroek 87c599da2d PM/VFS protocol: prefix with VFS_PM_
These calls are sent to VFS, and thus should be prefixed with VFS_.
Clean up the protocol and PM's main function a bit.

Since the protocol is substantially big and different from normal VFS
requests, this protocol retains its own numbering range for now.

Change-Id: Ia62104b5c5c929ed787144816d2e4cc70bed3b0b
2014-03-01 09:05:00 +01:00
David van Moolenbroek 44d3230e40 For common calls, give servers unique call numbers
The getsysinfo(2), getrusage(2), and svrctl(2) calls used the same
call number to different services. Since we want to give each service
its own call number ranges, this is no longer tenable. This patch
introduces per-service call numbers for these calls.

Note that the remainder of the COMMON_ range is left intact, as these
the remaining requests in it are processed by SEF and thus server-
agnostic. The range should really be prefixed with SEF_ now.

Change-Id: I80d728bbeb98227359c525494c433965b40fefc3
2014-03-01 09:05:00 +01:00
David van Moolenbroek 80bd109cd3 libsys: various updates
- move system calls for use by services from libminlib into libsys;
- move srv_fork(2) and srv_kill(2) from RS and into libsys;
- replace getprocnr(2) with sef_self(3);
- rename previous getnprocnr(2) to getprocnr(2);
- clean up getepinfo(2);
- change all libsys calls that used _syscall to use _taskcall, so as
  to avoid going through errno to pass errors; this is already how
  most calls work anyway, and many of the calls previously using
  _syscall were already assumed to return the actual error;
- initialize request messages to zero, for future compatibility
  (note that this does not include PCI calls, which are in need of a
  much bigger overhaul, nor kernel calls);
- clean up more of dead DS code as a side effect.

Change-Id: I8788f54c68598fcf58e23486e270c2d749780ebb
2014-03-01 09:05:00 +01:00
David van Moolenbroek 4d4e70daaa PM: remove obsolete ALARM, PAUSE, TIMES calls
NetBSD libc implements these as wrappers around setitimer(2),
sigsuspend(2), and getrusage(2), respectively.

Change-Id: I0c5e725b3e1316bddd3a3ff7ef65d57d30afd10d
2014-03-01 09:04:59 +01:00
Ben Gras 6c8f7fc3ba netbsd dirent.h, import sys/sys *.h, mfs cleanup
. add all sys/sys headers not already present to help compiling
	. take netbsd dirent.h and struct dirent; main result is
	  introducing d_type and d_namlen that have to be set by getdents()
	  in all FS code implementing it
	. d_off is gone
	. alignment of the struct has become 8 bytes instead of 4
	. remove _MAX_BLOCK_SIZE, _MIN_BLOCK_SIZE, _STATIC_BLOCK_SIZE
	. libminlib: cleanup unused yet duplicate code
	. mfs: throw out the long-broken v1, v2 support
	. new test for dirent contents filled by getdents()

Change-Id: I1459755c7ba5e5d1c9396d3a587ce6e63ddc283e
2014-03-01 09:04:59 +01:00
David van Moolenbroek 664b726cd3 VFS: further cleanup of device code
- all TTY-related exceptions have now been merged into the regular
  code paths, allowing non-TTY drivers to expose TTY-like devices;
- as part of this, CTTY_MAJOR is now fully managed by VFS instead of
  being an ugly stepchild of the TTY driver;
- device styles have become completely obsolete, support for them has
  been removed throughout the system; same for device flags, which had
  already become useless a while ago;
- device map open/close and I/O function pointers have lost their use,
  thus finally making the VFS device code actually readable;
- the device-unrelated pm_setsid has been moved to misc.c;
- some other small cleanup-related changes.

Change-Id: If90b10d1818e98a12139da3e94a15d250c9933da
2014-03-01 09:04:58 +01:00
David van Moolenbroek e5cc85fdc4 Extend dupfrom(2) into copyfd(2)
This single function allows copying file descriptors from and to
processes, and closing a previously copied remote file descriptor.
This function replaces the five FD-related UDS backcalls. While it
limits the total number of in-flight file descriptors to OPEN_MAX,
this change greatly improves crash recovery support of UDS, since all
in-flight file descriptors will be closed instead of keeping them
open indefinitely (causing VFS to crash on system shutdown). With the
new copyfd call, UDS becomes simpler, and the concept of filps is no
longer exposed outside of VFS.

This patch also moves the checkperms(2) stub into libminlib, thus
fully abstracting away message details of VFS communication from UDS.

Change-Id: Idd32ad390a566143c8ef66955e5ae2c221cff966
2014-03-01 09:04:58 +01:00
David van Moolenbroek 50685cbec3 VFS: better dupfrom(2) deadlock detection
Change-Id: I29f00075698888c7c8ca60b47ab82fba8c606f4e
2014-03-01 09:04:58 +01:00
David van Moolenbroek b003ed0929 UDS: split off from PFS
Change-Id: I769cbd64aa6e5e85a797caf0f8bbb4c20e145263
2014-03-01 09:04:57 +01:00
David van Moolenbroek 6b3f4dc157 Input infrastructure, INPUT server, PCKBD driver
This commit separates the low-level keyboard driver from TTY, putting
it in a separate driver (PCKBD). The commit also separates management
of raw input devices from TTY, and puts it in a separate server
(INPUT). All keyboard and mouse input from hardware is sent by drivers
to the INPUT server, which either sends it to a process that has
opened a raw input device, or otherwise forwards it to TTY for
standard processing.

Design by Dirk Vogt. Prototype by Uli Kastlunger.

Additional changes made to the prototype:

- the event communication is now based on USB HID codes; all input
  drivers have to use USB codes to describe events;
- all TTY keymaps have been converted to USB format, with the effect
  that a single keymap covers all keys; there is no (static) escaped
  keymap anymore;
- further keymap tweaks now allow remapping of literally all keys;
- input device renumbering and protocol rewrite;
- INPUT server rewrite, with added support for cancel and select;
- PCKBD reimplementation, including PC/AT-to-USB translation;
- support for manipulating keyboard LEDs has been added;
- keyboard and mouse multiplexer devices have been added to INPUT,
  primarily so that an X server need only open two devices;
- a new "libinputdriver" library abstracts away protocol details from
  input drivers, and should be used by all future input drivers;
- both INPUT and PCKBD can be restarted;
- TTY is now scheduled by KERNEL, so that it won't be punished for
  running a lot; without this, simply running "yes" on the console
  kills the system;
- the KIOCBELL IOCTL has been moved to /dev/console;
- support for the SCANCODES termios setting has been removed;
- obsolete keymap compression has been removed;
- the obsolete Olivetti M24 keymap has been removed.

Change-Id: I3a672fb8c4fd566734e4b46d3994b4b7fc96d578
2014-03-01 09:04:55 +01:00
David van Moolenbroek de975579a4 Rename SYSCTL kernel call to DIAGCTL
Change-Id: I1b17373f01808d887dcbeab493838946fbef4ef6
2014-03-01 09:04:54 +01:00
Lionel Sambuc 9fab85c2de Replacing timer_t by netbsd's timer_t
* Renamed struct timer to struct minix_timer
 * Renamed timer_t to minix_timer_t
 * Ensured all the code uses the minix_timer_t typedef
 * Removed ifdef around _BSD_TIMER_T
 * Removed include/timers.h and merged it into include/minix/timers.h
 * Resolved prototype conflict by renaming kernel's (re)set_timer
   to (re)set_kernel_timer.

Change-Id: I56f0f30dfed96e1a0575d92492294cf9a06468a5
2014-03-01 09:04:54 +01:00
David van Moolenbroek dba2d1f8b4 VFS: add dupfrom(2) call
This call copies a file descriptor from a remote process into the
calling process. The call is for the VND driver only, and in the
future, ACLs will prevent any other process from using this call.

Change-Id: Ib16fdd1f1a12cb38a70d7e441dad91bc86898f6d
2014-03-01 09:04:54 +01:00
David van Moolenbroek 665198b4c2 Rewrite character driver protocol
As a side effect, remove the clone style, as the normal device style
supports device cloning now.

Change-Id: Ie82d1ef0385514a04a8faa139129a617895780b5
2014-03-01 09:04:52 +01:00
David van Moolenbroek 87337273e4 Remove support for reopening character devices
Previously, VFS would reopen a character device after a driver crash
if the associated file descriptor was opened with the O_REOPEN flag.
This patch removes support for this feature. The code was complex,
full of uncovered corner cases, and hard to test. Moreover, it did not
actually hide the crash from user applications: they would get an
error code to indicate that something went wrong, and have to decide
based on the nature of the underlying device how to continue.

- remove support for O_REOPEN, and make playwave(1) reopen its device;
- remove support for the DEV_REOPEN protocol message;
- remove all code in VFS related to reopening character devices;
- no longer change VFS filp reference count and FD bitmap upon filp
  invalidation; instead, make get_filp* fail all calls on invalidated
  FDs except when obtained with the locktype VNODE_OPCL which is used
  by close_fd only;
- remove the VFS fproc file descriptor bitmap entirely, returning to
  the situation that a FD is in use if its slot points to a filp; use
  FILP_CLOSED as single means of marking a filp as invalidated.

Change-Id: I34f6bc69a036b3a8fc667c1f80435ff3af56558f
2014-03-01 09:04:52 +01:00
David van Moolenbroek a4277506a2 VFS: rework device code
- block the calling thread on character device close;
- fully separate block and character open/close routines;
- reuse generic open/close code for the cloning case;
- zero all messages to drivers before filling them;
- use appropriate types for major/minor device numbers.

Change-Id: Ia90e6fe5688f212f835c5ee1bfca831cb249cf51
2014-03-01 09:04:52 +01:00
David van Moolenbroek f6915d3dee Make PFS backcalls regular VFS calls
- prefix them with VFS_ as they are going to VFS;
- give these calls normal call numbers;
- give them their own set of message field aliases;
- also make do_mapdriver a regular call.

Change-Id: I2140439f288b06d699a1f65438bd8306509b259e
2014-03-01 09:04:52 +01:00
David van Moolenbroek 701f2b4dd5 VFS: select(2) fixes
- check each file descriptor's open access mode (filp_mode);
- treat an error returned by a character driver as a select error;
- check all filps in each set before finishing select;
- do not copy back file descriptor sets if an error occurred;
- remove the hardcoded list of supported character major devices,
  since all drivers should now be capable of responding properly;
- add tests to test40 and fix its error count aggregation.

Change-Id: I57ef58d3afb82640fc50b59c859ee4b25f02db17
2014-03-01 09:04:51 +01:00
David van Moolenbroek 95624ae072 Block protocol: add user endpoint to IOCTL request
I/O control requests now come with the endpoint of the user process
that initiated the ioctl(2) call. It is stored in a new BDEV_USER
field, which is an alias for BDEV_FLAGS. The contents of this field
are to be used only in highly specific situations. It should be
preserved (not replaced!) by services that forward IOCTL requests,
and may be set to NONE for service-initiated IOCTL requests.

Change-Id: I68a01b9ce43eca00e61b985a9cf87f55ba683de4
2014-02-19 11:22:15 +01:00
David van Moolenbroek 113635b019 Block protocol: use own [RW]_BIT definitions
The original R_BIT and W_BIT definitions have nothing to do with the
way these bits are used. Their distinct usage is more apparent when
they have different names.

Change-Id: Ia984457f900078b2e3502ceed565fead4e5bb965
2014-02-19 11:22:15 +01:00
David van Moolenbroek 5c53b417cd VFS: update filp_pos on chardev I/O (workaround)
Previously, reading from or writing to a character device would not
update the file position on the corresponding filp object.  Performing
this update correctly is not trivial: during and after the I/O
operation, the filp object must not be locked.  Ideally, read/write
requests on a filp that is already involved in a read/write operation,
should be queued.  For now, we optimistically update the file position
at the start of the I/O; this works under the assumptions listed in
the corresponding comment.

Change-Id: I172a61781850423709924390ae3df1f2d1f94707
2014-02-18 11:25:03 +01:00
David van Moolenbroek 1e7b45c682 VFS: fix interruption of blocking pipe operations
POSIX states that when interrupted, partially successful pipe
operations should return the partial result rather than EINTR. VFS
previously wouldn't look at the partial result, and not clear it
either, which would result in a panic upon the next pipe operation.

Change-Id: Ia1eb72b4b77394051444e63a1390d49bb315eb04
2014-02-18 11:25:03 +01:00
David van Moolenbroek 723e51327f VFS: worker thread model overhaul
The main purpose of this patch is to fix handling of unpause calls
from PM while another call is ongoing. The solution to this problem
sparked a full revision of the threading model, consisting of a large
number of related changes:

- all active worker threads are now always associated with a process,
  and every process has at most one active thread working for it;
- the process lock is always held by a process's worker thread;
- a process can now have both normal work and postponed PM work
  associated to it;
- timer expiry and non-postponed PM work is done from the main thread;
- filp garbage collection is done from a thread associated with VFS;
- reboot calls from PM are now done from a thread associated with PM;
- the DS events handler is protected from starting multiple threads;
- support for a system worker thread has been removed;
- the deadlock recovery thread has been replaced by a parameter to the
  worker_start() function; the number of worker threads has
  consequently been increased by one;
- saving and restoring of global but per-thread variables is now
  centralized in worker_suspend() and worker_resume(); err_code is now
  saved and restored in all cases;
- the concept of jobs has been removed, and job_m_in now points to a
  message stored in the worker thread structure instead;
- the PM lock has been removed;
- the separate exec lock has been replaced by a lock on the VM
  process, which was already being locked for exec calls anyway;
- PM_UNPAUSE is now processed as a postponed PM request, from a thread
  associated with the target process;
- the FP_DROP_WORK flag has been removed, since it is no longer more
  than just an optimization and only applied to processes operating on
  a pipe when getting killed;
- assignment to "fp" now takes place only when obtaining new work in
  the main thread or a worker thread, when resuming execution of a
  thread, and in the special case of exiting processes during reboot;
- there are no longer special cases where the yield() call is used to
  force a thread to run.

Change-Id: I7a97b9b95c2450454a9b5318dfa0e6150d4e6858
2014-02-18 11:25:03 +01:00