On Jun 29, 2020, at 11:00 AM, Paul Gofman pgofman@codeweavers.com wrote:
On 6/29/20 18:51, Francois Gouget wrote:
Signed-off-by: Francois Gouget fgouget@free.fr
dlls/netio.sys/netio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/netio.sys/netio.c b/dlls/netio.sys/netio.c index 53d74f994db..fe73b06b978 100644 --- a/dlls/netio.sys/netio.c +++ b/dlls/netio.sys/netio.c @@ -605,7 +605,7 @@ static void WINAPI send_receive_callback(TP_CALLBACK_INSTANCE *instance, void *s unlock_socket(socket); }
-static NTSTATUS WINAPI do_send_receive(WSK_SOCKET *socket, WSK_BUF *wsk_buf, ULONG flags, IRP *irp, BOOL is_send) +static NTSTATUS do_send_receive(WSK_SOCKET *socket, WSK_BUF *wsk_buf, ULONG flags, IRP *irp, BOOL is_send) { struct wsk_socket_internal *s = wsk_socket_internal_from_wsk_socket(socket); struct wsk_pending_io *io;
I don't think it matters much, but is it really an improvement? If we call a single helper function from WINAPI function, which in turn calls just WINAPI functions, isn't it cleaner to keep the same calling ABI to potentially reduce the number of register saves?
For a static function, the compiler can choose a non-standard ABI for the function call, to potentially completely avoid register spill. I don't know if it does or not, but an explicit calling convention could prevent such optimizations. Best to let the compiler choose.
-Ken