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

Refactor Windows API code #5309

Merged
merged 5 commits into from
Oct 20, 2023
Merged

Refactor Windows API code #5309

merged 5 commits into from
Oct 20, 2023

Conversation

dlon
Copy link
Member

@dlon dlon commented Oct 17, 2023

And some other things. Main changes in this PR:

  • Remove pointless locks from wireguard_nt.
  • Add talpid_windows crate for generic Windows code shared between crates, mainly process snapshots and event objects.
  • Replace talpid_windows_net with submodule talpid_windows::net.

Close DES-408


This change is Reviewable

@dlon dlon requested a review from Jontified October 17, 2023 11:44
@mullvad mullvad deleted a comment from linear bot Oct 18, 2023
Copy link
Contributor

@Jontified Jontified left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 31 of 31 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


talpid-routing/src/windows/mod.rs line 287 at r1 (raw file):

        Ok(Some(route)) => {
            let interface_row =
                talpid_windows::net::get_ip_interface_entry(addr_family, &route.iface).map_err(

nit: can be just net


talpid-windows/src/sync.rs line 44 at r1 (raw file):

    /// Duplicate the event object with `DuplicateHandle()`
    pub fn duplicate(&self) -> io::Result<Event> {

What is this for? Does not seem to be used anywhere.


talpid-windows/Cargo.toml line 3 at r1 (raw file):

[package]
name = "talpid-windows"
description = "Nice abstractions for Windows"

Very* nice ;)

@dlon dlon force-pushed the win-refactor-winapi branch 3 times, most recently from 4b2cfe4 to 4c51384 Compare October 20, 2023 15:21
Copy link
Contributor

@Jontified Jontified left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 of 5 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@dlon dlon force-pushed the win-refactor-winapi branch from 7b15749 to 8a5ad4b Compare October 20, 2023 16:18
@dlon dlon merged commit c9f9f6b into main Oct 20, 2023
28 checks passed
@dlon dlon deleted the win-refactor-winapi branch October 20, 2023 16:20
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.

2 participants