|
AquilaOS documentation
How it works, and its code
|
The functions that the compiler calls on its own, to copy a structure or zero a big array: memcpy, memset, memmove and memcmp. More...
#include <stddef.h>Go to the source code of this file.
Functions | |
| void * | memcpy (void *dst, const void *src, size_t n) |
| Copies n bytes; dst and src must not overlap. | |
| void * | memset (void *dst, int c, size_t n) |
| Sets n bytes to c. | |
| void * | memmove (void *dst, const void *src, size_t n) |
| Copies n bytes; dst and src may overlap. | |
| int | memcmp (const void *a, const void *b, size_t n) |
| Compares n bytes. | |
The functions that the compiler calls on its own, to copy a structure or zero a big array: memcpy, memset, memmove and memcmp.
The kernel's own are static inline (core/string.h), so these have no header of their own.
Definition in file libc.c.
| int memcmp | ( | const void * | a, |
| const void * | b, | ||
| size_t | n ) |
Compares n bytes.
Definition at line 51 of file libc.c.
References memcmp().
Referenced by acpi_rsdp(), acpi_s5(), dentry_update(), ext2_dentry_find(), memcmp(), memcmp(), refresh(), and x86_acpi_table().
| void * memcpy | ( | void * | dst, |
| const void * | src, | ||
| size_t | n ) |
Copies n bytes; dst and src must not overlap.
Definition at line 11 of file libc.c.
References memcpy().
Referenced by aarch64_fpsimd_fork(), aarch64_fpsimd_restore(), arch_proc_fork(), arp_input(), arp_lookup(), arp_request(), arp_update(), blkcache_read(), blkcache_write(), cpio_dirent_name(), creat_path(), deliver(), dma_read(), dma_write(), e1000_transmit(), ether_output(), exec_strings_get(), ext2_dentry_create(), ext2_readdir(), ext2_vmknod(), fdt_boot(), flush_block(), fork_proc_copy(), icmp_unreachable(), ifconf(), ifreq_request(), inet_sockaddr_put(), iobuf_copy(), kdev_bread(), kdev_bwrite(), lookup_name(), loopback_transmit(), memcpy(), memcpy(), minix_dentry_create(), minix_dentry_find(), minix_readdir(), minix_vmknod(), pmap_page_copy(), pmap_page_read(), pmap_page_write(), procfs_buddyinfo(), procfs_cmdline(), procfs_devices(), procfs_filesystems(), procfs_interrupts(), procfs_kvmem(), procfs_meminfo(), procfs_mounts(), procfs_proc_maps(), procfs_proc_status(), procfs_proc_vmstats(), procfs_rdcmdline(), procfs_uptime(), procfs_version(), pseudofs_dirent_name(), random_get(), rd_read(), rd_write(), reply(), rx_poll(), sigcode_in(), socket_inet_getsockopt(), socket_inet_setsockopt(), socket_tcp_accept(), socket_unix_accept(), strdup(), sys_sethostname(), sys_uname(), tcp_iss(), tmpfs_trunc(), tmpfs_write(), vfs_vnode_path(), vm_space_fork(), vt_reply(), walk(), x86_fpu_init(), x86_fpu_load_from(), x86_fpu_save_to(), x86_fpu_switch_out(), x86_fpu_trap(), x86_gdt_setup(), and x86_smp_init().
| void * memmove | ( | void * | dst, |
| const void * | src, | ||
| size_t | n ) |
Copies n bytes; dst and src may overlap.
Definition at line 34 of file libc.c.
References memmove().
Referenced by arp_resolve(), csi(), earlycon_fb_scroll(), earlycon_vga_scroll(), memmove(), memmove(), put_glyph(), scroll_down(), scroll_up(), and vfs_vnode_path().
| void * memset | ( | void * | dst, |
| int | c, | ||
| size_t | n ) |
Sets n bytes to c.
Definition at line 23 of file libc.c.
References memset().
Referenced by aarch64_fpsimd_restore(), arp_request(), ata_detect_drive(), binfmt_elf_load_segments(), binfmt_load(), bitmap_clear_range(), bitmap_set_range(), deliver(), deliver(), do_fstatat(), earlycon_fb_scroll(), enqueue(), enqueue_head(), ext2_block_alloc(), ext2_dentry_create(), ext2_inode_block_read(), ext2_trunc(), ext2_vmknod(), hashmap_new(), ifaddr_put(), ifconf(), ifreq_request(), kmalloc(), kvmem_selftest_run(), memset(), memset(), minix_dentry_create(), minix_inode_block_read(), minix_trunc(), minix_vmknod(), mm_boot_alloc(), mm_page_alloc(), page_get(), pf_zero(), pmap_create(), pts_new(), queue_new(), random_get(), randomdev_read(), socket_name(), switch_to_higher_half(), sys_accept(), sys_bind(), sys_connect(), sys_fstat(), sys_getrandom(), sys_getsockopt(), sys_readdir(), sys_recv(), sys_send(), sys_uname(), table_alloc(), table_alloc(), table_alloc(), tables_build(), tcp_reply_rst(), tmpfs_trunc(), vmem_init(), vnode_pages_update(), vt_fb_probe(), x86_fpu_setup(), x86_gdt_setup(), and x86_smp_init().