2.5.28. TAPOp_ReadCommonData

Reads the data block that is common to all the clients connected to the server.

Syntax

#include “tapop.h”

extern TAPOp_Error TAPOp_ReadCommonData(unsigned8 connectId, unsigned32 *commonBlk, unsigned8 deselect);

where:

connectId

Connection ID, as returned by TAPOp_OpenConnection.

commonBlk

Four words of common data whose meaning is determinedby the client. This buffer is allocated by the caller.

deselect

If 0, the connection to this TAP controller remains selected. This excludes access to this TAP controller from other Multi-ICE server connections. Otherwise the connection is deselected, giving other connections a chance to perform operations.

Return

The function returns:

TAPOp_NoError

No error.

TAPOp_UnableToSelect

Connection could not be made.

TAPOp_NoSuchConnection

The connectId was not recognized.

TAPOp_BadParameter

Failed because commonBlk is NULL.

TAPOp_RPC_Connection_Fail

The RPC connection was lost while processing this request.

Usage

The call attempts to select the connection. If this cannot be done (for example, because another TAP controller is being accessed), the call fails with a TAPOp_UnableToSelect error.

The call returns in the memory referenced by commonBlk the four words of data allocated to TAPOp connections by the server. This data is shared between all connections, and so must be written with care.

To safely write to the common data block, use an atomic Read-Modify-Write sequence. You can make a call of TAPOp_ReadCommonData and TAPOp_WriteCommonData atomic by setting the deselect parameter of the TAPOp_ReadCommonData call to zero.

See also

This TAPOp API function provides similar or related functionality:

Copyright © 1998-2002 ARM Limited. All rights reserved.ARM DUI 0154B
Non-Confidential