get rid of deprecated effects
This commit is contained in:
parent
3c13508b25
commit
543ec37975
1 changed files with 6 additions and 18 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Nim's Runtime Library
|
# Nim's Runtime Library
|
||||||
# (c) Copyright 2012 Andreas Rumpf
|
# (c) Copyright 2015 Andreas Rumpf
|
||||||
#
|
#
|
||||||
# See the file "copying.txt", included in this
|
# See the file "copying.txt", included in this
|
||||||
# distribution, for details about the copyright.
|
# distribution, for details about the copyright.
|
||||||
|
|
@ -15,18 +15,6 @@ type
|
||||||
TLock* = TSysLock ## Nim lock; whether this is re-entrant
|
TLock* = TSysLock ## Nim lock; whether this is re-entrant
|
||||||
## or not is unspecified!
|
## or not is unspecified!
|
||||||
TCond* = TSysCond ## Nim condition variable
|
TCond* = TSysCond ## Nim condition variable
|
||||||
|
|
||||||
LockEffect* {.deprecated.} = object of RootEffect ## \
|
|
||||||
## effect that denotes that some lock operation
|
|
||||||
## is performed. Deprecated, do not use anymore!
|
|
||||||
AquireEffect* {.deprecated.} = object of LockEffect ## \
|
|
||||||
## effect that denotes that some lock is
|
|
||||||
## acquired. Deprecated, do not use anymore!
|
|
||||||
ReleaseEffect* {.deprecated.} = object of LockEffect ## \
|
|
||||||
## effect that denotes that some lock is
|
|
||||||
## released. Deprecated, do not use anymore!
|
|
||||||
{.deprecated: [FLock: LockEffect, FAquireLock: AquireEffect,
|
|
||||||
FReleaseLock: ReleaseEffect].}
|
|
||||||
|
|
||||||
proc initLock*(lock: var TLock) {.inline.} =
|
proc initLock*(lock: var TLock) {.inline.} =
|
||||||
## Initializes the given lock.
|
## Initializes the given lock.
|
||||||
|
|
@ -36,14 +24,14 @@ proc deinitLock*(lock: var TLock) {.inline.} =
|
||||||
## Frees the resources associated with the lock.
|
## Frees the resources associated with the lock.
|
||||||
deinitSys(lock)
|
deinitSys(lock)
|
||||||
|
|
||||||
proc tryAcquire*(lock: var TLock): bool =
|
proc tryAcquire*(lock: var TLock): bool =
|
||||||
## 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 TLock) =
|
proc acquire*(lock: var TLock) =
|
||||||
## Acquires the given lock.
|
## Acquires the given lock.
|
||||||
acquireSys(lock)
|
acquireSys(lock)
|
||||||
|
|
||||||
proc release*(lock: var TLock) =
|
proc release*(lock: var TLock) =
|
||||||
## Releases the given lock.
|
## Releases the given lock.
|
||||||
releaseSys(lock)
|
releaseSys(lock)
|
||||||
|
|
@ -58,10 +46,10 @@ proc deinitCond*(cond: var TCond) {.inline.} =
|
||||||
deinitSysCond(cond)
|
deinitSysCond(cond)
|
||||||
|
|
||||||
proc wait*(cond: var TCond, lock: var TLock) {.inline.} =
|
proc wait*(cond: var TCond, lock: var TLock) {.inline.} =
|
||||||
## waits on the condition variable `cond`.
|
## waits on the condition variable `cond`.
|
||||||
waitSysCond(cond, lock)
|
waitSysCond(cond, lock)
|
||||||
|
|
||||||
proc signal*(cond: var TCond) {.inline.} =
|
proc signal*(cond: var TCond) {.inline.} =
|
||||||
## sends a signal to the condition variable `cond`.
|
## sends a signal to the condition variable `cond`.
|
||||||
signalSysCond(cond)
|
signalSysCond(cond)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue