trc_hkemptyset, trc_hkfillset, trc_hkaddset, trc_hkdelset, or trc_hkisset Subroutine

Purpose

Manipulates a trace hook set of the trc_hookset_t type.

Library

libtrace.a

Syntax

#include <sys/libtrace.h>

void trc_hkemptyset(hookset)
trc_hookset_t hookset;

void trc_hkfillset(hookset)
trc_hookset_t hookset;

int trc_hkaddset(hookset, hook)
trc_hookset_t hookset;
short hook;

int trc_hkdelset(hookset, hook)
trc_hookset_t hookset;
short hook;

int trc_hkisset (hookset, hook)
trc_hookset_t hookset;
short hook

Description

These subroutines manipulate a trace hook set used by the trc_find subroutine before AIX® 6.1. This hook set can be used to search for several trace hooks simultaneously.

Beginning with AIX 6.1, which supports 16-bit hook IDs, the trc_hkemptyset, trc_hkfillset, trc_hkaddset, trc_hkdelset, and trc_hkisset subroutines can only operate on 16-bit hook IDs in the form of 0xhhh0 where h is a hexadecimal digit. Hook IDs in the form of 0xhhh0 are equivalent to 12-bit hook IDs in the form of 0xhhh before AIX 6.1 . To work with the entire expanded hook ID range beginning with AIX 6.1, use the trc_hookset64_t type and its manipulation subroutines (the trc_hkemptyset64, trc_hkfillset64, trc_hkaddset64, trc_hkdelset64, and trc_hkisset64 subroutines).

Parameters

Item Description
hookset References the hook set to be operated on.
hook Specifies a hook value in the range 0x000 - 0xfff.

Return Values

The trc_hkaddset, trc_hkdelset, and trc_hkisset subroutines return EINVAL if the hook is out of range (that is, greater than 0xfff).

The trc_hkaddset subroutine returns 0 if the hook wasn't in the set, and -1 if it was already present.

The trc_hkdelset subroutine returns 0 if the hook was in the set, and -1 if it wasn't present.

The trc_hkisset subroutine returns 0 if the hook isn't present, and -1 if it is present.