diff options
author | flywind <xzsflywind@gmail.com> | 2021-04-19 13:41:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-19 07:41:50 +0200 |
commit | 172a5ab7f82df503c1123a3bfa2f702416733858 (patch) | |
tree | f35b8316a3dde2d41d313add7682aedb1862acdb /lib/core | |
parent | 5042cb956be1cfc1dfb106d3dbc9d897e10f72d8 (diff) | |
download | Nim-172a5ab7f82df503c1123a3bfa2f702416733858.tar.gz |
[std/rlocks]add inline pragma (#17773)
so that it can be used as the base of new locks module with destructors.
Diffstat (limited to 'lib/core')
-rw-r--r-- | lib/core/rlocks.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/core/rlocks.nim b/lib/core/rlocks.nim index f9224adb8..5f155262a 100644 --- a/lib/core/rlocks.nim +++ b/lib/core/rlocks.nim @@ -33,15 +33,15 @@ proc deinitRLock*(lock: var RLock) {.inline.} = ## Frees the resources associated with the 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. result = tryAcquireSys(lock) -proc acquire*(lock: var RLock) = +proc acquire*(lock: var RLock) {.inline.} = ## Acquires the given lock. acquireSys(lock) -proc release*(lock: var RLock) = +proc release*(lock: var RLock) {.inline.} = ## Releases the given lock. releaseSys(lock) |