DevHelp PullRequest

From EDM2
Jump to: navigation, search

This service pulls the next waiting request packet from the selected request packet linked list. If there is no packet in the list, then an indicator is set on return.

Syntax

C

USHORT APIENTRY DevHelp_PullRequest( NPBYTE Queue, PBYTE *ReqPktAddr );

Assembler

MOV   SI,OFFSET DS:queue       ; Location of queue head (should match
                                       PushRequest value)
MOV   DL,DevHlp_PullRequest

CALL  [Device_Help]

Parameters

C

Queue (NPBYTE) 
Location of queue head (should match PushRequest value).
ReqPktAddr (PBYTE *) 
Pointer to the request packet returned.

Assembler

MOV   SI,OFFSET DS:queue       ; Location of queue head (should match PushRequest value)

Return Code

C

Success Indicator: 0

Possible errors: None.

Assembler

   'C' Clear if successful.
       ES:BX = Pointer to the request packet.

   'C' Set if there is no request packet in the list.

Remarks

A physical device driver uses PushRequest and PullRequest to maintain a work queue for each of its devices and units. The physical device driver must provide the storage for the DWORD work queue head that defines the start of the request packet linked list. The work queue head must be initialized to 0. PullRequest can also be used to remove request packets that were allocated by AllocReqPacket from the request packet queue.

Example Code

C

#include  "dhcalls.h"

USHORT APIENTRY DevHelp_PullRequest( NPBYTE Queue,
                                     PBYTE *ReqPktAddr );

Related Functions