Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

altering read() system call behavior

Highlighted
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