Opened 3 years ago

Closed 3 years ago

#242 closed defect (fixed)

blocking_lock waiter count is wrong

Reported by: Thierry Delisle Owned by: caparsons
Priority: trivial Component: libcfa
Version: 1.0 Keywords: locks
Cc:

Description

The pop_and_set_new_owner decrements the wait_count even if no thread was woken up.

void pop_and_set_new_owner( blocking_lock & this ) with( this ) {
	$thread * t = &dropHead( blocked_threads );
	owner = t;
	recursion_count = ( t ? 1 : 0 );
	wait_count--;
	unpark( t );
}

Change History (1)

comment:1 Changed 3 years ago by caparson

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.