Describes how data is transferred between threads.
The client-server message protocol supports the passing of a 32-bit request code and four 32-bit parameters from client to server and returning a 32-bit result from the server to the client. The parameters may be interpreted as plain integers or pointers; pointer types may be untyped ( TAny* ) or descriptor types ( TDesC8* and TDesC16* ) that the server can use to access the client’s address space. The request code, parameters, and the parameter types are packaged into a TIpcArgs object. The parameter types are stored in the kernel side message object so that the kernel can check that subsequent operations requested by the server using the message are:
correct; for example, checking that the source and target descriptors are either both 8-bit or both 16-bit descriptors
permitted by the client; for example, checking that when the server tries to write to a client descriptor, that the client descriptor is TDes -derived (modifiable), rather than TDesC -derived (non-modifiable)
It is important to note that a server may not run until some arbitrary time after a client issues a request. Any descriptor containing data to be passed to the server must be guaranteed to exist until the request completes. For this reason, any such descriptor must not live on the program stack. Typically, such a descriptor would be a component of an object which is allocated on the heap.
The following diagram illustrates the general idea. In this case, there are three parameters, one of which is an integer, and the other two being pointers to descriptors.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.