AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
libc.c File Reference

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.

Detailed Description

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.

Function Documentation

◆ memcmp()

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().

◆ memcpy()

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().

◆ memmove()

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().

◆ memset()