Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
ACC Programmer's Reference Guide > Chapter 4 ZCOM C I/F Library Routines

ZQMVE (3X)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

zqmve - Move message from one ZLU to another

SYNOPSIS

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

int32 zqmve (zap, dzap)

zaddr_type *zap;
zaddr_type *dzap;

DESCRIPTION

Routine zqmve is used to transfer the first message from one ZLU queue to the end of a second ZLU queue by changing the queue pointers (without actually moving the data). If the destination queue is not specified (i.e., dzap = NULL), the message will be flushed, which means the message buffer is returned to the free data buffer pool.

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 Considerations

This routine may be called from a multi-threaded application using the 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.

async-signal unsafe

It cannot be called from a signal handler.

fork unsafe

It cannot be called by a child process after fork(2) but before exec(2).

PARAMETERS

zap

ZCOM address from which to get the message.

dzap

Destination ZCOM address (if NULL, then the message will be flushed).

RETURN VALUE

Routine zqmve returns 0 if successful. Otherwise, a non-zero error code is returned. See /opt/acc/include/zcom/zcomsys.h for the list of ZCOM error codes and their meanings.

EXAMPLE

Example 1:
#include <zcom/zcomsys.h>
#include <zcom/zcomcall.h>

int32 ierr;
zaddr_type zaddr;
zaddr_type daddr;

if (ierr = zqmve (&zaddr, &daddr)) {
/* error return code */
}
else {
/* good return code */
}

Example 2: - (how to flush)
while(zqmve(&zaddr, NULL) == NULL);

FILES

/opt/acc/include/zcom/zcomsys.h

ZCOM system general include file, containing data types, data structures, constants, error codes, masks, etc. Note that this must be the first include file before any other ZCOM include files.

/opt/acc/include/zcom/zcomcall.h

ZCOM routine function prototypes (requires ANSI C compilation).

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2000 Hewlett-Packard Development Company, L.P.