The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/kernel/system/do_memset.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* The kernel call implemented in this file:
    2  *   m_type:    SYS_MEMSET
    3  *
    4  * The parameters for this kernel call are:
    5  *    m2_p1:    MEM_PTR         (virtual address)       
    6  *    m2_l1:    MEM_COUNT       (returns physical address)      
    7  *    m2_l2:    MEM_PATTERN     (size of datastructure)         
    8  */
    9 
   10 #include "../system.h"
   11 
   12 #if USE_MEMSET
   13 
   14 /*===========================================================================*
   15  *                              do_memset                                    *
   16  *===========================================================================*/
   17 PUBLIC int do_memset(m_ptr)
   18 register message *m_ptr;
   19 {
   20 /* Handle sys_memset(). This writes a pattern into the specified memory. */
   21   unsigned long p;
   22   unsigned char c = m_ptr->MEM_PATTERN;
   23   p = c | (c << 8) | (c << 16) | (c << 24);
   24   phys_memset((phys_bytes) m_ptr->MEM_PTR, p, (phys_bytes) m_ptr->MEM_COUNT);
   25   return(OK);
   26 }
   27 
   28 #endif /* USE_MEMSET */
   29 

Cache object: ce820b7ae91484f9a271fe2ba9b36ec8


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.