This wiki is out of date, use the continuation of this wiki instead

Signals

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 00:48, 2 May 2007 (edit)
Sandman (Talk | contribs)

← Previous diff
Revision as of 17:41, 2 May 2007 (edit) (undo)
Sandman (Talk | contribs)
m
Next diff →
Line 1: Line 1:
-[[Category:constants]]+[[Category:constantcategories]]
== Definition == == Definition ==

Revision as of 17:41, 2 May 2007


Definition

The following signals can be sent to a process or all processed of a processType. They are constants, which can be passed to signal() as the signal parameter).

Constant - Value - Description
S_KILL - 0 - Kill the process.
S_WAKEUP - 1 - Wakeup the process.
S_SLEEP - 2 - Put the process to sleep.
S_FREEZE - 3 - Freeze the process.
S_KILL_TREE - 100 - Kill the process and all its connected descendants.
S_WAKEUP_TREE - 101 - Wakeup the process and all its connected descendants.
S_SLEEP_TREE - 102 - Put the process and all its connected descendants to sleep.
S_FREEZE_TREE - 103 - Freeze the process and all its connected descendants.

A descendant is connected when all its ascendants up until the process are still alive.

More info

  • S_KILL - Order to kill the process. The process will not appear in the following frames of the game any longer.
  • S_WAKEUP - Order to wake up the process. It returns a slept or frozen process to its normal state. The process will be executed and displayed again from the moment that it recieves theis signal normally. A process that has been killed cannot be returned to its normal state by this method (or at all).
  • S_SLEEP - Order to make the process dormant. The process will remain paralyzed, without executing its code and without being displayed on screen (nor being detected by other processes), as if it had been killed. But the process will continue to exist in the computer's memory.
  • S_FREEZE - Order to freeze the process. The process will remain motionless without running its code. But it will continue to be displayed on screen and it will be possible to detect it (in the collisions) by the rest of the processes. The process will continue to exist in the computers memory even if its code is not executed.

In addition to these there are the following signals that have the same effect, but affect a range of processes, not just a single process:

  • S_KILL_TREE
  • S_WAKEUP_TREE
  • S_SLEEP_TREE
  • S_FREEZE_TREE

These will have the effect of their non-tree counterparts, but will affect the process indicated by the processID|processTypeID parameter and all of the processes created by those processes, either directly, or indirectly. So if an S_KILL_TREE signal is sent to a process, that process will die, all of the processes that it created will die, and all of the processes that they created will die, and so on. The exception to this is where there is an orphan process, that is a process to whose father is already dead.

Personal tools