Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ trcunix(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

trace_on

trace

trace

trcunix

Purpose

     Records application trace log entries.

Library

     Run-time Services Library (librts.a)

Syntax

     int trcunix (buf, cnt)
     char *buf;
     unsigned int cnt;

Description

     The  trcunix  subroutine  invokes the  application  trace
     device driver to record a  trace log entry.  trcunix is a
     C  run-time subroutine.   Device drivers  should use  the
     trsave subroutine to log trace events.

     The buf parameter points to  a buffer containing a 2-byte
     traceid followed by up to  20 bytes of user-defined trace
     data.  The high-order  5 bits of the  traceid specify the
     channel  number, and  the low-order  11 bits  specify the
     hook  ID for  the message.   User programs  may use  only
     channel  number  31.   The cnt  parameter  specifies  the
     number of bytes in the buffer, including the traceid.

     If the application trace device  driver is not open, then
     trcunix opens  it before writing  the trace log  entry to
     it.

Return Value

     Upon successful completion, a value  of 0 is returned and
     a trace log  entry is written to  /dev/appltrace.  If the
     trcunix subroutine fails, an  error message is written to
     the standard error output, and a value of -1 is returned.

File

     /dev/appltrace

Related Information

     In this book:  "trace_on," and "trace."

     The  discussion of  trsave in  Device Driver  Development
     Guide.

     The trace command in AIX Operating System Commands Refer-
     ence.

     The discussion of trace  in AIX Operating System Program-
     ming Tools and Interfaces.

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