Are STREAMS device drivers mmap'able ?

Are STREAMS device drivers mmap'able ?

Post by William JAL » Wed, 24 Jul 1996 04:00:00



Hi,

I'm currently working on a regular SVR4.0 (i386) UNIX device driver that
manages memory shared between 2 PCs through a PCI to VME bridge.
This driver is a regular (non-STREAMS) SVR4 driver, but since I intend
to use it to implement interprocessor communications, I want to adapt it
so that it will fit the STREAMS programming model. The ultimate goal is
to develop a DLPI compliant device driver on which I'll be able to push
all the necessary modules of the TCP/IP protocol stack.

My driver currently supports the mmap system call, which allows user-level
processes to access the shared memory. So, my question is the following:
Will I be able to keep the xxxmmap entry point if I convert my driver
to its STREAMS equivalent ?

Thanks in advance for any informations/pointers about this topic.

 
 
 

Are STREAMS device drivers mmap'able ?

Post by Steve Ra » Thu, 25 Jul 1996 04:00:00




>Hi,

>I'm currently working on a regular SVR4.0 (i386) UNIX device driver that
>manages memory shared between 2 PCs through a PCI to VME bridge.
>This driver is a regular (non-STREAMS) SVR4 driver, but since I intend
>to use it to implement interprocessor communications, I want to adapt it
>so that it will fit the STREAMS programming model. The ultimate goal is
>to develop a DLPI compliant device driver on which I'll be able to push
>all the necessary modules of the TCP/IP protocol stack.

>My driver currently supports the mmap system call, which allows user-level
>processes to access the shared memory. So, my question is the following:
>Will I be able to keep the xxxmmap entry point if I convert my driver
>to its STREAMS equivalent ?

>Thanks in advance for any informations/pointers about this topic.

The general answer to your question is "no, STREAMS drivers are
not mmap-able."  To allow mmap would mean that you would be
bypassing the entire stream (the stream head and the modules)
when writing into the mapped extent.

Depending on how your applications access the mapped extent,
you could design your STREAMS driver to work with a non-STREAMS
driver that still exported the mmap interface, though.

Steve Rago