[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Console and synchronization

Hi everyone,
Another question in my long series of interrogation on RTEMS and its
inner working :)

In looking at the code of rtems_termios_enqueue_raw_characters(), I
found out that tty->rawInBuf.Semaphore is released at the end but never
acquired in the function. Is it that my uart interrupt handler should
acquire that semaphore and rtems_termios_enqueue_raw_characters() just
make sure it is released, or is it that the semaphore is acquired
somewhere else in RTEMS and happen to be released there?

I may be in some sort of "racing condition" (don'T know if that's the
right expression but anyway) where the read() function is stuck in
waiting for rawInBuf to be released. Or maybe it's the other way around.
Anyway, I don't know exactly the cause but what I know is that the code
is waiting for a semaphore to be released and it never happen. So the
fact I just talked about above made me wondering.

Have a nice day!

Etienne Fortin