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
Unknown Object (File)
Sun, Jan 19, 5:39 PM
Unknown Object (File)
Thu, Jan 16, 3:04 PM
Unknown Object (File)
Dec 7 2024, 10:58 PM
Unknown Object (File)
Dec 5 2024, 1:23 AM
Unknown Object (File)
Nov 27 2024, 11:41 PM
Unknown Object (File)
Nov 24 2024, 4:32 PM
Unknown Object (File)
Nov 17 2024, 1:16 PM
Unknown Object (File)
Nov 17 2024, 9:40 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