AddPollingProcedureRTag

Adds a polling procedure to the specified resource tag.

Library:LibC
Classification:NetWare OS
Service:NetWare Platform

Syntax

  #include <netware.h>
  
  int AddPollingProcedureRTag (
     void    (*proc)( void ),
     rtag_t   rTag );
  

Parameters

proc

(IN) Points to the function that implements the polling procedure.

rTag

(IN) Specifies the resource tag.

Return Values

If successful, returns 0.

Remarks

The AddPollingProcedureRTag function is primarily used by device drivers that aren’t interrupt driven to poll for completion. Using this call is strongly discouraged; device-driver writers are encouraged to write interrupt-driven device drivers.

The proc function accepts no parameters. When it is called, interrupts are disabled, and thus must not block. When you call proc from a LibC application, you must wrapper the address of the callback using the macro NX_WRAP_INTERFACE and supply the result as proc instead of the callback function itself.

NOTE:If you call proc from a CLib application (driver), you must set and restore the owning NLM’s thread-group context in proc in the usual way (SetThreadGroupID).

See Also

RemovePollingProcedure