Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Dynamic fd_set in CFSocket #4969

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lxbndr
Copy link
Contributor

@lxbndr lxbndr commented Jun 4, 2024

This makes fd_set on Windows growable by adding additional space to the storing buffer, which effectively extends fd_set.fd_array capacity.

With this change fixed FD_SETSIZE 1024 becomes unnecessarily large (every such fd_set takes more than 8Kb of memory), so it seems reasonable to reduce it to lower value. I guess 128 will do (which is twice as big as default 64).

Also, I removed some unused defines left from old bit-field implementation and tossed local vars in __CFSocketManager function to make them available according to their usage per platform.

Follow-up for #4954. Resolves #4958.

@lxbndr
Copy link
Contributor Author

lxbndr commented Jun 4, 2024

cc @tristanlabelle

This makes `fd_set` on Windows growable by adding additional space to the storing buffer, which effectively extends `fd_set.fd_array` capacity.
@lxbndr
Copy link
Contributor Author

lxbndr commented Jul 19, 2024

Rebased on latest main

@parkera parkera requested a review from compnerd July 19, 2024 23:32
@parkera
Copy link
Contributor

parkera commented Jul 19, 2024

@swift-ci test

@lxbndr
Copy link
Contributor Author

lxbndr commented Jul 20, 2024

Not sure if I am reading CI output correctly, but

/Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/swift-corelibs-xctest/Sources/XCTest/Public/XCTestMain.swift:21:23: error: no such module 'SwiftFoundation'
    @_exported import SwiftFoundation

seems to be unrelated to the changes.

@parkera
Copy link
Contributor

parkera commented Jul 21, 2024

We need to disable the macOS build here, it's not actually supported in SCL-F any longer.

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.

CFSocket should use dynamically-sized fd_set on Windows
2 participants