LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-20-2017, 08:26 AM   #1
BruceV
LQ Newbie
 
Registered: Jan 2016
Posts: 18

Rep: Reputation: Disabled
Blocking behaviour of serial (TTY) ports under Linux


Hi, Im porting C++ applications from Win32 to Linux, they include serial comms. I have a specific query:

Under Win32, if you have a serial port open for reading and writing, if the receive direction is blocking (usually in an Rx thread), the transmit direction also blocks. From a hardware perspective, this makes no sense because the two directions in a UART are independent.

Is the situation the same with Linux?
 
Old 07-20-2017, 01:02 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,354
Blog Entries: 13

Rep: Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411
There is no such thing as blocking in the TX direction, except the possibility that you have tried to send too much data, too fast, and therefore it would not take it because the pipe is not empty yet from transmitting data.
 
1 members found this post helpful.
  


Reply

Tags
blocking, serial port


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial ports, USB-Serial adapters, and Linux Daravon Linux - Newbie 3 09-09-2010 06:53 AM
Porting Linux, the Serial Port, and TTY Interloper Linux - Software 2 06-25-2009 03:53 AM
blocking and unblocking ports on linux pumplove Linux - Networking 1 07-25-2006 09:16 AM
Is linux blocking ports? kryptobs2000 Linux - Networking 1 12-16-2005 02:17 PM
Serial Ports (ttys) aqoliveira Linux - Hardware 4 06-21-2002 10:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration