Commit Graph

11 Commits

Author SHA1 Message Date
Nekotekina
7a024f3355 Implement shared_mutex::lock_unlock
Minor fix for shared_mutex::try_lock - don't optimize for pessimistic case
2018-10-02 02:22:26 +03:00
Nekotekina
9e5b633779 shared_mutex cleanup
Rewrite to use unsigned arithmetic, shrink to u32
Ensure zero default unlocked state (will need it later)
Inline all public methods, rewrite lock_upgrade()
Remove try_lock_degrade(), lock_degrade() methods
Implement lock_downgrade() (now trivial)
Remove is_reading(), added is_free()
Added reader_lock::try_upgrade()
2018-09-27 12:16:43 +03:00
Nekotekina
445e5def42 Remove safe_reader_lock, safe_writer_lock
It worked as a simple recursive locker for shared_mutex
But its design is flawed and thus can't be fully implemented
2018-09-15 17:09:56 +03:00
Nekotekina
fb5cdf9769 atomic_t<>: extend fetch_op to support cancellation
Use std::invoke inside atomic_op/fetch_op
Remove op_fetch because it's easily replaced
Add fetch_dec_sat algorithm (conditional decrement)
2018-09-08 00:32:04 +03:00
Nekotekina
7f542a5c99 Fix safe_writer_lock (typo) 2018-03-11 19:33:01 +03:00
Nekotekina
beab5291bb mutex.cpp: minor update
New concept (incomplete)
2017-10-05 19:51:37 +03:00
Ryan Gonzalez
e447f071ce Misc compile fixes 2017-04-18 22:37:17 +03:00
Ivan
1ae334e500 Fix freezes on Linux (#2632) 2017-04-04 23:27:16 +03:00
Nekotekina
f35babad98 shared_mutex fix (linux) 2017-02-24 18:48:53 +03:00
Nekotekina
b1aa87b515 Busy waiting added 2017-02-16 00:13:55 +03:00
Nekotekina
1c14d872a8 New shared_mutex
Experimental sync utils
New semaphore<>
New cond_variable
New owned_mutex
2017-01-25 00:38:07 +03:00