Operating System - HP-UX
1748108 Members
5059 Online
108758 Solutions
New Discussion

altering read() system call behavior

 
heymanj
Occasional Contributor

altering read() system call behavior

Hi.

 

I've been tasked with porting existing Linux functionality to our HP-UX client.  A previous question, passthru devices, was answered quickly so I thought I'd ask another.

 

I've been pouring over the web and HP-UX documentation, but have been unable to determine if what the Linux client is doing is possible on HP-UX.  Scenario:

 

Multiple scsi commands can be issued to read from the SCSI attached device, and I need to guarantee that the read order of the packets returned is sequential, regardless of order returned.

 

On Linux, there is an ioctl() call

 

ioctl(fd, SG_SET_FORCE_PACK_ID, &one)

 

that according to /usr/include/scsi/sg.h file does:

 

"When SG_SET_FORCE_PACK_ID set to 1, pack_id is input to read() which tries to fetch a packet with a matching

 pack_id, waits, or returns EAGAIN.  If pack_id is -1 then read oldest waiting.  When ...FORCE_PACK_ID set to 0 then

 pack_id ignored by read() and oldest readable fetched."

 

Is there something similar within HP-UX?

 

jerry