How to use iofunc_ocb_calloc??

Hello!

Writing a resource manager, I need to allocate my own OCB.
For that purpose I wrote my own iofunc_ocb_calloc & iofunc_ocb_free.

What must I do for that functions to be called?
Should I write my own iofunc_open instead of iofunc_open_default, or is
there another way?

Thanks

Vincent

You need to overwrite the default function for the attribute

Check out http://qdn.qnx.com/support/docs/neutrino_qrp/prog/resmgr.html#OCBS
at the bottom of the file.
You should have the same in your online doc (via helpviewer)


“Vincent” <vincent.catros_NO_SPAM_@bigfoot.com> wrote in message
news:9gnstt$3la$2@inn.qnx.com

Hello!

Writing a resource manager, I need to allocate my own OCB.
For that purpose I wrote my own iofunc_ocb_calloc & iofunc_ocb_free.

What must I do for that functions to be called?
Should I write my own iofunc_open instead of iofunc_open_default, or is
there another way?

Thanks

Vincent
\

In article <9gnstt$3la$2@inn.qnx.com>,
Vincent <vincent.catros_NO_SPAM_@bigfoot.com> wrote:

Hello!

Writing a resource manager, I need to allocate my own OCB.
For that purpose I wrote my own iofunc_ocb_calloc & iofunc_ocb_free.

What must I do for that functions to be called?
Should I write my own iofunc_open instead of iofunc_open_default, or is
there another way?

You should set the mount field in the attribute structure for the device to
point to your own mount structure. The funcs field in the mount
structure has ocb_calloc and ocb_free function pointers that
need to be set to the addresses of your allocate and free functions
respectively.

See the section on mount structures in the “Writing a Resource
Manager” chapter of the programmer’s guide.

Thanks

Vincent

\

Steve Furr email: furr@qnx.com
QNX Software Systems, Ltd.