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)
Apr 10 2024, 9:00 PM
Unknown Object (File)
Apr 9 2024, 8:08 PM
Unknown Object (File)
Mar 22 2024, 12:24 AM
Unknown Object (File)
Mar 22 2024, 12:24 AM
Unknown Object (File)
Feb 10 2024, 5:21 PM
Unknown Object (File)
Feb 7 2024, 4:06 PM
Unknown Object (File)
Jan 28 2024, 12:15 PM
Unknown Object (File)
Dec 20 2023, 5:57 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