Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     DB_WRITE(K)               UNIX System V               DB_WRITE(K)



     Name
          db_write - transfers from a user address to contiguous
          memory

     Syntax
          int
          db_write(dv, va, count)
          struct devbuf *dv;
          paddr_t va;
          unsigned count;

     Description
          The db_write routine transfers data from a virtual user
          address va to physical contiguous memory pointed to by dv.
          The amount transferred is in count bytes.  The physical
          memory must have been allocated by db_alloc(K).

     Warning
          Only use this routine after the requested pages are locked
          into memory by a previous call to physio(K).  Use of
          db_write under any other circumstances results in a panic.

     Example
          For example, to transfer from a buffer to a dv:

          struct buf *bp;
          struct devbuf dv;

          db_write( &dv, paddr( bp ), bp->b_count );

     See Also
          db_alloc(K), db_read(K), paddr(K)

                                                      (printed 7/6/89)



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