DevHelp AllocReqPacket

This service returns a pointer to an empty request packet.

C
 USHORT APIENTRY DevHelp_AllocReqPacket( USHORT WaitFlag,                                       PBYTE FAR *ReqPktAddr ); 

Assembler
 MOV  DH,wait_flag               ; Wait for available request packet ; 0 = if to wait ; 1 = if not to wait MOV  DL,DevHlp_AllocReqPacket

CALL [Device_Help] 

C

 * WaitFlag (USHORT: Wait for available request packet.
 * WAIT_NOT_ALLOWED 0
 * WAIT_IS_ALLOWED  1


 * ReqPktAddr (PBYTE FAR *): Virtual address of allocated request packet to be returned.

Assembler
 

C
Success Indicator: 0

Possible errors: None.

Assembler
 'C' Clear if a request packet was allocated. ES:BX = The virtual address of the allocated request packet.

'C' Set if a request packet was not allocated. This function does not return any specific error code. 

Remarks
Some device drivers, notably the physical disk device driver, need to have additional request packets to service task-time requests. Request packets that were allocated by AllocReqPacket can be placed in the request packet linked list. Request packets allocated in this manner should be returned to the kernel as soon as possible through the DevHlp_FreeReqPacket. The system has a limited number of request packets, so it is important that a physical device driver not allocate request packets and hold them for future use.

The state of the interrupt flag is not preserved across calls to AllocReqPacket.

C

 * 1) include "dhcalls.h"

USHORT APIENTRY DevHelp_AllocReqPacket( USHORT WaitFlag,                                       PBYTE FAR *ReqPktAddr ); 