int function ( ) { int loc0 = semaphore . loc0 ( ) ; if ( loc0 == 0 ) { return 0 ; } else { return TOTAL_PERMITS - loc0 ; } }
returns the number of references currently being held . concode_field_sep int TOTAL_PERMITS concode_elem_sep Semaphore semaphore concode_field_sep Releasable tryAcquire concode_elem_sep Releasable idempotentRelease concode_elem_sep Releasable acquire concode_elem_sep Releasable acquireUninterruptibly concode_elem_sep Releasable blockAcquisition