Page MenuHomeFreeBSD

_umtx_op: document UMTX_OP_SEM2_WAIT copyout behavior
ClosedPublic

Authored by kevans on Nov 10 2020, 4:48 AM.
Tags
None
Referenced Files
F170109591: D27160.id.diff
Thu, Sep 3, 1:15 PM
F169821810: D27160.id79535.diff
Wed, Sep 2, 4:26 PM
Unknown Object (File)
Wed, Sep 2, 8:29 AM
Unknown Object (File)
Wed, Sep 2, 12:52 AM
Unknown Object (File)
Tue, Sep 1, 1:15 PM
Unknown Object (File)
Tue, Sep 1, 12:47 PM
Unknown Object (File)
Tue, Sep 1, 3:37 AM
Unknown Object (File)
Mon, Aug 31, 12:32 AM
Subscribers

Details

Summary

I tripped over a librt test that exercises this under qemu-bsd-user, and was quite confused for a solid minute.

This clever technique to get a time remaining back was added to support sem_clockwait_np.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

0mp added a subscriber: 0mp.

If the content makes sense, it's good to go.

PS MFC maybe?

This revision is now accepted and ready to land.Nov 10 2020, 9:01 AM

I do not like how this description is structured.

The block of UMTX_OP_SEM2_WAIT starts with explanation of arguments, and currently it only mentions obj. I suggest to add that uaddr1 can take size of memory pointed to by uaddr2, and uaddr2 points to struct umtx_time32 followed by struct timespec.

Then if UMTX_ABSTIME is not set, <follow your description>.

Take 2; explain uaddr/uaddr2 up front and slightly wordsmith.

This revision now requires review to proceed.Nov 12 2020, 3:27 AM
lib/libc/sys/_umtx_op.2
1105 ↗(On Diff #79454)

s/structure/memory/

1139 ↗(On Diff #79454)

This makes impression that UMTX_ABSTIME can be set during operation.

... was not set, and the operation was interrupted ...

kevans marked 2 inline comments as done.

Address rewording

This revision is now accepted and ready to land.Nov 14 2020, 4:29 AM