summaryrefslogtreecommitdiff
path: root/i386/i386at
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2006-11-05 18:54:52 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:50 +0200
commitffc607f8a4c1c6f1c63a7b61b54f185ada87a9a5 (patch)
tree35fb5835c103b647de4de4a53ba94e4b1b5cb563 /i386/i386at
parent7e8b31e61e4bd9207bde37662e757a5988c556df (diff)
2006-11-05 Barry deFreese <bddebian@comcast.net>
memcpy/memset cleanup. * include/string.h: New file. * include/mach/mig_support.h: Include `string.h'. [MACH_KERNEL] (bcopy): Remove extern declaration. [MACH_KERNEL] (memcpy): Remove macro. * device/cirbuf.c: Include `string.h'. (q_to_b, b_to_q): Replace bcopy() with memcpy() and bzero() with memset(), clean memcpy() and memset() invocation. * device/cons.c (cnputc): Likewise. * device/dev_pager.c (device_pager_data_request_done): Likewise. * device/ds_routines.c (device_write_get, ds_read_done): Likewise. * device/kmsg.c: Likewise. * device/net_io.c (net_filter, net_set_filter, net_getstat): Likewise. * i386/i386/fpu.c (fpu_set_state, fpu_get_state) fp_load) (fp_state_alloc): Likewise. * i386/i386/iopb.c (io_tss_init, i386_io_port_list): Likewise. * i386/i386/mp_desc.c (mp_desc_init): Likewise. * i386/i386/pcb.c (pcb_init, thread_setstatus) (thread_getstatus): Likewise. * i386/i386/phys.c (pmap_zero_page, pmap_copy_page, copy_to_phys) (copy_from_phys): Likewise. * i386/i386/trap.c (v86_assist): Likewise. * i386/i386/user_ldt.c (i386_set_ldt, i386_get_ldt): Likewise. * i386/i386at/immc.c (immc_cnputc): Likewise. * i386/i386at/kd_event.c (X_kdb_enter_init, X_kdb_exit_init): Likewise. * i386/intel/pmap.c (pmap_init, pmap_page_table_page_alloc) (pmap_create): Likewise. * ipc/ipc_entry.c (ipc_entry_grow_table): Likewise. * ipc/ipc_kmsg.c (ipc_kmsg_get_from_kernel) (ipc_kmsg_put_to_kernel): Likewise. * ipc/ipc_object.c (ipc_object_alloc, ipc_object_alloc_name): Likewise. * ipc/ipc_port.c (ipc_port_dngrow): Likewise. * ipc/ipc_space.c: Likewise. * ipc/mach_debug.c (mach_port_space_info) (mach_port_space_info): Likewise. * kern/act.c (act_create): Likewise. * kern/boot_script.c: Likewise. * kern/bootstrap.c: Likewise. * kern/eventcount.c (evc_init): Likewise. * kern/host.c (host_info, host_processor_sets): Likewise. * kern/lock.c (lock_init): Likewise. * kern/lock_mon.c (lock_info_clear): Likewise. * kern/mach_clock.c (mapable_time_init): Likewise. * kern/pc_sample.c (get_sampled_pcs): Likewise. * kern/processor.c (processor_set_things): Likewise. * kern/syscall_emulation.c (task_set_emulation_vector_internal) (task_get_emulation_vector, xxx_task_get_emulation_vector): Likewise. * kern/task.c (task_threads): Likewise. * kern/xpr.c (xprbootstrap): Likewise. * kern/zalloc.c (host_zone_info): Likewise. * vm/vm_debug.c (mach_vm_object_pages): Likewise. * vm/vm_kern.c (projected_buffer_allocate, copyinmap) (copyoutmap): Likewise. * vm/vm_object.c (vm_object_bootstrap): Likewise. * vm/vm_resident.c (vm_page_grab_contiguous_pages): Likewise.
Diffstat (limited to 'i386/i386at')
-rw-r--r--i386/i386at/immc.c6
-rw-r--r--i386/i386at/kd_event.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/i386/i386at/immc.c b/i386/i386at/immc.c
index a59209e..e457162 100644
--- a/i386/i386at/immc.c
+++ b/i386/i386at/immc.c
@@ -23,6 +23,8 @@
#ifdef ENABLE_IMMEDIATE_CONSOLE
+#include <string.h>
+
/* This is a special "feature" (read: kludge)
intended for use only for kernel debugging.
It enables an extremely simple console output mechanism
@@ -47,8 +49,8 @@ immc_cnputc(unsigned char c)
}
else if (c == '\n')
{
- bcopy(0xb8000+80*2, 0xb8000, 80*2*24);
- bzero(0xb8000+80*2*24, 80*2);
+ memcpy(0xb8000, 0xb8000+80*2, 80*2*24);
+ memset(0xb8000+80*2*24, 0, 80*2);
ofs = 0;
}
else
diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c
index 961d1b2..dbd1cbd 100644
--- a/i386/i386at/kd_event.c
+++ b/i386/i386at/kd_event.c
@@ -56,6 +56,8 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <mach/boolean.h>
#include <sys/types.h>
+#include <string.h>
+
#ifdef MACH_KERNEL
#include <device/errno.h>
#include <device/io_req.h>
@@ -532,7 +534,7 @@ X_kdb_enter_init(data, count)
if (count * sizeof X_kdb_enter_str[0] > sizeof X_kdb_enter_str)
return D_INVALID_OPERATION;
- bcopy(data, X_kdb_enter_str, count * sizeof X_kdb_enter_str[0]);
+ memcpy(X_kdb_enter_str, data, count * sizeof X_kdb_enter_str[0]);
X_kdb_enter_len = count;
return D_SUCCESS;
}
@@ -545,7 +547,7 @@ X_kdb_exit_init(data, count)
if (count * sizeof X_kdb_exit_str[0] > sizeof X_kdb_exit_str)
return D_INVALID_OPERATION;
- bcopy(data, X_kdb_exit_str, count * sizeof X_kdb_exit_str[0]);
+ memcpy(X_kdb_exit_str, data, count * sizeof X_kdb_exit_str[0]);
X_kdb_exit_len = count;
return D_SUCCESS;
}