RxRegisterThreadResource

Registers a thread created in the kernel by the marshalled code.

Library:LibC
Classification:Novell
Service:Marshalling

Syntax

  #include <ringx.h>
  
  int RxRegisterThreadResource (
     void         *thread,
     RxCleanup_t   function);
  

Parameters

thread

(IN) Specifies the thread to register as a marshalled resource.

function

(IN) Specifies the function to clean up the resource if the protected address space faults.

Return Values

If successful, returns 0. Otherwise returns -1 and sets errno.

Remarks

A thread, whose state is modified as a result of the real, lower function being called, should be registered during the marshalling code's execution so that its state can be cleaned up later if the address space faults.

For example, if a thread is changed to a unbound wait circumstance as a result of a real call, a cleanup function is required to withdraw it from this state. Otherwise, if the address space faults, the thread state would cause a hang.

The cleanup function must use the following syntax:

  typedef void (*RxCleanup_t)( void *addr );
  

See Also