phunix/kernel/system/do_memset.c
Ben Gras 4dae6c4bbc my state.
trying to get some memory optimisation (less pagetable reloading,
less tlb purging) features working smoothly.

to be documented when committing to trunk :)
2009-06-06 23:27:10 +00:00

29 lines
802 B
C

/* The kernel call implemented in this file:
* m_type: SYS_MEMSET
*
* The parameters for this kernel call are:
* m2_p1: MEM_PTR (virtual address)
* m2_l1: MEM_COUNT (returns physical address)
* m2_l2: MEM_PATTERN (size of datastructure)
*/
#include "../system.h"
#include "../vm.h"
#if USE_MEMSET
/*===========================================================================*
* do_memset *
*===========================================================================*/
PUBLIC int do_memset(m_ptr)
register message *m_ptr;
{
/* Handle sys_memset(). This writes a pattern into the specified memory. */
unsigned char c = m_ptr->MEM_PATTERN;
vm_phys_memset((phys_bytes) m_ptr->MEM_PTR, c, (phys_bytes) m_ptr->MEM_COUNT);
return(OK);
}
#endif /* USE_MEMSET */