Echelon Neuron C Manuel d'utilisateur Page 222

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 267
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 221
202 Built-In Variables, Objects, Symbols, and Semaphore
__lock { // acquire semaphore
f();
} // release semaphore
... // more unguarded code
}
This code results in a deadlock because the interrupt task owns the semaphore,
thus function f() can never succeed in acquiring it. The Neuron firmware resolves
the deadlock by resetting the chip after the watchdog timer expires, but you must
be sure to release the semaphore before acquiring it again.
Defining a lock with target hardware or firmware that does not support
semaphores yields a linker error, NLD#506.
If you define a lock for an interrupt task that runs within the application
processor, the Neuron Exporter issue a warning message (NEX#4014) that the
hardware semaphore and the __lock{ } statement are not operational for the
specified system clock setting. In addition, when the interrupt task runs, no
semaphore is acquired, access is granted immediately, but a system error is
logged.
Vue de la page 221
1 2 ... 217 218 219 220 221 222 223 224 225 226 227 ... 266 267

Commentaires sur ces manuels

Pas de commentaire