File tree Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ impl<'e> EventLoop<'e> {
123123 let syscall_mask = <Syscall as Into < & str > >:: into ( syscall) . as_ptr ( ) as usize ;
124124 let token = thread_id as usize ^ syscall_mask;
125125 if Syscall :: nio ( ) != syscall {
126- eprintln ! ( "{syscall} {token }" ) ;
126+ eprintln ! ( "generate token:{token} for {syscall }" ) ;
127127 }
128128 token
129129 }
@@ -255,8 +255,7 @@ impl<'e> EventLoop<'e> {
255255 continue ;
256256 }
257257 // resolve completed read/write tasks
258- let result = cqe. result ( ) as c_longlong ;
259- eprintln ! ( "io_uring finish {token} {result}" ) ;
258+ let result = c_longlong:: from ( cqe. result ( ) ) ;
260259 if let Some ( ( _, pair) ) = self . syscall_wait_table . remove ( & token) {
261260 let ( lock, cvar) = & * pair;
262261 let mut pending = lock. lock ( ) . expect ( "lock failed" ) ;
Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ pub type UserFunc = extern "C" fn(usize) -> usize;
2323
2424mod selector;
2525
26- #[ allow( clippy:: cast_possible_truncation, clippy:: cast_sign_loss) ]
26+ #[ allow(
27+ clippy:: cast_possible_truncation,
28+ clippy:: cast_sign_loss,
29+ clippy:: too_many_arguments
30+ ) ]
2731#[ cfg( all( target_os = "linux" , feature = "io_uring" ) ) ]
2832mod operator;
2933
Original file line number Diff line number Diff line change 1- #[ allow( clippy:: too_many_arguments) ]
21#[ cfg( all( target_os = "linux" , feature = "io_uring" ) ) ]
32mod linux;
43#[ cfg( all( target_os = "linux" , feature = "io_uring" ) ) ]
Original file line number Diff line number Diff line change @@ -149,11 +149,11 @@ unsafe fn attach() -> std::io::Result<()> {
149149 // addresssize: usize,
150150 // dwmilliseconds: c_uint
151151 // ) -> BOOL);
152- // impl_hook!("ws2_32.dll", CONNECT, connect(
153- // fd: SOCKET,
154- // address: *const SOCKADDR,
155- // len: c_int
156- // ) -> c_int);
152+ impl_hook ! ( "ws2_32.dll" , CONNECT , connect(
153+ fd: SOCKET ,
154+ address: * const SOCKADDR ,
155+ len: c_int
156+ ) -> c_int) ;
157157 // Enable the hook
158158 minhook:: MinHook :: enable_all_hooks ( )
159159 . map_err ( |_| Error :: new ( ErrorKind :: Other , "init all hooks failed !" ) )
You can’t perform that action at this time.
0 commit comments