@@ -37,26 +37,6 @@ macro_rules! syscall {
37
37
} } ;
38
38
}
39
39
40
- /// Execute a `Win32::NetworkManagement::IpHelper` syscall.
41
- ///
42
- /// The raw result of the syscall is returned.
43
- macro_rules! syscall_ip_helper {
44
- ( $fn: ident ( $( $arg: expr) ,* $( , ) * ) ) => { {
45
- #[ allow( unsafe_code) ]
46
- unsafe { windows_sys:: Win32 :: NetworkManagement :: IpHelper :: $fn( $( $arg, ) * ) }
47
- } } ;
48
- }
49
-
50
- /// Execute a `Win32::System::Threading` syscall.
51
- ///
52
- /// The raw result of the syscall is returned.
53
- macro_rules! syscall_threading {
54
- ( $fn: ident ( $( $arg: expr) ,* $( , ) * ) ) => { {
55
- #[ allow( unsafe_code) ]
56
- unsafe { windows_sys:: Win32 :: System :: Threading :: $fn( $( $arg, ) * ) }
57
- } } ;
58
- }
59
-
60
40
mod address {
61
41
use crate :: error:: { IoError , IoOperation } ;
62
42
use crate :: net:: socket:: Socket ;
@@ -73,6 +53,16 @@ mod address {
73
53
SOCKADDR_IN , SOCKADDR_IN6 , SOCKADDR_IN6_0 , SOCKADDR_STORAGE , SOCKET_ERROR ,
74
54
} ;
75
55
56
+ /// Execute a `Win32::NetworkManagement::IpHelper` syscall.
57
+ ///
58
+ /// The raw result of the syscall is returned.
59
+ macro_rules! syscall_ip_helper {
60
+ ( $fn: ident ( $( $arg: expr) ,* $( , ) * ) ) => { {
61
+ #[ allow( unsafe_code) ]
62
+ unsafe { windows_sys:: Win32 :: NetworkManagement :: IpHelper :: $fn( $( $arg, ) * ) }
63
+ } } ;
64
+ }
65
+
76
66
/// NOTE under Windows, we cannot use a bind connect/getsockname as "If the socket
77
67
/// is using a connectionless protocol, the address may not be available until I/O
78
68
/// occurs on the socket." We use `SIO_ROUTING_INTERFACE_QUERY` instead.
@@ -381,6 +371,16 @@ mod socket {
381
371
} ;
382
372
use windows_sys:: Win32 :: System :: IO :: OVERLAPPED ;
383
373
374
+ /// Execute a `Win32::System::Threading` syscall.
375
+ ///
376
+ /// The raw result of the syscall is returned.
377
+ macro_rules! syscall_threading {
378
+ ( $fn: ident ( $( $arg: expr) ,* $( , ) * ) ) => { {
379
+ #[ allow( unsafe_code) ]
380
+ unsafe { windows_sys:: Win32 :: System :: Threading :: $fn( $( $arg, ) * ) }
381
+ } } ;
382
+ }
383
+
384
384
#[ instrument( level = "trace" ) ]
385
385
pub fn startup ( ) -> crate :: error:: Result < ( ) > {
386
386
SocketImpl :: startup ( ) . map_err ( Error :: IoError )
0 commit comments