ZCOM C I/F Library Routines

ZCOMLOG (3X)

 

ZCOMLOG (3X)

NAME

zcomlog – Add a message to the ZCOM log file

SYNOPSIS

#include

<zcom/zcomsys.h>

#include

<zcom/zcomcall.h> /* if compiled with ANSI C (recommended) */

void zcomlog (error, msgno, narg [, desc, arg])

uint32 error; int32 msgno; uint8 narg; uint32 desc; uint32 arg;

DESCRIPTION

Routine zcomlog creates a log record and passes it to the ZCOM message

 

log system, where the logged messages will be retrieved and processed by

 

the ZMLOG program. Before calling this routine, zcomlname(3X) should

 

be called to set up the logging program name for all subsequent log

 

records.

 

 

The log record created consists of the program name as specified in the

 

preceding zcomlname call, the message number msgno and the

 

associated arguments arg. This routine has a variable number of

 

arguments: the call argument pair “desc, arg” repeats for the number of

 

times specified by narg.

 

 

The libraries libzcom_c.a and libpthread.a must be linked into the calling

 

program by giving the options “-lzcom_c -lpthread” to cc(1) or ld(1).

Threads

This routine may be called from a multi-threaded application using the

Considerations

POSIX (1003.1c) kernel threads API package. This routine has the

 

following characteristics when called by a multi-threaded application:

 

cancellation point

Thread cancellation can occur when a thread

 

 

calls this routine.

async-cancel unsafe The calling thread’s cancelability type must be PTHREAD_CANCEL_DEFERRED if cancellation is enabled.

Chapter 4

183