On Mon, Dec 14, 2015 at 03:31:10PM +0800, yoma sophian wrote: > hi all: > if there are many usermode program try to open /dev/ttyS1 for example > and read/write the /dev/ttyS1 at the same time. > > Did kernel tty driver so far handle the race condition above not to > let the message interleaved? No. > such as > user A --> send "abcd" --> ttyS1 > user B --> send "1234" --> ttyS1 > > how to make sure the serial Tx of ttyS1 will send either "abcd1234" or > "1234abcd" sequencially instead of "a1b2c3d4", etc. Don't have multiple userspace programs opening the same tty port :) greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html