On 27.05.20 11:11, Jan Leupold via Xenomai wrote: > Hi, > > it seems to me that the write() methods in 16550.c, mpc52xx_uart.c and > rt_imx_uart.c cause a SIGDEBUG when used on a kernel with > XENO_OPT_DEBUG_MUTEX_SLEEP set. > > All drivers lock a mutex (named "out_lock") for the duration of these > functions and eventually call rtdm_event_timedwait() later - with the > mutex locked. > > I think it is a good thing to serialize write() there, but it does not combine > well with the debug option. Currently I disable the test with > pthread_setmode_np() for the duration of write() in the application, > but maybe someone has a better idea how to deal with it.
Good catch. We would need to a way to tag in-kernel mutexes that are fine to hold while sleeping. Those could be exempted from xnthread_get/put_resource(). Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux