Main Page | Directories | File List | Globals

memory.c File Reference

#include <agnix/console.h>

Include dependency graph for memory.c:

Go to the source code of this file.

Functions

void * memset (void *from, int c, int n)
void * memcpy (void *to, void *from, int n)
int memcmp (void *what, void *with, int n)


Function Documentation

int memcmp void *  what,
void *  with,
int  n
 

Definition at line 43 of file memory.c.

Referenced by arp_get_local_mac(), arp_request_wake_up(), eth_header_parse(), and smbios_find_table().

00044 {
00045     char *a;
00046     char *b;
00047     int i;
00048 
00049     a = (char *)what;
00050     b = (char *)with;
00051 
00052     for (i = 0; i < n; i++) {
00053         if (a[i] != b[i])
00054             return -1;
00055     }
00056 
00057     return 0;
00058 }

void* memcpy void *  to,
void *  from,
int  n
 

Definition at line 29 of file memory.c.

Referenced by add_memory_entry(), adi_netdev_set_name(), adi_register_chrdev(), arp_get_local_mac(), arp_get_neigh_lock(), arp_header_build(), arp_neigh_clone(), arp_recv(), arp_recv_request_lock(), arp_request(), btree_insert_entry_lock(), convert_str_to_str(), do_sys_sigaction(), eth_header_build(), eth_set_broadcast_addr(), files_copy(), ip_ioctl_set_ifaddr(), parse_biosmap(), pcibus_scan_card(), send_signal_to_task(), signal_queue_lock(), signals_init(), timer_gettimeofday(), and timer_settimeofday().

00030 {
00031     int i;
00032     
00033     for (i = 0; i < n; i++)
00034     {
00035         *(char *)to = *(char *)from;
00036         from++;
00037         to++;
00038     }
00039 
00040     return from;
00041 }

void* memset void *  from,
int  c,
int  n
 

Definition at line 16 of file memory.c.

Referenced by adi_sysconsole_init(), agnix_console_arp_request(), agnix_console_main(), arp_del_entry_lock(), bin_alloc_init(), bootmem_init_bh(), btree_init(), convert_num_to_str(), cpu_init(), crypt_init(), DES_crypt(), DES_decrypt(), hash_static_init(), i8259a_chip_init(), intel_init(), irqs_init(), kbd_set_actions(), main(), queues_init(), register_btree(), register_resource(), send_signal_to_task(), signals_init(), task_fork(), and task_kernel_create().

00017 {
00018     int i;
00019     
00020     for (i = 0; i < n; i++)
00021     {
00022         *(char *)from = (char)c;
00023         from++;
00024     }
00025 
00026     return from;
00027 }

Dokumentacje wygenerowano programem Doxygen 1.4.2 dla projektu Agnix