Dev -n

Hi everybody,
I just want to know if entries under /dev/shmem, like /dev/shmem/Pgxxxxxxxx
and /dev/shmem/Pfxxxxxxxx take 1 device from the Dev process.

Also, is there a way to know how many are free?

Regards,
Denis

“Denis Rivard” <denis.rivard@loto-quebec.com> wrote in message
news:b3gdc3$p9u$1@inn.qnx.com

Hi everybody,
I just want to know if entries under /dev/shmem, like
/dev/shmem/Pgxxxxxxxx
and /dev/shmem/Pfxxxxxxxx take 1 device from the Dev process.

No, this files have nothing common with Dev. They are managed by kernel and
represent named shared memory files.

Also, is there a way to know how many are free?

It’s possibly, but IMHO quite tricky. I would query a list of processes, for
each process query list of file descriptors and check if fd is handled by
Dev manager.

// wbr

Ian Zagorskih <ianzag@megasignal.com> wrote:

“Denis Rivard” <> denis.rivard@loto-quebec.com> > wrote in message
news:b3gdc3$p9u$> 1@inn.qnx.com> …
Hi everybody,

Also, is there a way to know how many are free?


It’s possibly, but IMHO quite tricky. I would query a list of processes, for
each process query list of file descriptors and check if fd is handled by
Dev manager.

In general, each driver that deals with Dev is called Dev.xxxx, and
both Dev and the various drivers take command-line options for the
number of devices to allow. By looking at “sin args” for the various
drivers and Dev, you should be able to get a pretty good idea how many
are used/free on your system.

Note: you can run more then one Dev manager, with a second Dev manager
handling a different directory – say you have a 64-port serial board
you want, you could run Dev on /DEV with all 64-ports under it, and
have everything else under /dev.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Thanks,
Denis

“David Gibbs” <dagibbs@qnx.com> a écrit dans le message de news:
b3vtvd$fn$1@nntp.qnx.com

Ian Zagorskih <> ianzag@megasignal.com> > wrote:

“Denis Rivard” <> denis.rivard@loto-quebec.com> > wrote in message
news:b3gdc3$p9u$> 1@inn.qnx.com> …
Hi everybody,

Also, is there a way to know how many are free?


It’s possibly, but IMHO quite tricky. I would query a list of processes,
for
each process query list of file descriptors and check if fd is handled
by
Dev manager.

In general, each driver that deals with Dev is called Dev.xxxx, and
both Dev and the various drivers take command-line options for the
number of devices to allow. By looking at “sin args” for the various
drivers and Dev, you should be able to get a pretty good idea how many
are used/free on your system.

Note: you can run more then one Dev manager, with a second Dev manager
handling a different directory – say you have a 64-port serial board
you want, you could run Dev on /DEV with all 64-ports under it, and
have everything else under /dev.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.