
SCIOPTA - Real-Time Kernel
User’s Manual Manual Version 4.1 5-13
SCIOPTA - Real-Time Kernel
5 Processes
5.13 Addressing Processes
5.13.1 Introduction
In a typical SCIOPTA design you need to address processes. For example you want to
• send SCIOPTA messages to a process,
• kill a process
• get a stored name of a process
• observe a process
• get or set the priority of a process
• start and stop processes
In SCIOPTA you are addressing processes by using their process ID (pid). There are two methods to get process
IDs depending if you have to do with static or dynamic processes.
5.13.2 Get Process IDs of Static Processes
Static processes are created by the kernel at start-up. They are designed with the SCIOPTA SCONF configuration
utility by defining the name and all other process parameters such as priority and process stack sizes.
You can address static process by appending the string
_pid
to the process name if the process resides in the system module. If the static process resides inside another module
than the system module, you need to precede the process name with the module name and an underscore in be
-
tween.
For instance if you have a static process defined in the system module with the name controller you can address
it by giving controller_pid. To send a message to that process you can use:
sc_msgTx (mymsg, controller_pid, myflags);
If you have a static process in the module tcs (which is not the system module) with the name display you can
address it by giving tcs_display_pid. To send a message to that process you can use:
sc_msgTx (mymsg, tcs_display_pid, myflags);
5.13.3 Get Process IDs of Dynamic Processes
Dynamic processes can be created and killed during run-time. Often dynamic processes are used to run multiple
instances of common code.
The process IDs of dynamic processes can be retrieved by using the system call sc_procIdGet.
The process creation system calls sc_procPrioCreate, sc_procIntCreate and sc_procTimCreate will also return
the process IDs which can be used for further addressing.
Kommentare zu diesen Handbüchern