摘要 |
A technique for processing a critical code section which cannot be executed concurrently by more than one executable unit (e.g., a thread, a process, a fiber, etc.). A first executable unit prepares a packet containing a "work request," which describes work to be performed by the critical section. If the critical section is not in use by a second executable unit, then the first executable unit enters the critical section and performs the work described in the packet. If the critical section is in use by a second executable unit, then the second executable unit performs the work described in the packet on behalf of the first executable unit, thereby alleviating the necessity for the first executable unit to enter the critical section. In addition to the work request, the packet may also contain: a status indicating whether the work request has been performed, an event to be signaled upon completion of the work request, and/or a list pointer that may be used to link packets together in a linked list.
|