When a server is a resource manager and a simple server...

What I mean is that I have a server which is yet a multi-threaded
resource manager which provide different services. One of this services
answer to IO_MSG messages.

I would like this service be accessible at /dev/name/global/Server.
Normally, this is done by calling name_attach(…).
But, as I have a pool of thread listenning to the names I registered,
I’d like to use them for this one and not having to create another
thread for this MsgReceive(), beside the existing dispatch_block(), and
a ‘switch() case:’ beside the existing dispatch_handler().

How can I do ?

Can I call resmgr_attach( … , … , “/dev/name/global/Server”, …)
??

Could the clients do a name_open() to a name attached like that ?

Thanks,
Alain.

Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

What I mean is that I have a server which is yet a multi-threaded
resource manager which provide different services. One of this services
answer to IO_MSG messages.

I would like this service be accessible at /dev/name/global/Server.
Normally, this is done by calling name_attach(…).
But, as I have a pool of thread listenning to the names I registered,
I’d like to use them for this one and not having to create another
thread for this MsgReceive(), beside the existing dispatch_block(), and
a ‘switch() case:’ beside the existing dispatch_handler().

How can I do ?

Can I call resmgr_attach( … , … , “/dev/name/global/Server”, …)
??

The answer is yes, but you have to call:

resmgr_attach(…, …, “/dev/name/global/Server”, _FTYPE_NAME, …)

-xtang

Could the clients do a name_open() to a name attached like that ?

Thanks,
Alain.

Xiaodan Tang a écrit :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
What I mean is that I have a server which is yet a multi-threaded
resource manager which provide different services. One of this services
answer to IO_MSG messages.

I would like this service be accessible at /dev/name/global/Server.
Normally, this is done by calling name_attach(…).
But, as I have a pool of thread listenning to the names I registered,
I’d like to use them for this one and not having to create another
thread for this MsgReceive(), beside the existing dispatch_block(), and
a ‘switch() case:’ beside the existing dispatch_handler().

How can I do ?

Can I call resmgr_attach( … , … , “/dev/name/global/Server”, …)
??

The answer is yes, but you have to call:

resmgr_attach(…, …, “/dev/name/global/Server”, _FTYPE_NAME, …)

-xtang

Could the clients do a name_open() to a name attached like that ?

Thanks,
Alain.

I don’t know where is the subtlety but it seems that MsgSend() works but
MsgSendv() returns ‘bad file descriptor’. Is it normal ?

Thanks,
Alain.