Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     CPASS(K)                  UNIX System V                  CPASS(K)



     Name
          cpass, passc - passes character between user space and the
          kernel

     Syntax
          int
          cpass()

          int
          passc(c)
          int c;

     Description
          The cpass routine returns the next character in a user write
          request.  cpass calls fubyte(K), but provides a more usable
          interface than fubyte in that cpass automatically updates
          u.u_count, u.u_offset, and u.u_base, and returns errors in
          u.u_error.  If your data may contain a -1, use copyin(K)
          instead of cpass because a -1 in the data causes cpass (or
          fubyte) to return an error.

          The passc routine passes a character to a user read request.
          passc calls subyte(K), updates u.u_count, u.u_offset, and
          u.u_base, and returns errors in u.u_error.  If your data may
          contain a -1, use copyout(K) instead of passc because a -1
          in the data causes passc (or subyte) to return an error.

          Neither of these routines can be called from a driver's
          xxinit or interrupt routines.

     Parameters
          The character c is passed to the read request by passc .

     Return Value
          The cpass routine returns a character.  The -1 value may be
          returned if no characters remain in the output request in
          u.u_count or if an error occurred when transferring the data
          from user space.  If an error occurred, then EFAULT is set
          in u.u_error.

          The passc routine returns 0 normally and -1 when the user
          read request has been satisfied.

     See Also
          fubyte(K), subyte(K)

                                                      (printed 7/6/89)



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