mirror of
https://github.com/boostorg/fiber.git
synced 2026-02-02 08:52:07 +00:00
remove wake_up/woke_up -> use of is_ready/set_ready instead
This commit is contained in:
@@ -36,7 +36,7 @@ mutex::~mutex()
|
||||
void
|
||||
mutex::lock()
|
||||
{
|
||||
if ( LOCKED == state_.exchange( LOCKED, memory_order_seq_cst) )
|
||||
while ( LOCKED == state_.exchange( LOCKED, memory_order_seq_cst) )
|
||||
{
|
||||
detail::notify::ptr_t n( detail::scheduler::instance().active() );
|
||||
try
|
||||
@@ -59,7 +59,7 @@ mutex::lock()
|
||||
waiting_.push_back( n);
|
||||
|
||||
lk.unlock();
|
||||
while ( ! n->woken_up() )
|
||||
while ( ! n->is_ready() )
|
||||
{
|
||||
fprintf(stdout, "mutex: main-fiber not woken-up\n");
|
||||
// run scheduler
|
||||
@@ -98,7 +98,7 @@ mutex::unlock()
|
||||
state_ = UNLOCKED;
|
||||
|
||||
if ( n)
|
||||
n->wake_up();
|
||||
n->set_ready();
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user