[std/rlocks]add inline pragma (#17773)
so that it can be used as the base of new locks module with destructors.
This commit is contained in:
parent
5042cb956b
commit
172a5ab7f8
1 changed files with 3 additions and 3 deletions
|
|
@ -33,15 +33,15 @@ proc deinitRLock*(lock: var RLock) {.inline.} =
|
||||||
## Frees the resources associated with the lock.
|
## Frees the resources associated with the lock.
|
||||||
deinitSys(lock)
|
deinitSys(lock)
|
||||||
|
|
||||||
proc tryAcquire*(lock: var RLock): bool =
|
proc tryAcquire*(lock: var RLock): bool {.inline.} =
|
||||||
## Tries to acquire the given lock. Returns `true` on success.
|
## Tries to acquire the given lock. Returns `true` on success.
|
||||||
result = tryAcquireSys(lock)
|
result = tryAcquireSys(lock)
|
||||||
|
|
||||||
proc acquire*(lock: var RLock) =
|
proc acquire*(lock: var RLock) {.inline.} =
|
||||||
## Acquires the given lock.
|
## Acquires the given lock.
|
||||||
acquireSys(lock)
|
acquireSys(lock)
|
||||||
|
|
||||||
proc release*(lock: var RLock) =
|
proc release*(lock: var RLock) {.inline.} =
|
||||||
## Releases the given lock.
|
## Releases the given lock.
|
||||||
releaseSys(lock)
|
releaseSys(lock)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue