Age | Commit message (Collapse) | Author |
|
* kern/task.c (task_create): Gracefully handle resource shortage.
|
|
Import the macro definitions from the x15 kernel project, and replace
all similar definitions littered all over the place with it.
Importing this file will make importing code from the x15 kernel
easier. We are already using the red-black tree implementation and
the slab allocator from it, and we will import even more code in the
near future.
* kern/list.h: Do not define `structof', include `macros.h' instead.
* kern/rbtree.h: Likewise.
* kern/slab.c: Do not define `ARRAY_SIZE', include `macros.h' instead.
* i386/grub/misc.h: Likewise.
* i386/i386/xen.h: Do not define `barrier', include `macros.h' instead.
* kern/macro_help.h: Delete file. Replaced by `macros.h'.
* kern/macros.h: New file.
* Makefrag.am (libkernel_a_SOURCES): Add new file, remove old file.
* device/dev_master.h: Adopt accordingly.
* device/io_req.h: Likewise.
* device/net_io.h: Likewise.
* i386/intel/read_fault.c: Likewise.
* ipc/ipc_kmsg.h: Likewise.
* ipc/ipc_mqueue.h: Likewise.
* ipc/ipc_object.h: Likewise.
* ipc/ipc_port.h: Likewise.
* ipc/ipc_space.h: Likewise.
* ipc/ipc_splay.c: Likewise.
* ipc/ipc_splay.h: Likewise.
* kern/assert.h: Likewise.
* kern/ast.h: Likewise.
* kern/pc_sample.h: Likewise.
* kern/refcount.h: Likewise.
* kern/sched.h: Likewise.
* kern/sched_prim.c: Likewise.
* kern/timer.c: Likewise.
* kern/timer.h: Likewise.
* vm/vm_fault.c: Likewise.
* vm/vm_map.h: Likewise.
* vm/vm_object.h: Likewise.
* vm/vm_page.h: Likewise.
|
|
* i386/i386/phys.c (pmap_zero_page, pmap_copy_page, copy_to_phys,
copy_from_phys): Avoid compiler warning about `map' being used
uninitialized.
|
|
* i386/i386/pcb.c (stack_attach): Use `USER_REGS'.
(stack_handoff): Likewise.
|
|
* linux/src/include/asm-i386/semaphore.h (down): Pass semaphore address to
down_failed through ecx.
(down_interruptible): Likewise to down_failed_interruptible.
(up): Likewise to up_wakeup.
|
|
* kern/rbtree.h: Fix comment.
|
|
* i386/i386at/rtc.c (rtcget, rtcput): Make functions take an rtc_st
structure which it casts to char * itself.
|
|
* device/ds_routines.c (device_open, ds_open_done, device_close,
device_write, device_write_inband, ds_write_done, device_read,
device_read_inband, ds_read_done, device_set_status, mach_device_get_status,
device_set_filter, device_map, ds_no_senders): Convert from K&R declaration,
fix type of `device' into void*.
|
|
* device/blkio.c (block_io_mmap): Fix prototype of dummy function.
* device/blkio.h (block_io_mmap): Likewise.
|
|
* Makefile.am (AM_CFLAGS): Add -fgnu89-inline option.
|
|
Newer gccs consider the former "impossible"
* linux/src/include/asm-i386/bitops.h (find_first_zero_bit): Replace
clobbers with earlyclobbers.
* linux/src/include/asm-i386/semaphore.h (down, down_interruptible, up):
Likewise.
|
|
* linux/src/include/linux/compiler-gcc5.h: New file.
|
|
The number of priorities has been changed from 32 to 50 in
6a234201081156e6d5742e7eeabb68418b518fad.
* kern/syscall_subr.c (thread_depress_priority): Avoid hardcoding the
lowest priority.
|
|
Disable the stack allocation counters by default. Casual checking
revealed that the hits-to-miss ratio is excellent.
* kern/thread.c (stack_alloc_{hits,misses,max}): Move variables...
* kern/counters.c: ... here, and add the usual counter prefix.
* kern/counters.h: New declarations.
|
|
* ipc/ipc_kmsg.c (ipc_kmsg_copyout_header): Avoid accessing
dest->ip_protected_payload without the lock.
* ipc/mach_msg.c (ipc/mach_msg.c): Avoid accessing
dest_port->ip_protected_payload without the lock.
|
|
* i386/i386/db_trace.c (db_i386_stack_trace): Prepend 0x to hexadecimal offset.
|
|
* version.m4 (AC_PACKAGE_VERSION): Set to 1.5.
* NEWS: Finalize for 1.5.
|
|
* Makefile.am (clib-routines.o): Mention the Debian libc6-dev:i386 package.
|
|
xen cli/sti doesn't use IF
* i386/i386/spl.S [MACH_XEN]: Disable IF check.
|
|
* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Show odd number of ports.
|
|
* i386/i386at/kd_event.c: Call printf_once instead of recoding it.
* i386/i386at/kd_mouse.c: Likewise.
|
|
* i386/i386at/kd_event.c (kbd_enqueue): Print "queue full" warning only
once.
* i386/i386at/kd_mouse.c (mouse_enqueue): Likewise.
|
|
* kern/task.c (task_create): Inherit the name of the parent task.
|
|
Previously, `copyinmsg' was the same function as `copyin'. The former
is for messages, and the size of messages is a multiple of four.
Likewise for `copyoutmsg'.
Provide a specialized version of both functions. This shaves off a
couple of instructions and improves our IPC performance.
* i386/i386/locore.S (copyinmsg): New function.
(copyoutmsg): New function.
|
|
* i386/i386/locore.S (copyout): Do not needlessly copy length to %eax
first.
|
|
Use the ternary operator to implement `assert' like it is done in the
glibc. The glibcs changelog does not mention the rationale behind
this change, but doing the same seems to improve our IPC performance.
* kern/assert.h (assert): Define macro using the ternary operator.
|
|
If the loop above completes at least one iteration, `i' will be larger
than zero.
* linux/dev/glue/block.c (rdwr_full): Add assertion to appease the
compiler.
|
|
Reduce the size of `struct thread' by twelve bytes making it fit into
exactly five cache lines (on 32-bit platforms).
* kern/thread.h (struct thread): Group the state and all flags in a
bitfield.
(TH_EV_WAKE_ACTIVE, TH_EV_STATE): Provide macros that generate keys
for synchronization primitives like `thread_wakeup'.
* kern/thread.c (thread_halt, thread_dowait, thread_suspend): Use the
new keys instead of addresses of fields for the synchronisation.
* kern/ipc_sched.c (thread_handoff): Likewise.
* kern/sched_prim.c (thread_invoke, thread_dispatch): Likewise.
|
|
Currently, `thread_collect_scan' does nothing because `pcb_collect' is
a nop. Its body is exempt from compilation by means of the
preprocessor.
This is unfortunate as it increases the risk of bitrot, and we still
need to pay the price of rate-limiting thread_collect_scan.
* kern/thread.c (thread_collect_scan): Drop #if 0 around the body.
* vm/vm_pageout.c (vm_pageout_scan): Do not call
`consider_thread_collect' and document why.
|
|
* vm/vm_resident.c: Fix typo.
|
|
* ipc/mach_port.c (mach_port_destroy): Simplify expression. Reword warning.
(mach_port_deallocate): Likewise.
(mach_port_mod_refs): Also warn about errors when using this function.
|
|
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
* i386/i386/trap.c (kernel_trap): When current_thread is null, assume that
we are in kernel land.
|
|
If a sequence number larger than the sample control sequence number is
supplied, `nsamples' becomes negative. Handle this gracefully.
* kern/pc_sample.c (get_sampled_pcs): Handle bogus sequence number.
|
|
* ipc/ipc_kmsg.h (ikm_mark_bogus): New macro.
(ipc_kmsg_rmqueue_first_macro): Use `ikm_mark_bogus'.
* ipc/ipc_kmsg.c (ipc_kmsg_rmqueue): Likewise.
|
|
The previous limit was 256 bytes. That seems a little crummy by
todays standards, and we are frequently sending bigger packets
(e.g. every RPC containing a string_t on Hurd).
Use the page size for IKM_SAVED_KMSG_SIZE to make sure the page is
pinned to a single processor.
* ipc/ipc_kmsg.h (IKM_SAVED_KMSG_SIZE): Define to `PAGE_SIZE'.
|
|
* i386/i386/spl.S (spl7): Just set curr_ipl and cli.
(splx) [MACH_KDB || MACH_TTD]: When curr_ipl is 7, make sure that IF is cleared.
(splx): When staying at ipl7, do not enable interrupts.
(spl) [MACH_KDB || MACH_TTD]: When curr_ipl is 7, make sure that IF is cleared.
(spl): When new ipl is 7, branch to spl7.
* i386/i386/locore.S (TIME_TRAP_UENTRY, TIME_TRAP_SENTRY): Save flags, and
restore them instead of blindly using sti.
|
|
* Makefrag.am (EXTRA_DIST): Add kern/task_notify.cli.
|
|
This makes it possible to inject imports.
* include/mach/gnumach.defs: Make it possible to inject imports.
* include/mach/mach.defs: Likewise.
* include/mach/mach_host.defs: Likewise.
|
|
These notifications are sent to the port registered via
`register_new_task_notification' and provide a robust parental
relation between tasks to a userspace server.
* Makefrag.am: Add task_notify.defs.
* include/mach/gnumach.defs: Add register_new_task_notification.
* include/mach/task_notify.defs: New file.
* kern/task.c (new_task_notification): New variable.
(task_create): Send new task notifications.
(register_new_task_notification): Add server function.
* kern/task_notify.cli: New file.
|
|
Retire the compatibility RPC `old_mach_port_get_receive_status' that
works like `mach_port_get_receive_status' but returns an
`old_mach_port_status' object that lacks the `mps_seqno' field.
Do not remove the type yet, so we do not break anyones build. The RPC
stubs currently distributed with the glibc require it.
* include/mach/mach_port.defs (old_mach_port_get_receive_status): Drop RPC.
* include/mach/mach_types.defs (old_mach_port_status_t): Drop type.
* include/mach/port.h (old_mach_port_status_t): Add note to remove
this for the 1.6 release.
* ipc/mach_port.c (old_mach_port_get_receive_status): Drop function.
|
|
This was due to task_terminate not actually properly suspending threads
before disable the task port, which was thus preventing pthread_create
from being able to create a stack. Thanks Gabriele Giacone for finding
out a reproducer of this.
* kern/task.h (task_hold_locked): New declaration.
* kern/task.c (task_hold): Move the locked part of the code into...
(task_hold_locked): ... new function.
(task_terminate): Call task_hold_locked just before deactivating the
task. Call ipc_task_disable after waiting for threads to actually
suspend with task_dowait.
|
|
Make all five non-conditional counters conditional ones. Casual
checking revealed that the hits-to-miss ratio is excellent.
* kern/counters.c: Make all counters conditional.
* kern/counters.h: Likewise.
* kern/ipc_sched.c: Likewise.
* kern/sched_prim.c: Likewise.
|