resmgr ioctl to itself

Hi,

I has created resmgr with flag _RESMGR_FLAG_SELF

threads in the same process (as that resmgr) successsfully
opens that resmgr created file.
But all devctl requests are returns with:
“Inappropriate I/O control operation”
error

Note:
another processes do those ioctls successfuly.

What do I do wrong ? Please!

vasa

vasa <vv40in@rambler.ru> wrote:

Hi,

I has created resmgr with flag _RESMGR_FLAG_SELF

threads in the same process (as that resmgr) successsfully
opens that resmgr created file.
But all devctl requests are returns with:
“Inappropriate I/O control operation”
error

Note:
another processes do those ioctls successfuly.

What do I do wrong ? Please!

A little more detail would be required. Note that the use of _RESMGR_FLAG_SELF
can be potentially dangerous and introduce some potential deadlocks into your
system if you are not careful.

Thomas






\


Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Core OS Technology Group
(613)-591-0931 http://www.qnx.com/

vasa a écrit :

Hi,

I has created resmgr with flag _RESMGR_FLAG_SELF

threads in the same process (as that resmgr) successsfully
opens that resmgr created file.
But all devctl requests are returns with:
“Inappropriate I/O control operation”
error

Note:
another processes do those ioctls successfuly.

What do I do wrong ? Please!

vasa

Not absolutely sure, but did you try other io operations?
The problem is that a resmgr locks its attribute structure when someone,
including itself, access to it. So, it could be the reason why you
receive this message, just to prevent a dead lock.
I remember that I had such a problem but I find the message strange even
if it’s normal that your io operation doesn’t work. It depends on when
you get it.
Anyway, have a look at iofunc_attr_unlock().

Regards,
Alain.