MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions          syncinstructionmemory(3C)



NAME
     syncinstructionmemory - make modified instructions execut-
     able

SYNOPSIS
     void syncinstructionmemory(caddrt addr, int len);


DESCRIPTION
     The  syncinstructionmemory()  function  performs  whatever
     steps  are  required to make instructions modified by a pro-
     gram executable.


     Some processor architectures, including some  SPARC  proces-
     sors,  have  separate  and  independent instruction and data
     caches which are not kept consistent by hardware.  For exam-
     ple,  if  the instruction cache contains an instruction from
     some address and the program then stores a  new  instruction
     at  that address, the new instruction may not be immediately
     visible to the instruction fetch  mechanism.  Software  must
     explicitly  invalidate the instruction cache entries for new
     or changed mappings of pages that might  contain  executable
     instructions.   The  syncinstructionmemory() function per-
     forms this function, and/or any other  functions  needed  to
     make  modified  instructions between addr and addr]len visi-
     ble. A program should call  syncinstructionmemory()  after
     modifying instructions and before executing them.


     On processors  with  unified  caches  (one  cache  for  both
     instructions  and data) and pipelines which are flushed by a
     branch instruction, such as the x86 architecture, the  func-
     tion may do nothing and just return.


     The changes are immediately visible to  the  thread  calling
     syncinstructionmemory() when the call returns, even if the
     thread should migrate to another processor during  or  after
     the call. The changes become visible to other threads in the
     same manner that stores do; that is, they eventually  become
     visible, but the latency is implementation-dependent.


     The  result  of  executing   syncinstructionmemory()   are
     unpredictable  if  addr through addr]len-1 are not valid for
     the address space of the program making the call.

RETURN VALUES
     No values are returned.





SunOS 5.11          Last change: 12 Feb 1997                    1






Standard C Library Functions          syncinstructionmemory(3C)



ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     MT-Level                     MT-Safe                     
    


SEE ALSO
     attributes(5)








































SunOS 5.11          Last change: 12 Feb 1997                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™