Skip to content

Conversation

@sunfishcode
Copy link
Member

No description provided.

sunfishcode and others added 4 commits November 18, 2024 10:49
* Fix `port_getn` calling.

* Return immediately if the vector's capacity is 0.
* Add a `port_getn_query` function.

The solarish [`port_getn` function] special-cases a `max` argument value
of 0 to be a query of the number of events available. #1215 added a
special-case to protect the code from doing a resize in that case. And
in case users actually do want to do a query, this PR adds a new
`port_getn_query` function that passes a zero.

[`port_getn` function]: https://illumos.org/man/3C/port_getn

* Fix errors.

* Update src/event/port.rs

Co-authored-by: 王宇逸 <Strawberry_Str@hotmail.com>

---------

Co-authored-by: 王宇逸 <Strawberry_Str@hotmail.com>
@sunfishcode sunfishcode merged commit 0168574 into 0.38 Nov 18, 2024
45 checks passed
@sunfishcode sunfishcode deleted the 0.38-updates branch November 18, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants