From: Dominique Larchey <larchey@loria.fr>
To: Tosoni <jp.tosoni@acksys.fr>
Cc: linux-serial@vger.kernel.org
Subject: Re: New IOCTL for Modem Control Lines monitoring
Date: Thu, 25 Jan 2007 20:00:11 +0100 [thread overview]
Message-ID: <45B8FE3B.3030705@loria.fr> (raw)
In-Reply-To: <000701c740af$852c83d0$2e01a8c0@acksys.local>
Tosoni a écrit :
> Sounds like an equivalent to WaitCommEvent in Windows NT.
>
> But there is a problem in Linux, which does not exist in Windows where the
> serial port is locked by the requesting process: in Linux you would have to
> associate your "recorded state" with the requesting process, because several
> processes may use your new ioctl at the same time.
Yes the recorded state COULD BE recorded by the same process that makes
the call. This process can get the status by reading the OUTPUT
icount.reserved[0] field each time the ioctl(uart_wait_new_status)
returns. Several processes can wait for a change each wrt to its own
"recorded state".
> Or, you can say that it's a feature of your ioctl to handle only one process
> :-)
This restriction is not necessary I think.
> Also, in Windows there is an extra feature, you can set a mask of which
> signal changes you want to monitor, you might want this feature as well
It exists in the code. Indeed, the INPUT field icount.reserved[0]
contains the corresponding mask. If this mask is 0, then the behavior
is not to wait forever but to return immediately, given back the
current modem status in the OUTPUT icount.reserved[0] field.
Regards,
Dominique LW
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2007-01-25 19:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-25 17:09 New IOCTL for Modem Control Lines monitoring Dominique Larchey-Wendling
2007-01-25 18:34 ` Tosoni
2007-01-25 19:00 ` Dominique Larchey [this message]
2007-01-30 2:39 ` Theodore Tso
2007-01-30 17:19 ` Dominique Larchey-Wendling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45B8FE3B.3030705@loria.fr \
--to=larchey@loria.fr \
--cc=jp.tosoni@acksys.fr \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.