Thanks for the answer, Yes I wrote a code that works with /dev/tty* serial using termios.h. I thought exactly what you suggested, to use a dedicated thread, but how to properly implement it? I mean in a simple way, just need to put open and write calls inside the high priority (RT) thread? Current kernel: 4.4.208-rt198 #1 SMP PREEMPT RT Em qui., 16 de jul. de 2020 às 16:26, Itai Handler <itai.handler@xxxxxxxxx> escreveu: > > Hi Michel, > > On 7/16/20, Michel Macena Oliveira <michel@xxxxxxxxxxxxxxxxxxxx> wrote: > > Hi, sorry for my newbie question, > > What is the status of the serial port driver? > > I've written some code to use serial ports for the generic kernel linux, > > And now I want to write something similar for the real time kernel, do > > I have to use some specific library, flags or something or is it just > > the same settings? > > > > I'm asking because now I need to take into account the serial access > > in the scheduler to ensure a real time behavior . > > > > Any help, advice, hint or tips would be appreciated. > > > > Do you mean that you wrote some code that works with a /dev/tty* serial port? > > In some kernel versions (e.g 4.19) we saw high latencies in the rx > path of serial drivers. > I think that this is due to rx handled in the context of a workqueue > which also handles other system activities. > We found a workaround to this problem. If I remember correctly we > create a dedicated thread for the port and assign it a high priority. > > Itai Handler