CompuLab SBC-X270 Manual de usuario Pagina 74

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 226
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 73
SCIOPTA - Real-Time Kernel
8-2 Manual Version 4.1 User’s Manual
SCIOPTA - Real-Time Kernel
8 SCIOPTA Trigger
8.3 Trigger Example
This is a very small example how triggers can be used in SCIOPTA processes. A prioritized process is waiting on
its trigger and will be executed when another process (in this case an interrupt process) is activating the trigger.
/* This is the interrupt process activating the trigger of process trigproc */
extern sc_pid_t trigproc_pid
OS_INT_PROCESS (myint, 0)
{
.
.
.
sc_trigger (trigproc_pid); /* This call makes process trigproc ready */
}
/* This is the prioritized process trigproc which waits on its trigger */
SC_PROCESS (trigproc)
{
/* At process creation the value of the trigger is initialized */
/* to zero. If this is not the case you have to initialize it with */
/* the sc_triggerValueSet() system call */
for (;;)
{
sc_triggerWait(1,SC_ENDLESS_TMO); /* Process waits on the trigger */
.
.
/* Trigger was activated by process myint */
.
.
}
}
Vista de pagina 73
1 2 ... 69 70 71 72 73 74 75 76 77 78 79 ... 225 226

Comentarios a estos manuales

Sin comentarios