2005-10-14 10:58:59 +02:00
|
|
|
/* The kernel call implemented in this file:
|
2005-07-14 17:12:12 +02:00
|
|
|
* m_type: SYS_MEMSET
|
|
|
|
*
|
2005-10-14 10:58:59 +02:00
|
|
|
* The parameters for this kernel call are:
|
2005-07-29 17:26:23 +02:00
|
|
|
* m2_p1: MEM_PTR (virtual address)
|
|
|
|
* m2_l1: MEM_COUNT (returns physical address)
|
2009-09-17 22:51:34 +02:00
|
|
|
* m2_l2: MEM_PATTERN (pattern byte to be written)
|
2005-07-14 17:12:12 +02:00
|
|
|
*/
|
|
|
|
|
2010-04-02 00:22:33 +02:00
|
|
|
#include "kernel/system.h"
|
2005-07-14 17:12:12 +02:00
|
|
|
|
|
|
|
#if USE_MEMSET
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* do_memset *
|
|
|
|
*===========================================================================*/
|
2012-03-25 20:25:53 +02:00
|
|
|
int do_memset(struct proc * caller, message * m_ptr)
|
2005-07-14 17:12:12 +02:00
|
|
|
{
|
2005-07-21 20:36:40 +02:00
|
|
|
/* Handle sys_memset(). This writes a pattern into the specified memory. */
|
2012-09-22 21:58:05 +02:00
|
|
|
vm_memset(caller, m_ptr->MEM_PROCESS, (phys_bytes) m_ptr->MEM_PTR,
|
|
|
|
m_ptr->MEM_PATTERN, (phys_bytes) m_ptr->MEM_COUNT);
|
2005-07-14 17:12:12 +02:00
|
|
|
return(OK);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* USE_MEMSET */
|
|
|
|
|