主权项 |
1. An apparatus for servicing a globally broadcast interrupt signal in a multi-threaded computer, the apparatus comprising a computer processor and a computer memory operatively coupled to the computer processor, the computer memory having disposed within it computer program instructions that, when executed by the computer processor, cause the apparatus to carry out the steps of:
indicating, by an interrupt controller, in a plurality of local interrupt status locations that a globally broadcast interrupt signal has been received by the interrupt controller, each local interrupt status location corresponding to a particular thread; determining, by a thread, that a local interrupt status location corresponding to the thread indicates that the globally broadcast interrupt signal has been received by the interrupt controller; and in response to determining that the local interrupt status location indicates that the globally broadcast interrupt signal has been received by the interrupt controller, processing one or more entries in a global interrupt status bit queue based on whether global interrupt status bits associated with the globally broadcast interrupt signal are locked, each entry in the global interrupt status bit queue corresponding to a queued global interrupt, wherein processing one or more entries in the global interrupt status bit queue based on whether global interrupt status bits associated with the globally broadcast interrupt signal are locked includes:
determining, by the thread, whether the global interrupt status bits associated with the globally broadcast interrupt signal are locked;if the global interrupt status bits are not locked, processing the one or more entries in the global interrupt status bit queue based on whether the globally broadcast interrupt signal is active, wherein processing the one or more entries in the global interrupt status bit queue based on whether the globally broadcast interrupt signal is active includes:
determining, by the thread, whether the globally broadcast interrupt signal is active;if the globally broadcast interrupt signal is active:
locking, by the thread, the global interrupt status bits;subsequent to locking the global interrupt status bits, storing, by the thread, contents of the global interrupt status bits in the global interrupt status bit queue;in response to storing the contents of the global interrupt status bits, clearing, by the thread, the contents of the global interrupt status bits; andin response to clearing the contents of the global interrupt status bits, unlocking, by the thread, the global interrupt status bits and processing the next entry in the global interrupt status bit queue. |