PROVIDING A WRAPPER AROUND NATIVE SYNCHRONIZATION OBJECTS
First Claim
1. A computer-readable medium whose contents implement in a computing system functions for accessing a synchronization mechanism, the functions comprising:
- a safe initialization function called by a thread to initialize the synchronization mechanism;
a safe acquisition function called by a thread to acquire the synchronization mechanism, in some cases after waiting for release of the synchronization mechanism by a thread that previously acquired the synchronization mechanism;
a safe release function called by a thread to release the synchronization mechanism after acquiring the synchronization mechanism; and
a safe deletion function called by the thread to delete the synchronization mechanism, the safe acquisition function permitting calling threads to acquire or wait to acquire the synchronization mechanism only if the safe initialization function has been called more recently than the safe deletion function, the safe deletion function deferring deletion of the synchronization mechanism until any threads that previously acquired the synchronization mechanism release it and until any threads waiting for the synchronization resume execution.
2 Assignments
0 Petitions
Accused Products
Abstract
A facility for managing a synchronization mechanism that supports initialization, acquisition, release, and deletion operations is described. When a thread seeks to perform the acquisition operation, the facility permits performance of the acquisition operation only if the initialization operation has been performed more recently than the deletion operation. When a thread seeks to perform the deletion operation, the facility waits until any threads that are seeking to perform the acquisition operation or have performed the acquisition operation more recently than the release operation have performed the release operation before deleting the synchronization mechanism.
10 Citations
19 Claims
-
1. A computer-readable medium whose contents implement in a computing system functions for accessing a synchronization mechanism, the functions comprising:
-
a safe initialization function called by a thread to initialize the synchronization mechanism;
a safe acquisition function called by a thread to acquire the synchronization mechanism, in some cases after waiting for release of the synchronization mechanism by a thread that previously acquired the synchronization mechanism;
a safe release function called by a thread to release the synchronization mechanism after acquiring the synchronization mechanism; and
a safe deletion function called by the thread to delete the synchronization mechanism, the safe acquisition function permitting calling threads to acquire or wait to acquire the synchronization mechanism only if the safe initialization function has been called more recently than the safe deletion function, the safe deletion function deferring deletion of the synchronization mechanism until any threads that previously acquired the synchronization mechanism release it and until any threads waiting for the synchronization resume execution. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method in a computing system for managing a synchronization mechanism that supports initialization, acquisition, release, and deletion operations, comprising:
-
when a thread seeks to perform the acquisition operation, permitting performance of the acquisition operation only if the initialization operation has been performed more recently than the deletion operation; and
when a thread seeks to perform the deletion operation, waiting until any threads that are seeking to perform the acquisition operation or have performed the acquisition operation more recently than the release operation have performed the release operation before deleting the synchronization mechanism. - View Dependent Claims (8, 9, 10, 11, 12, 13)
-
-
14. A multithreaded computing system, comprising:
-
an operating system;
a resource usable by one or more threads;
a native synchronization mechanism implemented by the operating system for synchronizing access to the resource; and
a synchronization mechanism wrapper through which threads access the native synchronization mechanism. - View Dependent Claims (15, 16, 17, 18, 19)
-
Specification