[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Base Operating System and Extensions Technical Reference, Volume 2

trchook or utrchook Subroutine

Purpose

Records a trace event.

Library

Runtime Services Library (librts.a)

Syntax

#include <sys/trchkid.h>
void trchook(HkWord, d1, d2, d3, d4, d5)
unsigned int HkWord, d1, d2, d3, d4, d5;
void utrchook(HkWord, d1, d2, d3, d4, d5)
unsigned int HkWord, d1, d2, d3, d4, d5;

Description

The trchook subroutine records a trace event if a trace session is active. Input parameters include a hook word (HkWord) and from 0 to 5 words of data.

The utrchook subroutine uses a special FAST-SVC path to improve performance and is intended for programs running at user (application) level.

Parameters

d1, d2, d3, d4, d5 Up to 5 words of data from the calling program.
HkWord An unsigned integer consisting of a hook ID (HkID), a hook type (Hk_Type), and two bytes of data from the calling program (HkData).
HkID A hook ID is a 12-bit value. For user programs, the hook ID may be a value from 0x010 to 0x0FF. Hook identifiers are defined in the /usr/include/sys/trchkid.h file.
Hk_Type A 4-bit value that identifies the amount of trace data to be recorded:
Value Records
1 Hook word
9 Hook word and a time stamp
2 Hook word and one data word
A Hook word, one data word, and a time stamp
6 Hook word and up to five data words
E Hook word, up to five data words, and a time stamp.
HkData Two bytes of data from the calling program.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The trcgen subroutine, trcgent subroutine, trcoff subroutine, trcon subroutine, trcstart subroutine, trcstop subroutine.

The trace daemon.

The trcgenk kernel service, trcgenkt kernel service.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]