Creating resource manager names ...

bridged with qdn.public.qnxrtp.porting
Post Reply
Guest

Creating resource manager names ...

Post by Guest » Mon Dec 09, 2002 10:23 am

Hello newsgroup,

we are actually porting a whole bunch of QNX4 programmes to QNX6,
and lots of them act like a server (in QNX terminolgy), without
attaching a particular name.

We are considering to use automatically generated names, with a
certain pattern, consisting of a prefix and the pid, such as:

.
.
.
sprintf(res_mngr_name,"pid-%d",getpid());
attach = name_attach(NULL,res_mngr_name,0);
.
.
.


What are the limitations, if we do so? Is it possible to generate
100 or more names this way? Will this affect the speed of searching
the names?

Any hints are appreciated!

TIA,

Karsten.

--
__ __ ____ ____
| \/ | __ ) ___| Karsten.Hoffmann@mbs-software.de MBS-GmbH
| |\/| | _ \___ \ Phone : +49-2151-7294-38 Karsten Hoffmann
| | | | |_) |__) | Fax : +49-2151-7294-50 Roemerstrasse 15
|_| |_|____/____/ Mobile: +49-172-3812373 D-47809 Krefeld

Alain Bonnefoy

Re: Creating resource manager names ...

Post by Alain Bonnefoy » Wed Dec 11, 2002 6:49 am

Karsten.Hoffmann@mbs-software.de a écrit:
Hello newsgroup,

we are actually porting a whole bunch of QNX4 programmes to QNX6,
and lots of them act like a server (in QNX terminolgy), without
attaching a particular name.

We are considering to use automatically generated names, with a
certain pattern, consisting of a prefix and the pid, such as:

.
.
.
sprintf(res_mngr_name,"pid-%d",getpid());
attach = name_attach(NULL,res_mngr_name,0);
.
.
.


What are the limitations, if we do so? Is it possible to generate
100 or more names this way? Will this affect the speed of searching
the names?

Any hints are appreciated!

TIA,

Karsten.



It is said that if there is no real limitation, procmgr is not really
designed to manage huge number of pathnames (I don't know what 'huge' is
;-)).
Anyway, if you have a large number of names to declare, it's advised to
declared a directory to procmgr and then, let your program to fill in
this directory on open.
This directory contain can be created dynamically on every access or be
created in your memory. It's up to you!
In that case, don't use name_attach but resmgr_attach() with the
_RESMGR_FLAG_DIR because you need to be a full resmgr.
Normally, name_attach is just provided for QNX4 compatibility. I'm not
that you haven't to make a supplementary effort to use it instead of
name_attach() in your porting?!

regards,
Alain.

Post Reply

Return to “qdn.public.qnxrtp.porting”