diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-E651C7A7-D6EB-533E-A97A-360D089DE7A5.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-E651C7A7-D6EB-533E-A97A-360D089DE7A5.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,56 @@ + + + + + +Inter-thread +data transferDescribes 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:

+ +

NOTE: although you can pass untyped pointers, it is not possible +to directly access memory in another thread’s address space using an arbitrary +pointer as this is inherently insecure. The ability to pass a pointer between +a client and server is therefore only of value when the client and server +are within the same process. In this case, the use of a pointer is obviously +not limited to pointing to a descriptor, but may also be used to point to +an arbitrary data structure containing information to be shared between the +client and server.

+

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.

+ + +

Inter-thread data transfer

+
+
See also

Descriptor +concepts.

+
\ No newline at end of file