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
F132692071: D27160.id79454.diff
Sun, Oct 19, 2:30 AM
F132692069: D27160.id79373.diff
Sun, Oct 19, 2:30 AM
F132692064: D27160.id79636.diff
Sun, Oct 19, 2:30 AM
F132692056: D27160.id79535.diff
Sun, Oct 19, 2:30 AM
F132692051: D27160.id.diff
Sun, Oct 19, 2:30 AM
F132632540: D27160.diff
Sat, Oct 18, 2:49 PM
Unknown Object (File)
Sat, Oct 18, 8:45 AM
Unknown Object (File)
Sat, Oct 18, 6:43 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