Page MenuHomeFreeBSD

libthr: Remove deadcode in join_common
ClosedPublic

Authored by aokblast on Tue, Oct 13, 7:42 PM.
Tags
None
Referenced Files
F176401253: D60711.id190167.diff
Sun, Oct 18, 2:50 PM
F176368286: D60711.id.diff
Sun, Oct 18, 7:16 AM
F176368270: D60711.id190167.diff
Sun, Oct 18, 7:16 AM
Unknown Object (File)
Sat, Oct 17, 10:10 PM
Unknown Object (File)
Sat, Oct 17, 7:24 AM
Unknown Object (File)
Thu, Oct 15, 11:51 PM
Unknown Object (File)
Wed, Oct 14, 10:08 AM
Unknown Object (File)
Wed, Oct 14, 5:39 AM
Subscribers

Details

Summary

The while loop previous can only be break when ret == ETIMEDOUT. They
never produce EBUSY. Remove the deadcode here.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 78141
Build 75024: arc lint + arc unit

Event Timeline

I am not completely sure that EBUSY is not possible, because it can come from umtx_op(UMTX_OP_WAIT) when tid is also set to TID_TERMINATED. But indeed I do not think that it matter.
It could be that we should only execute 'else { ret = 0;' block when tid is TID_TERMINATED, and really check for ret != 0 in the if().

In fact, if the loop exited due to TID_TERMINATED, then ret does not matter.

This revision is now accepted and ready to land.Wed, Oct 14, 5:39 AM
In D60711#1392531, @kib wrote:

In fact, if the loop exited due to TID_TERMINATED, then ret does not matter.

Yes, and all of the res assignment beyong while loop are early returned.

This revision was automatically updated to reflect the committed changes.