Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cachectl(2) — svr3 — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpagesize(2)



CACHECTL(2-SVR3)    RISC/os Reference Manual     CACHECTL(2-SVR3)



NAME
     cachectl - mark pages cacheable or uncacheable

SYNOPSIS
     For -systype svr3 and -systype bsd43:

     #include <sys/cachectl.h>

     cachectl(addr, nbytes, op)
     char *addr;
     int nbytes, op;

DESCRIPTION
     The cachectl system call allows a process to make ranges of
     its address space cacheable or uncacheable.  Initially, a
     process's entire address space is cacheable.

     op may be one of:

     CACHEABLE  Make the indicated pages cacheable

     UNCACHEABLE
                Make the indicated pages uncacheable

     The CACHEABLE and UNCACHEABLE op's affect the address range
     indicated by addr and nbytes.  addr must be page aligned and
     nbytes must be a multiple of the page size.

     Changing a page from UNCACHEABLE state to CACHEABLE state
     will cause both the instruction and data caches to be
     flushed if necessary to avoid stale cache information.

RETURN VALUE
     cachectl returns 0 when no errors are detected.  If errors
     are detected, cachectl returns -1 with the error cause indi-
     cated in errno.

ERRORS
     [EINVAL] op parameter is not one of CACHEABLE or UNCACHE-
              ABLE.

     [EINVAL] addr is not page aligned, or nbytes is not multiple
              of pagesize.

     [EFAULT] Some or all of the address range addr to
              (addr+nbytes-1) is not accessible.

SEE ALSO
     getpagesize(2).

NOTE
     When these routines are used in a program which is compiled



                        Printed 11/19/92                   Page 1





CACHECTL(2-SVR3)    RISC/os Reference Manual     CACHECTL(2-SVR3)



     in -systype svr3, they are not resolved by libc.a.  See
     intro(3-SVR3) for more information.





















































 Page 2                 Printed 11/19/92



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026