summaryrefslogtreecommitdiff
path: root/kern
AgeCommit message (Collapse)Author
2013-12-11Cleanup of the memcpy(), memmove(), memcmp() and memset() callsMarin Ramesa
Addresses were cast to (void *). Pointers uncasted. * device/ds_routines.c (ds_read_done) (memset) (start_sent): Cast to (void *) instead to (char *). Argument is an address. (ds_read_done) (memset) (end_data): Likewise. * i386/i386/pcb.c (thread_getstatus) (memcpy) (pm): Don't cast. Argument is a pointer. (thread_getstatus) (memcpy) (iopb): Likewise. * i386/i386at/immc.c (immc_cnputc) (memmove): Cast first argument to (void *). Argument is an address. (immc_cnputc) (memmove): Cast second argument to (void *). Argument is an address. (immc_cnputc) (memset): Cast first argument to (void *). Argument is an address. * i386/i386at/model_dep.c (i386at_init) (memcpy) (phystokv): Cast to (void *) instead to (char *). Argument is an address. * i386/intel/pmap.c (pmap_init) (memset) (addr): Likewise. * ipc/mach_debug.c (mach_port_space_info) (memset) (table_addr + size_used): Likewise. (mach_port_space_info) (memset) (tree_addr + size_used): Likewise. * kern/host.c (host_processor_sets) (memcpy) (newaddr): Likewise. (host_processor_sets) (memcpy) (addr): Likewise. * kern/xpr.c (xprbootstrap) (memset) (addr): Likewise. * vm/vm_debug.c (mach_vm_object_pages) (memset) (addr + size_used): Likewise.
2013-12-09kern/startup.c: use boolean valuesMarin Ramesa
* kern/startup.c (reboot_on_panic): Use boolean values.
2013-12-09kern/act.h: remove unnecessary includeMarin Ramesa
File kern/act.h includes itself. Remove this include. * kern/act.h: Don't include kern/act.h.
2013-12-09Cleanup of the prototypesMarin Ramesa
* device/cirbuf.h (nqdb): Remove prototype without definition. * device/conf.h (dev_set_indirect): Likewise. * kern/boot_script.h (boot_script_read_file): Likewise. * kern/eventcount.h (evc_notify_abort): Remove duplicate prototype. * kern/thread.h (thread_set_own_priority): Likewise. * kern/thread_swap.h (thread_swapout): Remove prototype without definition. * kern/timer.h (softclock): Remove duplicate prototype. * vm/pmap.h (pmap_resident_count, pmap_access, pmap_phys_address, pmap_phys_to_frame): Remove prototypes without function definition. * vm/vm_page.h (vm_set_page_size): Likewise.
2013-12-09kern/syscall_sw.c: use boolean instead of an intMarin Ramesa
* kern/syscall_sw.c (kern_invalid_debug): Use boolean instead of an int.
2013-12-09kern/refcount.h: remove unnecessary includeMarin Ramesa
File kern/refcount.h includes itself. Remove this include. * kern/refcount.h: Don't include kern/refcount.h.
2013-12-09kern/rbtree.h: remove unnecessary includeMarin Ramesa
File kern/rbtree.h includes itself. Remove this include. * kern/rbtree.h: Don't include kern/rbtree.h.
2013-12-09kern/priority.c: update commentMarin Ramesa
This is priority.c. Not clock_prim.c. * kern/priority.c: Update comment.
2013-12-09kern/pc_sample.c: remove unused variablesMarin Ramesa
* kern/pc_sample.c (pc_sampling_enabled, pc_sampling_lock): Remove unused variables.
2013-12-09kern/lock_mon.c: remove dead assignmentsMarin Ramesa
* kern/lock_mon.c (scurval, ssum, sli): Remove variables. (scurval, ssum, sli): Remove dead assignments.
2013-12-09kern/lock_mon.c: use spl_t instead of an intMarin Ramesa
Variable curr_ipl is in other files declared as spl_t. * kern/lock_mon.c (curr_ipl): Use spl_t instead of an int.
2013-12-09kern/act.h: remove prototype without definitionMarin Ramesa
* kern/act.h (act_create_kernel): Remove prototype without definition.
2013-12-09Add commentSamuel Thibault
2013-12-08kern/machine.c: remove __volatile__Marin Ramesa
Shutdown can be optimised. Remove __volatile__. * kern/machine.c [__GNUC__] (processor_doshutdown): Remove volatile function qualifier.
2013-12-08Always make Assert trigger debuggerSamuel Thibault
* kern/debug.c (Assert): Always call Debugger, even if db_breakpoints_insert is not set.
2013-12-08Add comments after endifsMarin Ramesa
* device/cons.c [MACH_KMSG]: Likewise. [CONSBUFSIZE > 0]: Likewise. * i386/i386/trap.c [MACH_KDB]: Likewise. [MACH_PV_PAGETABLES]: Likewise. * i386/i386at/kd.c [ENABLE_IMMEDIATE_CONSOLE]: Likewise. * ipc/ipc_kmsg_queue.h [_IPC_KMSG_QUEUE_H_]: Likewise. * kern/act.c [ACTWATCH]: Likewise. * kern/refcount.h [MACHINE_REFCOUNT]: Likewise. * kern/task.c [FAST_TAS]: Likewise.
2013-12-05kern/mach_clock.c: remove forward declarationMarin Ramesa
* Makefrag.am: Include kern/priority.h. * kern/mach_clock.c (thread_quantum_update): Remove forward declaration. Include kern/priority.h. * kern/priority.h: New file. Add copyright. [_KERN_PRIORITY_H_]: Add ifndef. (thread_quantum_update): Add prototype.
2013-12-05kern/time_stamp.c: remove multimax codeMarin Ramesa
* kern/time_stamp.c [multimax]: Remove code.
2013-12-05kern: remove forward declarationMarin Ramesa
* kern/xpr.c (db_printf): Remove forward declaration. [MACH_KDB] Include ddb/db_output.h.
2013-12-05kern/thread.c: remove forward declarationMarin Ramesa
* i386/i386/pcb.h (pcb_module_init): Add prototype. * kern/thread.c (pcb_module_init): Remove forward declaration.
2013-12-05kern/task.c: remove forward declarationsMarin Ramesa
* ipc/ipc_mqueue.h: Include ipc/ipc_kmsg_queue.h. * kern/ipc_kobject.h: Move includes into ifndef. * kern/syscall_emulation.h: Include kern/task.h. (eml_init, eml_task_reference, eml_task_deallocate): Add prototypes. * kern/task.c: Include kern/syscall_emulation.h. (eml_init, eml_task_reference, eml_task_deallocate): Remove forward declarations
2013-12-05kern/syscall_sw.c: remove forward declarationsMarin Ramesa
* kern/eventcount.h (evc_wait_clear): Add prototype. * kern/ipc_mig.h: Include device/device_types.h. (syscall_vm_map, syscall_vm_allocate, syscall_vm_deallocate, syscall_task_create, syscall_task_terminate, syscall_task_suspend, syscall_task_set_special_port, syscall_mach_port_allocate, syscall_mach_port_deallocate, syscall_mach_port_insert_right, syscall_mach_port_allocate_name, syscall_thread_depress_abort, syscall_device_write_request, syscall_device_writev_request): Add prototypes. * kern/syscall_sw.c (syscall_vm_map, syscall_vm_allocate, syscall_vm_deallocate, syscall_task_create, syscall_task_terminate, syscall_task_suspend, syscall_task_set_special_port, syscall_mach_port_allocate, syscall_mach_port_deallocate, syscall_mach_port_insert_right, syscall_mach_port_allocate_name, syscall_thread_depress_abort, evc_wait, evc_wait_clear, syscall_device_write_request, syscall_device_writev_request): Remove forward declarations. Include kern/ipc_mig.h. Include kern/eventcount.h.
2013-12-05kern/syscall_subr.c: remove forward declarationMarin Ramesa
* kern/syscall_subr.c (thread_depress_priority): Remove forward declaration. * kern/syscall_subr.h (thread_depress_priority): Add prototype.
2013-12-05kern/startup.c: remove forward declarationsMarin Ramesa
* Makefrag.am: Include kern/bootstrap.h. Include vm/vm_init.h. Include device/device_init.h. * device/device_init.h: New file. Add copyright. [_DEVICE_DEVICE_INIT_H_]: Add ifndef. (device_service_create): Add prototype. * i386/i386/mp_desc.h (start_other_cpus): Add prototype. * kern/bootstrap.h: New file. Add copyright. [_KERN_BOOTSTRAP_H_]: Add ifndef. (bootstrap_create): Add prototype. * kern/sched_prim.h (idle_thread, sched_thread): Add prototypes. * kern/startup.c: Include kern/bootstrap.h. Include kern/startup.h. Include vm/vm_init.h. Include vm/vm_pageout.h. Include device/device_init.h. (vm_mem_init, vm_mem_bootstrap, init_timeout, machine_init, idle_thread, vm_pageout, reaper_thread, swapin_thread, sched_thread, bootstrap_create, device_service_create, cpu_launch_first_thread, start_kernel_threads, start_other_cpus, action_thread): Remove forward declarations. [NCPUS > 1] Include machine/mp_desc.h and kern/machine.h. * kern/startup.h: Include kern/thread.h. (cpu_launch_first_thread, start_kernel_threads): Add prototypes. * vm/vm_init.h: New file. Add copyright. [_VM_VM_INIT_H_]: Add ifndef. (vm_mem_init, vm_mem_bootstrap): Add prototypes. * vm/vm_pageout.h (vm_pageout): Add prototype.
2013-12-05kern/sched_prim.c: remove forward declarationsMarin Ramesa
* kern/sched_prim.c (set_pri, do_thread_scan, choose_pset_thread, checkrq, thread_check): Remove forward declarations. * kern/sched_prim.h (set_pri, do_thread_scan, choose_pset_thread, checkrq, thread_check): Add prototypes.
2013-12-05kern/processor.c: remove forward declarationsMarin Ramesa
* kern/processor.c (quantum_set, pset_init, processor_init): Remove forward declarations. * kern/processor.h (quantum_set, pset_init, processor_init): Add prototypes.
2013-12-05kern/ipc_mig.c: remove forward declarationsMarin Ramesa
* device/ds_routines.h (ds_device_write_trap, ds_device_writev_trap): Add prototypes. * kern/ipc_mig.c (ds_device_write_trap, ds_device_writev_trap): Remove forward declarations.
2013-12-05kern/debug.c: remove forward declarationMarin Ramesa
* kern/debug.c (cnputc): Remove forward declaration. Include device/cons.h.
2013-12-05kern/bootstrap.c: remove forward declarationsMarin Ramesa
* i386/i386/pcb.h: Include mach/thread_status.h. Include machine/thread.h. * kern/bootstrap.c: Include machine/pcb.h. (user_stack_low, set_user_regs): Remove forward declarations.
2013-12-05ipc/mach_msg.c: remove forward declarationsMarin Ramesa
* ipc/mach_msg.c: Include kern/exception.h. (exception_raise_continue, exception_raise_continue_fast): Remove forward declarations. * kern/exception.h: Include ipc/ipc_types.h. Include ipc/ipc_kmsg.h.
2013-12-05i386/i386at: remove forward declarationsMarin Ramesa
* Makefrag.am: Include kern/startup.h. * i386/i386at/model_dep.c: Include kern/startup.h. Include i386at/model_dep.h. (setup_main, halt_all_cpus, halt_cpu, inittodr): Remove forward declarations. * i386/i386at/model_dep.h (halt_all_cpus, halt_cpu, inittodr): Add prototypes. * kern/startup.h: New file. Add copyright. [_KERN_STARTUP_H_]: Add ifndef. (setup_main): Add prototype.
2013-12-05i386/i386at/conf.c: remove forward declarationsMarin Ramesa
* i386/Makefrag.am: Include i386/i386at/model_dep.h and i386/i386at/mem.h. * i386/i386at/com.h (comgetstat, comsetstat): Declare as extern. (comopen, comclose, comread, comwrite, comportdeath): Add prototypes. * i386/i386at/conf.c: Include kern/mach_clock.h and i386at/model_dep.h. (timeopen, timeclose, timemmap): Remove forward declarations. (kdopen, kdclose, kdread, kdwrite, kdgetstat, kdsetstat, kdportdeath, kdmmap): Likewise. (comopen, comclose, comread, comwrite, comportdeath, comgetstat, comsetstat): Likewise. (lpropen, lprclose, lprread, lprwrite, lprportdeath, lprgetstat, lprsetstat): Likewise. (kbdopen, kbdclose, kbdread, kbdgetstat, kbdsetstat): Likewise. (mouseopen, mouseclose, mouseread, mousegetstat): Likewise. (memmmap): Likewise. (kmsgopen, kmsgclose, kmsgread, kmsggetstat): Likewise. (hypcnopen, hypcnclose, hypcnread, hypcnwrite, hypcnportdeath, hypcngetstat, hypcnsetstat): Likewise. Include i386at/kd.h. Include i386at/com.h. Include i386at/lpr.h. Include i386at/kd_event.h. Include i386at/kd_mouse.h. Include i386at/mem.h. Include device/kmsg.h. Include xen/console.h. * i386/i386at/kd.h: Include device/io_req.h. (kdopen, kdclose, kdread, kdwrite, kdgetstat, kdsetstat, kdportdeath, kdmmap): Add prototypes. * i386/i386at/kd_event.h (kbdopen, kbdclose, kbdread, kbdgetstat, kbdsetstat): Likewise. * i386/i386at/kd_mouse.h (mouseopen, mouseclose, mouseread, mousegetstat): Likewise. * i386/i386at/lpr.h (lpropen, lprclose, lprread, lprwrite, lprportdeath): Likewise. (lprgetstat, lprsetstat): Declare as extern. * i386/i386at/mem.h: New file. Add copyright. [_MEM_H_]: Add ifndef. (memmmap): Add prototype. * i386/i386at/model_dep.c: Include i386/i386at/model_dep.h. (timemmap): Fix argument list. * i386/i386at/model_dep.h: New file. Add copyright. [_MODEL_DEP_H_]: Add ifndef. (timemmap): Add prototype. * kern/mach_clock.h (timeopen, timeclose): Add prototypes. * xen/console.h (hypcnopen, hypcnclose, hypcnread, hypcnwrite, hypcnportdeath, hypcngetstat, hypcnsetstat): Add prototypes.
2013-12-05kern/exception.c: remove forward declarationsMarin Ramesa
* i386/i386/trap.h (thread_kdb_return): Add prototype. * kern/exception.c (thread_kdb_return, db_printf): Remove forward declarations. Include machine/trap.h. Include ddb/db_output.h.
2013-12-05kern: new header file exception.hMarin Ramesa
* Makefrag.am: Include kern/exception.h. * i386/i386/trap.c: Include kern/exception.h. (exception, thread_exception_return): Remove forward declarations. * kern/exception.c: Include kern/exception.h. (exception, exception_try_task, exception_no_server, exception_raise, exception_parse_reply, exception_raise_continue, exception_raise_continue_slow, exception_raise_continue_fast): Remove forward declarations. * kern/exception.h: New file. Add copyright. [_KERN_EXCEPTION_H_]: Add ifndef. (exception, exception_try_task, exception_no_server, exception_raise, exception_parse_reply, exception_raise_continue, exception_raise_continue_slow, exception_raise_continue_fast): Add prototypes.
2013-11-24Drop spurious volatile qualifierSamuel Thibault
* kern/processor.h (processor_doshutdown): Drop spurious volatile qualifier.
2013-11-24kern: move forward declarations into a header fileMarin Ramesa
* kern/machine.c (processor_doaction, processor_doshutdown): Remove forward declarations. * kern/processor.h (processor_doaction, processor_doshutdown): Add prototypes.
2013-11-24kern: move forward declaration into a header fileMarin Ramesa
* kern/eventcount.c [NCPUS] (simpler_thread_setrun): Remove forward declaration. * kern/eventcount.h [NCPUS] (simpler_thread_setrun): Add prototype.
2013-11-24kern: move forward declaration into a header fileMarin Ramesa
* kern/timer.c (timer_init): Remove forward declaration. * kern/timer.h (timer_init): Add prototype.
2013-11-24kern: move forward declaration into a header fileMarin Ramesa
* kern/mach_clock.c (softclock): Remove forward declaration. * kern/timer.h (softclock): Add prototype.
2013-11-24kern: move forward declarations into a header fileMarin Ramesa
* kern/thread.c [MACH_DEBUG] (stack_init, stack_finalize): Remove forward declarations. * kern/thread.h [MACH_DEBUG] (stack_init, stack_finalize): Add prototypes.
2013-11-24Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault
2013-11-24Remove leftover register qualifiersMarin Ramesa
* ddb/db_break.c: Remove register qualifiers. * i386/i386/pcb.c: Likewise. * i386/i386at/com.c: Likewise. * i386/i386at/lpr.c: Likewise. * i386/intel/pmap.c: Likewise. * kern/machine.c: Likewise. * kern/queue.h: Likewise. * kern/sched_prim.c: Likewise. * kern/sched_prim.h: Likewise. * kern/timer.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_resident.h: Likewise.
2013-11-24New RPC for thread destructionRichard Braun
A new call, thread_terminate_release, is added to support self destruction in threading libraries. * include/mach/gnumach.defs (thread_terminate_release): New simpleroutine declaration. * kern/thread.c: Include vm/vm_user.h and ipc/mach_port.h. (thread_terminate_release): New function. * kern/thread.h (thread_terminate_release): New prototype.
2013-11-20kern/xpr.c: quiet warning about uninitialized variableMarin Ramesa
* kern/xpr.c (s): Initialize.
2013-11-20kern/startup.c: fix implicit declaration of functionMarin Ramesa
* kern/startup.c [MACH_KDB]: Include device/cons.h.
2013-11-19kern/slab.c: initialize info_sizeMarin Ramesa
info_size is initialized to a random value. Quiet the warning by initializing to zero. * kern/slab.c (info_size): Initialize to zero.
2013-11-19kern/slab.c: initialize optimal_embedMarin Ramesa
optimal_embed is initialized to a random value. Quiet the warning by initializing to zero. * kern/slab.c (optimal_embed): Initialize to zero.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/xpr.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/timer.h: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/timer.c: Remove register qualifiers.