[BRLTTY] New release coming soon.

Dave Mielke dave at mielke.cc
Mon Dec 16 12:41:04 EST 2013


[quoted lines by Eric Scheibler on 2013/12/15 at 21:27 +0100]

>I'am not absolutely sure but I guess that the error often occurs after 
>permanent refreshing of the braille device. Mostly I can reproduce it when I 
>put the cursor on the first screen line and hold the SHIFT+ArrowDown shortcut 
>until the cursor touches the bottom of the screen. It also happens during 
>normal usage but so I can get your log file faster.

I believe that it's still related to your use of the eSpeak driver, which 
really means that it's based on a difficulty with thread creation. I did fix 
the way the eSpeak driver creates its own thread, but I didn't realize that 
eSpeak itself, within its own code, also creates threads which we can't 
control. I believe the proper fix is for us to create a safe thread within 
which the speech driver will run.

For the curious, here's the technical explanation:

When a thread is created, it inherits the signal mask of its parent thread. 
There's no way to override this. The core needs to run with the signal it's 
using for USB input unblocked, which means that any thread the core creates 
will also, at least initially, have this same signal unblocked. If more than 
one thread has a given signal unblocked, the kernel decides which of them 
should receive that signal. This means that the signal which tells the core 
that more USB input is available can go to the wrong thread, thus leaving the 
core totally unaware that there's more input to process.

My attempt at the fix, yesterday, was to temporarily block the signal whenever 
the core needs to create a new thread. That worked just fine for core-created 
threads. The problem, however, is that we can't do the same thing when an 
external package, e.g. eSpeak, running within the core's thread creates its own 
internal threads. The current plan, therefore, is to create a speech thread 
within the core which'll then be responsible for actually running the various 
speech drivers. This'll take a bit to code. I'll let you know when it's done.

-- 
Dave Mielke           | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | http://Mielke.cc/bible/
EMail: dave at mielke.cc | Canada  K2A 1H7   | http://FamilyRadio.com/


More information about the BRLTTY mailing list