CompuLab SBC-X270 Manual de usuario Pagina 61

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 226
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 60
SCIOPTA - Real-Time Kernel
User’s Manual Manual Version 4.1 6-3
SCIOPTA - Real-Time Kernel
6 Messages
6.5 Message Passing
Message passing is the favourite method for interprocess communication in SCIOPTA. Contrary to mailbox inter-
process communication in traditiona
l real-time operating systems SCIOPTA is passing messages directly from
process to process.
Only messages owned by the process can be transmitted. A process wil
l become owner if the message is allocated
from the message pool or if the process has received the message. When allocating a message by the sc_msgAlloc
system call the user has to define the message ID and the size.
The size is given in bytes and the sc
_msgAlloc function of SCIOPTA chooses an internal size out of a number of
4, 8 or 16 fixed sizes (see also chapter
6.3 “Message Sizes” on page 6-2).
The sc_msg
Alloc or the sc_msgRx call returns a pointer to the allocated message. The pointer allows the user to
access the message data to initialize or modify it.
The sending process transmits the message by calling the sc_msgTx sys
tem call. SCIOPTA changes the owner of
the message to the receiving process and puts the message in the queue of the receiver process. In reality it is a
linked list of all messages in the pool transmitted to this process.
If the receiving process is blocked at the sc_msgRx sy
stem call and is waiting on the transmitted message the ker-
nel is performing a process swap and activates the
receiving process. As owner of the message the receiving proc-
ess can now get the message data by pointer ac
cess. The sc_msgRx call in SCIOPTA supports selective receiving
as every message includes a message ID and sender.
If the received message is not needed any longer or will
not be forwarded to another process it can be returned to
the system by the sc_msgFree and the message will be available for other allocations.
Figure 6-6: Message Sequence Chart of a SCIOPTA Message Passing
Process TX Process RX
sc_msgAlloc
sc_msgTx
sc_msgRx
sc_msgFree
Vista de pagina 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 225 226

Comentarios a estos manuales

Sin comentarios