Skip navigation.
Home
The QNX Community Portal

View topic - how many open() calls?

how many open() calls?

For discussion of realtime and/or embedded programming.

how many open() calls?

Postby rahil » Fri Jun 19, 2009 7:37 am

Hi.

How many open() calls can one make for a single pathname "/dev/ser1" handled by devc-ser8250?

The question put another way:

How many OCB can we have for a serial port?

How many processes can open the same serial port, at the same time?
Last edited by rahil on Fri Jun 19, 2009 7:39 am, edited 1 time in total.
rahil
Active Member
 
Posts: 75
Joined: Wed Feb 11, 2009 12:13 pm
Location: India

RE: how many open() calls?

Postby rahil » Fri Jun 19, 2009 7:38 am

another thing,

What will happen when two processes try to write onto the same serial port?
and what will happen when two processes try to read from the same serial port?

Thanks in Advance,
rahil
Active Member
 
Posts: 75
Joined: Wed Feb 11, 2009 12:13 pm
Location: India

RE: how many open() calls?

Postby mario » Fri Jun 19, 2009 12:30 pm

I think the number of open call is limited by the number of connection per process as specify in the kernel. I believe this can be increase via option to procnto.

Two simultaneous write won`t cause a problem, they will be process in order. Multiple read, I guess will results in data being receive in an undefined order, meaning one process will get some data and the other some other data. Which data goes where is undefined.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am


Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 3 guests

cron