diff -r 51a74ef9ed63 -r ae94777fff8f Symbian3/SDK/Source/GUID-E651C7A7-D6EB-533E-A97A-360D089DE7A5.dita --- a/Symbian3/SDK/Source/GUID-E651C7A7-D6EB-533E-A97A-360D089DE7A5.dita Wed Mar 31 11:11:55 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-E651C7A7-D6EB-533E-A97A-360D089DE7A5.dita Fri Jun 11 12:39:03 2010 +0100 @@ -1,56 +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.

+ + + + + +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:

+
    +
  • 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)

  • +
+

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