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
F170611527: D27160.id79636.diff
Sat, Sep 5, 3:33 PM
F170508403: D27160.id79636.diff
Sat, Sep 5, 3:57 AM
F170420155: D27160.id.diff
Fri, Sep 4, 6:15 PM
Unknown Object (File)
Fri, Sep 4, 7:22 AM
Unknown Object (File)
Thu, Sep 3, 3:52 PM
Unknown Object (File)
Thu, Sep 3, 1:15 PM
Unknown Object (File)
Wed, Sep 2, 4:26 PM
Unknown Object (File)
Wed, Sep 2, 8:29 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

Lint
Lint Skipped
Unit
Tests Skipped

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

s/structure/memory/

1139

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