This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

cyg_scheduler_lock


  I'm reading "eCos Reference Manual" and I see that
cyg_scheduler_lock.
   Locks the scheduler so that a context switch cannot occur. This can
be used to protect data shared between a thread and a DSR, or between
multiple threads, by surronding the critical region with
cyg_scheduler_lock() and cyg_scheduler_unlock().

I don't understand that of protecting data between DSRs and threads?

  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?


--
Rafael Rodríguez Velilla        rrv@tid.es
Telefónica I+D          http://www.tid.es
Telf: +34 - 91 337 4270




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]