1. In a computer system, a method of sharing a hardware resource between a plurality of threads, said method comprising: accessing a request to use said hardware resource, said request received from a first thread of said plurality of threads; determining, based upon a first portion of a data structure, whether said hardware resource is available for use by said first thread; if said hardware resource is determined to be available for use by said first thread: said first thread setting said first portion of said data structure to indicate that said hardware resource is unavailable for use by a second thread of said plurality of threads; and said first thread setting a second portion of said data structure to signal that said hardware resource is ready for use by said first thread; and if said hardware resource is determined to be unavailable for use by said first thread: causing said first thread to wait until said hardware resource is available for use by said first thread; and in response to said hardware resource becoming available, setting said first portion of said data structure to indicate that said hardware resource is available, wherein said setting said first portion to indicate that said hardware resource is available is performed by a hardware aspect of said computer system, wherein said hardware aspect includes said hardware resource.