Skip navigation.
Home
The QNX Community Portal

View topic - Problem with too big data buffer in DEVCTL

Problem with too big data buffer in DEVCTL

Read-only archive of qnx.ddk (Writing device drivers for scanners, video card, optical mouse, etc) at inn.qnx.com

Problem with too big data buffer in DEVCTL

Postby juro » Mon Oct 01, 2007 1:13 pm

Hello,
it is possible to send data buffer with size about 1MB with using DEVCTL?
Or how to send such mount of data between resmgr and client?
Thanks
Juraj
juro
New Member
 
Posts: 3
Joined: Tue Sep 18, 2007 11:35 am

RE: Problem with too big data buffer in DEVCTL

Postby async » Wed Oct 03, 2007 2:06 pm

MsgSend() is used to transfer the data, and the maximum size for one-part message-pass is 2^32 - 1 (SSIZE_MAX). If you want to avoid copying the data in the buffer, you can use MsgRead () / MsgWrite () to read data from the client's address.
async
New Member
 
Posts: 3
Joined: Sun Sep 16, 2007 12:03 pm

Re: Problem with too big data buffer in DEVCTL

Postby David Gibbs » Tue Oct 09, 2007 9:03 pm

juro <juraj.frank@naex-dot-sk.no-spam.invalid> wrote:
Hello,
it is possible to send data buffer with size about 1MB with using
DEVCTL?

Yes, the API will happily transfer any size of buffer up to the
maximum that can be sent.

Or how to send such mount of data between resmgr and client?

MsgSend() (the underlying kernel call) uses signed 32-bit integers
for message lengths. This suggests the maximum transfer would be
2G -- for a devctl() it would be 2G-sizeof(devctl header).

-David
--
David Gibbs
QNX Training Services
dagibbs@qnx.com
David Gibbs
 

Re: Problem with too big data buffer in DEVCTL

Postby David Gibbs » Tue Oct 09, 2007 9:04 pm

async <asreti@gmail-dot-com.no-spam.invalid> wrote:
MsgSend() is used to transfer the data, and the maximum size for
one-part message-pass is 2^32 - 1 (SSIZE_MAX). If you want to avoid
copying the data in the buffer, you can use MsgRead () / MsgWrite ()
to read data from the client's address.

MsgSend() takes signed ints for the lengths. This suggests 2^31, rather
than 2^32.

-David
--
David Gibbs
QNX Training Services
dagibbs@qnx.com
David Gibbs
 


Return to qnx.ddk

Who is online

Users browsing this forum: No registered users and 2 guests