The SIGIO
signal handler
(ioHandler
) is declared static as noted
above. The static instList
of type
Fd2Inst
points to the list of mappings from file
descriptor to class instance.
The SystemC event used to signal when input is available is pointed
to by ioEvent
.
Caution | |
---|---|
It is essential that the event is declared as a pointer. If the event itself were declared here, it would be available at elaboration, and would crash the system (try it!). The solution is to declare the pointer and allocate the event instance dynamically when the xterm is created. The memory can be freed from the destructor on termination. |