This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
cyg_scheduler_lock
- To: ecos <ecos-discuss at sourceware dot cygnus dot com>
- Subject: [ECOS] cyg_scheduler_lock
- From: Rafael Rodríguez Velilla <rrv at tid dot es>
- Date: Wed, 23 May 2001 17:12:43 +0200
- Organization: Telefónica I+D
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