Rafael Rodríguez Velilla wrote: > > > > If I lock the scheduler during the thread then no DSR can occur, no > > > other thread can gain the CPU. > > > Is it safe to use cyg_scheduler_lock or unlock inside a DSR? > > > > Yes they are safe in a DSR as long as they are balanced (you only lock as > > many as you unlock). > > But it must be balanced in each DSR, isn't it? And this makes it completely > unuseful to use this inside DSRs. Eh? In what scenario would you want to lock and unlock a different number of times in a DSR? (or strictly why lock/unlock at all, unless this is code shared by a thread). Jifl -- Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062 Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine