ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2011
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
18 participants
498 discussions
Start a n
N
ew thread
[cgutman] 53141: [AFD] - Fix shutdown(SD_RECEIVE) so it no longer brings down the entire connection
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Aug 8 21:23:24 2011 New Revision: 53141 URL:
http://svn.reactos.org/svn/reactos?rev=53141&view=rev
Log: [AFD] - Fix shutdown(SD_RECEIVE) so it no longer brings down the entire connection Modified: trunk/reactos/drivers/network/afd/afd/main.c Modified: trunk/reactos/drivers/network/afd/afd/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/ma…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] Mon Aug 8 21:23:24 2011 @@ -670,7 +670,7 @@ PAFD_FCB FCB = FileObject->FsContext; PAFD_DISCONNECT_INFO DisReq; NTSTATUS Status = STATUS_SUCCESS; - USHORT Flags = 0; + USHORT Flags; PLIST_ENTRY CurrentEntry; PIRP CurrentIrp; @@ -680,11 +680,38 @@ return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0 ); - if( DisReq->DisconnectType & AFD_DISCONNECT_SEND ) - Flags |= TDI_DISCONNECT_RELEASE; - if( DisReq->DisconnectType & AFD_DISCONNECT_RECV || - DisReq->DisconnectType & AFD_DISCONNECT_ABORT ) - Flags |= TDI_DISCONNECT_ABORT; + /* Shutdown(SD_SEND) */ + if ((DisReq->DisconnectType & AFD_DISCONNECT_SEND) && + !(DisReq->DisconnectType & AFD_DISCONNECT_RECV)) + { + /* Perform a controlled disconnect */ + Flags = TDI_DISCONNECT_RELEASE; + } + /* Shutdown(SD_RECEIVE) */ + else if (DisReq->DisconnectType & AFD_DISCONNECT_RECV) + { + /* Mark that we can't issue another receive request */ + FCB->TdiReceiveClosed = TRUE; + + /* Discard any pending data */ + FCB->Recv.Content = 0; + FCB->Recv.BytesUsed = 0; + + /* Mark us as overread to complete future reads with an error */ + FCB->Overread = TRUE; + + /* Clear the receive event */ + FCB->PollState &= ~AFD_EVENT_RECEIVE; + + /* We're done (no need to tell the TDI transport driver) */ + return UnlockAndMaybeComplete( FCB, STATUS_SUCCESS, Irp, 0 ); + } + /* Shutdown(SD_BOTH) */ + else + { + /* Perform an abortive disconnect */ + Flags = TDI_DISCONNECT_ABORT; + } if (!(FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS)) {
13 years, 3 months
1
0
0
0
[tkreuzer] 53140: [LWIP] Fix msvc build
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Aug 8 21:04:33 2011 New Revision: 53140 URL:
http://svn.reactos.org/svn/reactos?rev=53140&view=rev
Log: [LWIP] Fix msvc build Modified: trunk/reactos/lib/drivers/lwip/src/rostcp.c Modified: trunk/reactos/lib/drivers/lwip/src/rostcp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/lwip/src/rostc…
============================================================================== --- trunk/reactos/lib/drivers/lwip/src/rostcp.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/lwip/src/rostcp.c [iso-8859-1] Mon Aug 8 21:04:33 2011 @@ -6,17 +6,17 @@ #include <debug.h> static const char * const tcp_state_str[] = { - "CLOSED", - "LISTEN", - "SYN_SENT", - "SYN_RCVD", - "ESTABLISHED", - "FIN_WAIT_1", - "FIN_WAIT_2", - "CLOSE_WAIT", - "CLOSING", - "LAST_ACK", - "TIME_WAIT" + "CLOSED", + "LISTEN", + "SYN_SENT", + "SYN_RCVD", + "ESTABLISHED", + "FIN_WAIT_1", + "FIN_WAIT_2", + "CLOSE_WAIT", + "CLOSING", + "LAST_ACK", + "TIME_WAIT" }; /* The way that lwIP does multi-threading is really not ideal for our purposes but @@ -39,7 +39,7 @@ PQUEUE_ENTRY qp = NULL; ReferenceObject(Connection); - + while (!IsListEmpty(&Connection->PacketQueue)) { Entry = RemoveHeadList(&Connection->PacketQueue); @@ -72,7 +72,7 @@ if (IsListEmpty(&Connection->PacketQueue)) return NULL; Entry = RemoveHeadList(&Connection->PacketQueue); - + qp = CONTAINING_RECORD(Entry, QUEUE_ENTRY, ListEntry); return qp; @@ -160,7 +160,7 @@ WaitForEventSafely(PRKEVENT Event) { PVOID WaitObjects[] = {Event, &TerminationEvent}; - + if (KeWaitForMultipleObjects(2, WaitObjects, WaitAny, @@ -186,9 +186,9 @@ { /* Make sure the socket didn't get closed */ if (!arg) return ERR_OK; - + TCPSendEventHandler(arg, space); - + return ERR_OK; } @@ -207,7 +207,7 @@ return ERR_OK; } - + if (p) { len = TCPRecvEventHandler(arg, p); @@ -222,11 +222,11 @@ else if (len != 0) { DbgPrint("UNTESTED CASE: NOT ALL DATA TAKEN! EXTRA DATA MAY BE LOST!\n"); - + tcp_recved(pcb, len); - + /* Possible memory leak of pbuf here? */ - + return ERR_OK; } else @@ -315,7 +315,7 @@ { struct lwip_callback_msg *msg = ExAllocateFromNPagedLookasideList(&MessageLookasideList); struct tcp_pcb *ret; - + if (msg) { KeInitializeEvent(&msg->Event, NotificationEvent, FALSE); @@ -327,12 +327,12 @@ ret = msg->Output.Socket.NewPcb; else ret = NULL; - + ExFreeToNPagedLookasideList(&MessageLookasideList, msg); - + return ret; } - + return NULL; } @@ -353,7 +353,7 @@ msg->Output.Bind.Error = tcp_bind((PTCP_PCB)msg->Input.Bind.Connection->SocketContext, msg->Input.Bind.IpAddress, ntohs(msg->Input.Bind.Port)); - + done: KeSetEvent(&msg->Event, IO_NO_INCREMENT, FALSE); } @@ -363,7 +363,7 @@ { struct lwip_callback_msg *msg; err_t ret; - + msg = ExAllocateFromNPagedLookasideList(&MessageLookasideList); if (msg) { @@ -371,19 +371,19 @@ msg->Input.Bind.Connection = Connection; msg->Input.Bind.IpAddress = ipaddr; msg->Input.Bind.Port = port; - + tcpip_callback_with_block(LibTCPBindCallback, msg, 1); - + if (WaitForEventSafely(&msg->Event)) ret = msg->Output.Bind.Error; else ret = ERR_CLSD; - + ExFreeToNPagedLookasideList(&MessageLookasideList, msg); - + return ret; } - + return ERR_MEM; } @@ -392,9 +392,9 @@ LibTCPListenCallback(void *arg) { struct lwip_callback_msg *msg = arg; - + ASSERT(msg); - + if (!msg->Input.Listen.Connection->SocketContext) { msg->Output.Listen.NewPcb = NULL; @@ -402,12 +402,12 @@ } msg->Output.Listen.NewPcb = tcp_listen_with_backlog((PTCP_PCB)msg->Input.Listen.Connection->SocketContext, msg->Input.Listen.Backlog); - + if (msg->Output.Listen.NewPcb) { tcp_accept(msg->Output.Listen.NewPcb, InternalAcceptEventHandler); } - + done: KeSetEvent(&msg->Event, IO_NO_INCREMENT, FALSE); } @@ -417,23 +417,23 @@ { struct lwip_callback_msg *msg; PTCP_PCB ret; - + msg = ExAllocateFromNPagedLookasideList(&MessageLookasideList); if (msg) { KeInitializeEvent(&msg->Event, NotificationEvent, FALSE); msg->Input.Listen.Connection = Connection; msg->Input.Listen.Backlog = backlog; - + tcpip_callback_with_block(LibTCPListenCallback, msg, 1); - + if (WaitForEventSafely(&msg->Event)) ret = msg->Output.Listen.NewPcb; else ret = NULL; - + ExFreeToNPagedLookasideList(&MessageLookasideList, msg); - + return ret; } @@ -445,21 +445,21 @@ LibTCPSendCallback(void *arg) { struct lwip_callback_msg *msg = arg; - + ASSERT(msg); - + if (!msg->Input.Send.Connection->SocketContext) { msg->Output.Send.Error = ERR_CLSD; goto done; } - + if (msg->Input.Send.Connection->SendShutdown) { msg->Output.Send.Error = ERR_CLSD; goto done; } - + msg->Output.Send.Error = tcp_write((PTCP_PCB)msg->Input.Send.Connection->SocketContext, msg->Input.Send.Data, msg->Input.Send.DataLength, @@ -471,10 +471,10 @@ } else if (msg->Output.Send.Error == ERR_OK) { - /* Queued successfully so try to send it */ + /* Queued successfully so try to send it */ tcp_output((PTCP_PCB)msg->Input.Send.Connection->SocketContext); } - + done: KeSetEvent(&msg->Event, IO_NO_INCREMENT, FALSE); } @@ -484,7 +484,7 @@ { err_t ret; struct lwip_callback_msg *msg; - + msg = ExAllocateFromNPagedLookasideList(&MessageLookasideList); if (msg) { @@ -492,19 +492,19 @@ msg->Input.Send.Connection = Connection; msg->Input.Send.Data = dataptr; msg->Input.Send.DataLength = len; - + if (safe) LibTCPSendCallback(msg); else tcpip_callback_with_block(LibTCPSendCallback, msg, 1); - + if (WaitForEventSafely(&msg->Event)) ret = msg->Output.Send.Error; else ret = ERR_CLSD; - + ExFreeToNPagedLookasideList(&MessageLookasideList, msg); - + return ret; } @@ -516,24 +516,25 @@ LibTCPConnectCallback(void *arg) { struct lwip_callback_msg *msg = arg; - + err_t Error; + ASSERT(arg); - + if (!msg->Input.Connect.Connection->SocketContext) { msg->Output.Connect.Error = ERR_CLSD; goto done; } - + tcp_recv((PTCP_PCB)msg->Input.Connect.Connection->SocketContext, InternalRecvEventHandler); tcp_sent((PTCP_PCB)msg->Input.Connect.Connection->SocketContext, InternalSendEventHandler); - err_t Error = tcp_connect((PTCP_PCB)msg->Input.Connect.Connection->SocketContext, - msg->Input.Connect.IpAddress, ntohs(msg->Input.Connect.Port), - InternalConnectEventHandler); + Error = tcp_connect((PTCP_PCB)msg->Input.Connect.Connection->SocketContext, + msg->Input.Connect.IpAddress, ntohs(msg->Input.Connect.Port), + InternalConnectEventHandler); msg->Output.Connect.Error = Error == ERR_OK ? ERR_INPROGRESS : Error; - + done: KeSetEvent(&msg->Event, IO_NO_INCREMENT, FALSE); } @@ -543,7 +544,7 @@ { struct lwip_callback_msg *msg; err_t ret; - + msg = ExAllocateFromNPagedLookasideList(&MessageLookasideList); if (msg) { @@ -551,21 +552,21 @@ msg->Input.Connect.Connection = Connection; msg->Input.Connect.IpAddress = ipaddr; msg->Input.Connect.Port = port; - + tcpip_callback_with_block(LibTCPConnectCallback, msg, 1); - + if (WaitForEventSafely(&msg->Event)) { ret = msg->Output.Connect.Error; } else ret = ERR_CLSD; - + ExFreeToNPagedLookasideList(&MessageLookasideList, msg); - + return ret; } - + return ERR_MEM; } @@ -597,11 +598,11 @@ { if (msg->Input.Shutdown.shut_rx) msg->Input.Shutdown.Connection->ReceiveShutdown = TRUE; - + if (msg->Input.Shutdown.shut_tx) msg->Input.Shutdown.Connection->SendShutdown = TRUE; } - + done: KeSetEvent(&msg->Event, IO_NO_INCREMENT, FALSE); } @@ -616,23 +617,23 @@ if (msg) { KeInitializeEvent(&msg->Event, NotificationEvent, FALSE); - + msg->Input.Shutdown.Connection = Connection; msg->Input.Shutdown.shut_rx = shut_rx; msg->Input.Shutdown.shut_tx = shut_tx; - + tcpip_callback_with_block(LibTCPShutdownCallback, msg, 1); - + if (WaitForEventSafely(&msg->Event)) ret = msg->Output.Shutdown.Error; else ret = ERR_CLSD; - + ExFreeToNPagedLookasideList(&MessageLookasideList, msg); - + return ret; } - + return ERR_MEM; } @@ -693,27 +694,27 @@ { err_t ret; struct lwip_callback_msg *msg; - + msg = ExAllocateFromNPagedLookasideList(&MessageLookasideList); if (msg) { KeInitializeEvent(&msg->Event, NotificationEvent, FALSE); - + msg->Input.Close.Connection = Connection; msg->Input.Close.Callback = callback; - + if (safe) LibTCPCloseCallback(msg); else tcpip_callback_with_block(LibTCPCloseCallback, msg, 1); - + if (WaitForEventSafely(&msg->Event)) ret = msg->Output.Close.Error; else ret = ERR_CLSD; - + ExFreeToNPagedLookasideList(&MessageLookasideList, msg); - + return ret; } @@ -724,13 +725,13 @@ LibTCPAccept(PTCP_PCB pcb, struct tcp_pcb *listen_pcb, void *arg) { ASSERT(arg); - + tcp_arg(pcb, NULL); tcp_recv(pcb, InternalRecvEventHandler); tcp_sent(pcb, InternalSendEventHandler); tcp_err(pcb, InternalErrorEventHandler); tcp_arg(pcb, arg); - + tcp_accepted(listen_pcb); } @@ -739,21 +740,21 @@ { if (!pcb) return ERR_CLSD; - + *ipaddr = pcb->local_ip; *port = pcb->local_port; - + return ERR_OK; } err_t LibTCPGetPeerName(PTCP_PCB pcb, struct ip_addr * const ipaddr, u16_t * const port) -{ +{ if (!pcb) return ERR_CLSD; - + *ipaddr = pcb->remote_ip; *port = pcb->remote_port; - + return ERR_OK; }
13 years, 3 months
1
0
0
0
[gadamopoulos] 53139: [win32k] - Add co_MsqSendMessageAsync in order to send asynchronous normal and internal messages - Use co_MsqSendMessageAsync to load and unload api hook module - This hopeful...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Mon Aug 8 13:31:33 2011 New Revision: 53139 URL:
http://svn.reactos.org/svn/reactos?rev=53139&view=rev
Log: [win32k] - Add co_MsqSendMessageAsync in order to send asynchronous normal and internal messages - Use co_MsqSendMessageAsync to load and unload api hook module - This hopefully fixes the last problems with api hooks implementation Modified: branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/include/msgqueue.h branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/ntuser/hook.c branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/ntuser/msgqueue.c Modified: branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/include/msgqueue.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/subsyst…
============================================================================== --- branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/include/msgqueue.h [iso-8859-1] (original) +++ branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/include/msgqueue.h [iso-8859-1] Mon Aug 8 13:31:33 2011 @@ -152,6 +152,18 @@ HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam, UINT uTimeout, BOOL Block, INT HookMessage, ULONG_PTR *uResult); + +BOOL FASTCALL +co_MsqSendMessageAsync(PTHREADINFO ptiReceiver, + HWND hwnd, + UINT Msg, + WPARAM wParam, + LPARAM lParam, + SENDASYNCPROC CompletionCallback, + ULONG_PTR CompletionCallbackContext, + BOOL HasPackedLParam, + INT HookMessage); + PUSER_MESSAGE FASTCALL MsqCreateMessage(LPMSG Msg); VOID FASTCALL Modified: branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/ntuser/hook.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/subsyst…
============================================================================== --- branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] (original) +++ branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] Mon Aug 8 13:31:33 2011 @@ -92,11 +92,10 @@ will receive the special purpose internal message. */ BOOL -IntHookModuleUnloaded(PDESKTOP pdesk, int iHookID, HHOOK hHook, BOOL Block) +IntHookModuleUnloaded(PDESKTOP pdesk, int iHookID, HHOOK hHook) { PTHREADINFO ptiCurrent; PLIST_ENTRY ListEntry; - ULONG_PTR Result; PPROCESSINFO ppiCsr; DPRINT1("IntHookModuleUnloaded: iHookID=%d\n", iHookID); @@ -117,15 +116,15 @@ if(ptiCurrent->ppi->W32PF_flags & W32PF_APIHOOKLOADED) { DPRINT("IntHookModuleUnloaded: sending message to PID %d, ppi=0x%x\n", PsGetProcessId(ptiCurrent->ppi->peProcess), ptiCurrent->ppi); - co_MsqSendMessage( ptiCurrent->MessageQueue, - 0, - iHookID, - TRUE, - (LPARAM)hHook, - 0, - Block, - MSQ_INJECTMODULE, - &Result); + co_MsqSendMessageAsync( ptiCurrent, + 0, + iHookID, + TRUE, + (LPARAM)hHook, + NULL, + 0, + FALSE, + MSQ_INJECTMODULE); } } ListEntry = ListEntry->Flink; @@ -151,7 +150,6 @@ HWND *List; PWND DesktopWindow, pwndCurrent; ULONG i; - ULONG_PTR Result; PPROCESSINFO ppiCsr; pti = PsGetCurrentThreadWin32Thread(); @@ -194,19 +192,15 @@ continue; } - co_MsqSendMessage( ptiCurrent->MessageQueue, - 0, - WH_APIHOOK, - FALSE, /* load the module */ - 0, - 0, - TRUE, - MSQ_INJECTMODULE, - &Result); - if(Result == FALSE) - { - DPRINT1("Failed to inject module to process %d\n", PsGetProcessId(ptiCurrent->ppi->peProcess)); - } + co_MsqSendMessageAsync( ptiCurrent, + 0, + WH_APIHOOK, + FALSE, /* load the module */ + 0, + NULL, + 0, + FALSE, + MSQ_INJECTMODULE); } ExFreePoolWithTag(List, USERTAG_WINDOWLIST); } @@ -243,7 +237,7 @@ ReleaseCapturedUnicodeString(&strUahInitFunc, UserMode); /* Notify all applications that the api hook module must be unloaded */ - return IntHookModuleUnloaded(pti->rpdesk, WH_APIHOOK, 0, TRUE); + return IntHookModuleUnloaded(pti->rpdesk, WH_APIHOOK, 0); } static Modified: branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/ntuser/msgqueue.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/subsyst…
============================================================================== --- branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] (original) +++ branches/GSoC_2011/ThemesSupport/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] Mon Aug 8 13:31:33 2011 @@ -1025,6 +1025,58 @@ } } +BOOL FASTCALL +co_MsqSendMessageAsync(PTHREADINFO ptiReceiver, + HWND hwnd, + UINT Msg, + WPARAM wParam, + LPARAM lParam, + SENDASYNCPROC CompletionCallback, + ULONG_PTR CompletionCallbackContext, + BOOL HasPackedLParam, + INT HookMessage) +{ + + PTHREADINFO ptiSender; + PUSER_SENT_MESSAGE Message; + + if(!(Message = ExAllocatePoolWithTag(NonPagedPool, sizeof(USER_SENT_MESSAGE), TAG_USRMSG))) + { + DPRINT1("MsqSendMessage(): Not enough memory to allocate a message"); + return FALSE; + } + + ptiSender = PsGetCurrentThreadWin32Thread(); + + IntReferenceMessageQueue(ptiReceiver->MessageQueue); + /* Take reference on this MessageQueue if its a callback. It will be released + when message is processed or removed from target hwnd MessageQueue */ + if (CompletionCallback) + IntReferenceMessageQueue(ptiSender->MessageQueue); + + Message->Msg.hwnd = hwnd; + Message->Msg.message = Msg; + Message->Msg.wParam = wParam; + Message->Msg.lParam = lParam; + Message->CompletionEvent = NULL; + Message->Result = 0; + Message->lResult = 0; + Message->SenderQueue = NULL; + Message->CallBackSenderQueue = ptiSender->MessageQueue; + Message->DispatchingListEntry.Flink = NULL; + Message->CompletionCallback = CompletionCallback; + Message->CompletionCallbackContext = CompletionCallbackContext; + Message->HookMessage = HookMessage; + Message->HasPackedLParam = HasPackedLParam; + Message->QS_Flags = QS_SENDMESSAGE; + + InsertTailList(&ptiReceiver->MessageQueue->SentMessagesListHead, &Message->ListEntry); + MsqWakeQueue(ptiReceiver->MessageQueue, QS_SENDMESSAGE, TRUE); + IntDereferenceMessageQueue(ptiReceiver->MessageQueue); + + return TRUE; +} + NTSTATUS FASTCALL co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue, HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam,
13 years, 3 months
1
0
0
0
[cgutman] 53138: [PCNET] - Remove excessive BREAKPOINT usage - Promote some DPRINTs to DPRINT1s
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Aug 8 12:06:26 2011 New Revision: 53138 URL:
http://svn.reactos.org/svn/reactos?rev=53138&view=rev
Log: [PCNET] - Remove excessive BREAKPOINT usage - Promote some DPRINTs to DPRINT1s Modified: trunk/reactos/drivers/network/dd/pcnet/pcnet.c trunk/reactos/drivers/network/dd/pcnet/pcnet.h Modified: trunk/reactos/drivers/network/dd/pcnet/pcnet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/dd/pcnet/p…
============================================================================== --- trunk/reactos/drivers/network/dd/pcnet/pcnet.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/dd/pcnet/pcnet.c [iso-8859-1] Mon Aug 8 12:06:26 2011 @@ -246,16 +246,14 @@ if(Status != 4) { Status = NDIS_STATUS_FAILURE; - DPRINT("NdisReadPciSlotInformation failed\n"); - BREAKPOINT; + DPRINT1("NdisReadPciSlotInformation failed\n"); return Status; } if(buf32 != PCI_ID) { Status = NDIS_STATUS_ADAPTER_NOT_FOUND; - DPRINT("card in slot isn't our: 0x%x\n", 0, buf32); - BREAKPOINT; + DPRINT1("card in slot isn't our: 0x%x\n", 0, buf32); return Status; } @@ -269,14 +267,13 @@ if(Status != 4) { Status = NDIS_STATUS_FAILURE; - DPRINT("NdisReadPciSlotInformation failed\n"); - BREAKPOINT; + DPRINT1("NdisReadPciSlotInformation failed\n"); return Status; } if(!buf32) { - DPRINT("No base i/o address set\n"); + DPRINT1("No base i/o address set\n"); return NDIS_STATUS_FAILURE; } @@ -291,7 +288,6 @@ { Status = NDIS_STATUS_FAILURE; DPRINT1("NdisReadPciSlotInformation failed\n"); - BREAKPOINT; return Status; } @@ -325,14 +321,12 @@ if(!Adapter->InitializationBlockVirt) { DPRINT1("insufficient resources\n"); - BREAKPOINT; return NDIS_STATUS_RESOURCES; } if(((ULONG)Adapter->InitializationBlockVirt & 0x00000003) != 0) { - DPRINT("address 0x%x not dword-aligned\n", Adapter->InitializationBlockVirt); - BREAKPOINT; + DPRINT1("address 0x%x not dword-aligned\n", Adapter->InitializationBlockVirt); return NDIS_STATUS_RESOURCES; } @@ -345,14 +339,12 @@ if(!Adapter->TransmitDescriptorRingVirt) { DPRINT1("insufficient resources\n"); - BREAKPOINT; return NDIS_STATUS_RESOURCES; } if(((ULONG)Adapter->TransmitDescriptorRingVirt & 0x00000003) != 0) { - DPRINT("address 0x%x not dword-aligned\n", Adapter->TransmitDescriptorRingVirt); - BREAKPOINT; + DPRINT1("address 0x%x not dword-aligned\n", Adapter->TransmitDescriptorRingVirt); return NDIS_STATUS_RESOURCES; } @@ -366,14 +358,12 @@ if(!Adapter->ReceiveDescriptorRingVirt) { DPRINT1("insufficient resources\n"); - BREAKPOINT; return NDIS_STATUS_RESOURCES; } if(((ULONG)Adapter->ReceiveDescriptorRingVirt & 0x00000003) != 0) { - DPRINT("address 0x%x not dword-aligned\n", Adapter->ReceiveDescriptorRingVirt); - BREAKPOINT; + DPRINT1("address 0x%x not dword-aligned\n", Adapter->ReceiveDescriptorRingVirt); return NDIS_STATUS_RESOURCES; } @@ -387,14 +377,12 @@ if(!Adapter->TransmitBufferPtrVirt) { DPRINT1("insufficient resources\n"); - BREAKPOINT; return NDIS_STATUS_RESOURCES; } if(((ULONG)Adapter->TransmitBufferPtrVirt & 0x00000003) != 0) { - DPRINT("address 0x%x not dword-aligned\n", Adapter->TransmitBufferPtrVirt); - BREAKPOINT; + DPRINT1("address 0x%x not dword-aligned\n", Adapter->TransmitBufferPtrVirt); return NDIS_STATUS_RESOURCES; } @@ -408,14 +396,12 @@ if(!Adapter->ReceiveBufferPtrVirt) { DPRINT1("insufficient resources\n"); - BREAKPOINT; return NDIS_STATUS_RESOURCES; } if(((ULONG)Adapter->ReceiveBufferPtrVirt & 0x00000003) != 0) { - DPRINT("address 0x%x not dword-aligned\n", Adapter->ReceiveBufferPtrVirt); - BREAKPOINT; + DPRINT1("address 0x%x not dword-aligned\n", Adapter->ReceiveBufferPtrVirt); return NDIS_STATUS_RESOURCES; } @@ -874,7 +860,6 @@ { Status = NDIS_STATUS_UNSUPPORTED_MEDIA; DPRINT1("unsupported media\n"); - BREAKPOINT; *OpenErrorStatus = Status; return Status; } @@ -887,7 +872,6 @@ { Status = NDIS_STATUS_RESOURCES; DPRINT1("Insufficient resources\n"); - BREAKPOINT; *OpenErrorStatus = Status; return Status; } @@ -907,7 +891,6 @@ { DPRINT1("MiQueryCard failed\n"); Status = NDIS_STATUS_ADAPTER_NOT_FOUND; - BREAKPOINT; break; } @@ -917,7 +900,6 @@ if(Status != NDIS_STATUS_SUCCESS) { DPRINT1("NdisMRegisterIoPortRange failed: 0x%x\n", Status); - BREAKPOINT break; } @@ -927,7 +909,6 @@ if(Status != NDIS_STATUS_SUCCESS) { DPRINT1("NdisMAllocateMapRegisters failed: 0x%x\n", Status); - BREAKPOINT break; } @@ -936,8 +917,7 @@ Adapter->InterruptVector, TRUE, TRUE, NdisInterruptLevelSensitive); if(Status != NDIS_STATUS_SUCCESS) { - DPRINT("NdisMRegisterInterrupt failed: 0x%x\n", Status); - BREAKPOINT + DPRINT1("NdisMRegisterInterrupt failed: 0x%x\n", Status); break; } @@ -948,8 +928,7 @@ if(Status != NDIS_STATUS_SUCCESS) { Status = NDIS_STATUS_RESOURCES; - DPRINT("MiAllocateSharedMemory failed", Status); - BREAKPOINT + DPRINT1("MiAllocateSharedMemory failed", Status); break; } Modified: trunk/reactos/drivers/network/dd/pcnet/pcnet.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/dd/pcnet/p…
============================================================================== --- trunk/reactos/drivers/network/dd/pcnet/pcnet.h [iso-8859-1] (original) +++ trunk/reactos/drivers/network/dd/pcnet/pcnet.h [iso-8859-1] Mon Aug 8 12:06:26 2011 @@ -153,11 +153,5 @@ /* Maximum number of interrupts handled per call to MiniportHandleInterrupt */ #define INTERRUPT_LIMIT 10 -#if DBG -#define BREAKPOINT DbgBreakPoint(); -#else -#define BREAKPOINT -#endif - /* memory pool tag */ #define PCNET_TAG 'tNcP'
13 years, 3 months
1
0
0
0
[akhaldi] 53137: [CMAKE] * Convert some macros to functions.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Aug 8 11:54:20 2011 New Revision: 53137 URL:
http://svn.reactos.org/svn/reactos?rev=53137&view=rev
Log: [CMAKE] * Convert some macros to functions. Modified: trunk/reactos/cmake/msvc.cmake Modified: trunk/reactos/cmake/msvc.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=53137…
============================================================================== --- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Mon Aug 8 11:54:20 2011 @@ -59,23 +59,23 @@ macro(add_pch _target_name _FILE) endmacro() -macro(set_entrypoint MODULE ENTRYPOINT) +function(set_entrypoint MODULE ENTRYPOINT) if(${ENTRYPOINT} STREQUAL "0") add_linkerflag(${MODULE} "/NOENTRY") else() add_linkerflag(${MODULE} "/ENTRY:${ENTRYPOINT}") endif() -endmacro() - -macro(set_subsystem MODULE SUBSYSTEM) +endfunction() + +function(set_subsystem MODULE SUBSYSTEM) add_linkerflag(${MODULE} "/subsystem:${SUBSYSTEM}") -endmacro() - -macro(set_image_base MODULE IMAGE_BASE) +endfunction() + +function(set_image_base MODULE IMAGE_BASE) add_linkerflag(${MODULE} "/BASE:${IMAGE_BASE}") -endmacro() - -macro(set_module_type MODULE TYPE) +endfunction() + +function(set_module_type MODULE TYPE) add_dependencies(${MODULE} psdk) if(${TYPE} MATCHES nativecui) set_subsystem(${MODULE} native) @@ -123,14 +123,14 @@ else() message(FATAL_ERROR "Unknown module type : ${TYPE}") endif() -endmacro() - -macro(set_rc_compiler) +endfunction() + +function(set_rc_compiler) # dummy, this workaround is only needed in mingw due to lack of RC support in cmake -endmacro() +endfunction() # Thanks MS for creating a stupid linker -macro(add_importlib_target _exports_file) +function(add_importlib_target _exports_file) get_filename_component(_name ${_exports_file} NAME_WE) get_target_property(_suffix ${_name} SUFFIX) if(${_suffix} STREQUAL "_suffix-NOTFOUND") @@ -174,14 +174,14 @@ DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib) add_dependencies(lib${_name} asm ${_dependencies}) -endmacro() +endfunction() macro(add_delay_importlibs MODULE) # TODO. For now forward to normal import libs add_importlibs(${MODULE} ${ARGN}) endmacro() -macro(spec2def _dllname _spec_file) +function(spec2def _dllname _spec_file) get_filename_component(_file ${_spec_file} NAME_WE) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file}.def ${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c @@ -189,7 +189,7 @@ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} native-spec2def) set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}.def ${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c PROPERTIES GENERATED TRUE) -endmacro() +endfunction() macro(macro_mc FILE) set(COMMAND_MC mc -r ${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc) @@ -200,7 +200,7 @@ #pseh workaround set(PSEH_LIB "pseh") -macro(CreateBootSectorTarget2 _target_name _asm_file _binary_file _base_address) +function(CreateBootSectorTarget2 _target_name _asm_file _binary_file _base_address) set(_object_file ${_binary_file}.obj) set(_temp_file ${_binary_file}.tmp) @@ -223,4 +223,4 @@ set_source_files_properties(${_object_file} ${_temp_file} ${_binary_file} PROPERTIES GENERATED TRUE) add_custom_target(${_target_name} ALL DEPENDS ${_binary_file}) -endmacro() +endfunction()
13 years, 3 months
1
0
0
0
[akhaldi] 53136: [CMAKE] * Convert some macros to functions.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Aug 8 11:45:34 2011 New Revision: 53136 URL:
http://svn.reactos.org/svn/reactos?rev=53136&view=rev
Log: [CMAKE] * Convert some macros to functions. Modified: trunk/reactos/cmake/gcc.cmake Modified: trunk/reactos/cmake/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=53136&…
============================================================================== --- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Mon Aug 8 11:45:34 2011 @@ -98,7 +98,7 @@ "<CMAKE_RC_COMPILER> -i <OBJECT> -J res -O coff -o <OBJECT>") # Optional 3rd parameter: stdcall stack bytes -macro(set_entrypoint MODULE ENTRYPOINT) +function(set_entrypoint MODULE ENTRYPOINT) if(${ENTRYPOINT} STREQUAL "0") add_linkerflag(${MODULE} "-Wl,-entry,0") elseif(ARCH MATCHES i386) @@ -110,17 +110,17 @@ else() add_linkerflag(${MODULE} "-Wl,-entry,${ENTRYPOINT}") endif() -endmacro() - -macro(set_subsystem MODULE SUBSYSTEM) +endfunction() + +function(set_subsystem MODULE SUBSYSTEM) add_linkerflag(${MODULE} "-Wl,--subsystem,${SUBSYSTEM}") -endmacro() - -macro(set_image_base MODULE IMAGE_BASE) +endfunction() + +function(set_image_base MODULE IMAGE_BASE) add_linkerflag(${MODULE} "-Wl,--image-base,${IMAGE_BASE}") -endmacro() - -macro(set_module_type MODULE TYPE) +endfunction() + +function(set_module_type MODULE TYPE) add_dependencies(${MODULE} psdk) if(${IS_CPP}) @@ -165,14 +165,14 @@ add_dependencies(${MODULE} bugcodes) elseif(${TYPE} MATCHES nativedll) set_subsystem(${MODULE} native) - set_entrypoint(${MODULE} DllMain 12) + set_entrypoint(${MODULE} DllMain 12) else() message(FATAL_ERROR "Unknown module type : ${TYPE}") endif() -endmacro() +endfunction() # Workaround lack of mingw RC support in cmake -macro(set_rc_compiler) +function(set_rc_compiler) get_directory_property(defines COMPILE_DEFINITIONS) get_directory_property(includes INCLUDE_DIRECTORIES) @@ -184,12 +184,12 @@ set(rc_result_incs "-I${arg} ${rc_result_incs}") endforeach() - #set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${rc_result_defs} ${rc_result_incs} -i <SOURCE> -O coff -o <OBJECT>") + #set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${rc_result_defs} ${rc_result_incs} -i <SOURCE> -O coff -o <OBJECT>" PARENT_SCOPE) set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_C_COMPILER> -DRC_INVOKED -D__WIN32__=1 -D__FLAT__=1 ${rc_result_defs} -I${CMAKE_CURRENT_SOURCE_DIR} ${rc_result_incs} -xc -E <SOURCE> -o <OBJECT>" "${WRC} -I${CMAKE_CURRENT_SOURCE_DIR} -i <OBJECT> -o <OBJECT>" - "<CMAKE_RC_COMPILER> -i <OBJECT> -J res -O coff -o <OBJECT>") -endmacro() + "<CMAKE_RC_COMPILER> -i <OBJECT> -J res -O coff -o <OBJECT>" PARENT_SCOPE) +endfunction() #idl files support set(IDL_COMPILER native-widl) @@ -200,19 +200,19 @@ set(IDL_FLAGS -m64 --win64) endif() -macro(add_delay_importlibs MODULE) +function(add_delay_importlibs MODULE) foreach(LIB ${ARGN}) target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}_delayed.a) add_dependencies(${MODULE} lib${LIB}_delayed) endforeach() target_link_libraries(${MODULE} delayimp) -endmacro() +endfunction() if(NOT ARCH MATCHES i386) set(DECO_OPTION "-@") endif() -macro(add_importlib_target _exports_file) +function(add_importlib_target _exports_file) get_filename_component(_name ${_exports_file} NAME_WE) get_filename_component(_extension ${_exports_file} EXT) @@ -265,9 +265,9 @@ lib${_name}_delayed DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_delayed.a) -endmacro() - -macro(spec2def _dllname _spec_file) +endfunction() + +function(spec2def _dllname _spec_file) get_filename_component(_file ${_spec_file} NAME_WE) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file}.def ${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c @@ -276,7 +276,7 @@ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}.def PROPERTIES GENERATED TRUE EXTERNAL_OBJECT TRUE) set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c PROPERTIES GENERATED TRUE) -endmacro() +endfunction() macro(macro_mc FILE) set(COMMAND_MC ${MINGW_PREFIX}windmc -A -b ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc -r ${REACTOS_BINARY_DIR}/include/reactos -h ${REACTOS_BINARY_DIR}/include/reactos) @@ -353,7 +353,7 @@ endmacro() endif() -macro(CreateBootSectorTarget _target_name _asm_file _object_file _base_address) +function(CreateBootSectorTarget _target_name _asm_file _object_file _base_address) get_filename_component(OBJECT_PATH ${_object_file} PATH) get_filename_component(OBJECT_NAME ${_object_file} NAME) file(MAKE_DIRECTORY ${OBJECT_PATH}) @@ -374,9 +374,9 @@ DEPENDS ${_asm_file}) set_source_files_properties(${_object_file} PROPERTIES GENERATED TRUE) add_custom_target(${_target_name} ALL DEPENDS ${_object_file}) -endmacro() - -macro(CreateBootSectorTarget2 _target_name _asm_file _binary_file _base_address) +endfunction() + +function(CreateBootSectorTarget2 _target_name _asm_file _binary_file _base_address) set(_object_file ${_binary_file}.o) add_custom_command( @@ -394,4 +394,4 @@ add_custom_target(${_target_name} ALL DEPENDS ${_binary_file}) -endmacro() +endfunction()
13 years, 3 months
1
0
0
0
[cmihail] 53135: [TCPIP] - Use lookaside lists for TDI_BUCKETs in accept.c too.
by cmihail@svn.reactos.org
Author: cmihail Date: Sun Aug 7 23:51:57 2011 New Revision: 53135 URL:
http://svn.reactos.org/svn/reactos?rev=53135&view=rev
Log: [TCPIP] - Use lookaside lists for TDI_BUCKETs in accept.c too. Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/accept.c Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/accept.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
============================================================================== --- branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/accept.c [iso-8859-1] (original) +++ branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/accept.c [iso-8859-1] Sun Aug 7 23:51:57 2011 @@ -11,6 +11,8 @@ #include "precomp.h" #include "rosip.h" + +extern NPAGED_LOOKASIDE_LIST TdiBucketLookasideList; NTSTATUS TCPCheckPeerForAccept(PVOID Context, PTDI_REQUEST_KERNEL Request) @@ -118,7 +120,7 @@ { DereferenceObject(Bucket->AssociatedEndpoint); RemoveEntryList( &Bucket->Entry ); - ExFreePoolWithTag( Bucket, TDI_BUCKET_TAG ); + ExFreeToNPagedLookasideList(&TdiBucketLookasideList, Bucket); Found = TRUE; break; } @@ -143,9 +145,7 @@ LockObject(Listener, &OldIrql); - Bucket = (PTDI_BUCKET)ExAllocatePoolWithTag(NonPagedPool, - sizeof(*Bucket), - TDI_BUCKET_TAG ); + Bucket = ExAllocateFromNPagedLookasideList(&TdiBucketLookasideList); if (Bucket) {
13 years, 3 months
1
0
0
0
[cmihail] 53134: [TCPIP] - Use lookaside lists for the TDI_BUCKET data when allocating. This should provide a speed boost.
by cmihail@svn.reactos.org
Author: cmihail Date: Sun Aug 7 23:41:51 2011 New Revision: 53134 URL:
http://svn.reactos.org/svn/reactos?rev=53134&view=rev
Log: [TCPIP] - Use lookaside lists for the TDI_BUCKET data when allocating. This should provide a speed boost. Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/event.c branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/event.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
============================================================================== --- branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] (original) +++ branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] Sun Aug 7 23:41:51 2011 @@ -30,6 +30,8 @@ "TIME_WAIT" }; +extern NPAGED_LOOKASIDE_LIST TdiBucketLookasideList; + static VOID BucketCompletionWorker(PVOID Context) @@ -43,7 +45,7 @@ DereferenceObject(Bucket->AssociatedEndpoint); - ExFreePoolWithTag(Bucket, TDI_BUCKET_TAG); + ExFreeToNPagedLookasideList(&TdiBucketLookasideList, Bucket); } VOID Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
============================================================================== --- branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] (original) +++ branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] Sun Aug 7 23:41:51 2011 @@ -23,6 +23,8 @@ #include "rosip.h" +NPAGED_LOOKASIDE_LIST TdiBucketLookasideList; + VOID NTAPI DisconnectTimeoutDpc(PKDPC Dpc, PVOID DeferredContext, @@ -85,8 +87,8 @@ PCONNECTION_ENDPOINT TCPAllocateConnectionEndpoint( PVOID ClientContext ) { PCONNECTION_ENDPOINT Connection = (PCONNECTION_ENDPOINT) - ExAllocatePoolWithTag(NonPagedPool, sizeof(CONNECTION_ENDPOINT), - CONN_ENDPT_TAG); + ExAllocatePoolWithTag(NonPagedPool, sizeof(CONNECTION_ENDPOINT), CONN_ENDPT_TAG); + if (!Connection) return Connection; @@ -196,6 +198,14 @@ { return Status; } + + ExInitializeNPagedLookasideList(&TdiBucketLookasideList, + NULL, + NULL, + 0, + sizeof(TDI_BUCKET), + TDI_BUCKET_TAG, + 0); /* Initialize our IP library */ LibIPInitialize(); @@ -218,6 +228,8 @@ { if (!TCPInitialized) return STATUS_SUCCESS; + + ExDeleteNPagedLookasideList(&TdiBucketLookasideList); LibIPShutdown(); @@ -348,7 +360,7 @@ { connaddr.addr = RemoteAddress.Address.IPv4Address; - Bucket = ExAllocatePoolWithTag( NonPagedPool, sizeof(*Bucket), TDI_BUCKET_TAG ); + Bucket = ExAllocateFromNPagedLookasideList(&TdiBucketLookasideList); if (!Bucket) { UnlockObject(Connection, OldIrql); @@ -418,13 +430,13 @@ } /* We couldn't complete the request now because we need to wait for outstanding I/O */ - Bucket = ExAllocatePoolWithTag(NonPagedPool, sizeof(*Bucket), TDI_BUCKET_TAG); + Bucket = ExAllocateFromNPagedLookasideList(&TdiBucketLookasideList); if (!Bucket) { UnlockObject(Connection, OldIrql); return STATUS_NO_MEMORY; } - + Bucket->Request.RequestNotifyObject = (PVOID)Complete; Bucket->Request.RequestContext = Context; @@ -487,7 +499,7 @@ { /* Freed in TCPSocketState */ - Bucket = ExAllocatePoolWithTag(NonPagedPool, sizeof(*Bucket), TDI_BUCKET_TAG); + Bucket = ExAllocateFromNPagedLookasideList(&TdiBucketLookasideList); if (!Bucket) { TI_DbgPrint(DEBUG_TCP,("[IP, TCPReceiveData] Failed to allocate bucket\n")); @@ -546,7 +558,7 @@ if (Status == STATUS_PENDING) { /* Freed in TCPSocketState */ - Bucket = ExAllocatePoolWithTag( NonPagedPool, sizeof(*Bucket), TDI_BUCKET_TAG ); + Bucket = ExAllocateFromNPagedLookasideList(&TdiBucketLookasideList); if (!Bucket) { UnlockObject(Connection, OldIrql); @@ -660,7 +672,7 @@ if( Bucket->Request.RequestContext == Irp ) { RemoveEntryList( &Bucket->Entry ); - ExFreePoolWithTag( Bucket, TDI_BUCKET_TAG ); + ExFreeToNPagedLookasideList(&TdiBucketLookasideList, Bucket); Found = TRUE; break; }
13 years, 3 months
1
0
0
0
[tkreuzer] 53133: [INTRIN] _mm_pause has an implicit full memory barrier, emulate this on gcc as well
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Aug 7 23:16:39 2011 New Revision: 53133 URL:
http://svn.reactos.org/svn/reactos?rev=53133&view=rev
Log: [INTRIN] _mm_pause has an implicit full memory barrier, emulate this on gcc as well Modified: trunk/reactos/include/crt/mingw32/intrin_x86.h Modified: trunk/reactos/include/crt/mingw32/intrin_x86.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/intrin…
============================================================================== --- trunk/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1] Sun Aug 7 23:16:39 2011 @@ -1497,7 +1497,7 @@ __INTRIN_INLINE void _mm_pause(void) { - __asm__ __volatile__("pause"); + __asm__ __volatile__("pause" : : : "memory"); } #ifdef __cplusplus
13 years, 3 months
1
0
0
0
[akhaldi] 53132: [CMAKE] * Convert add_importlibs to a function.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Aug 7 22:48:11 2011 New Revision: 53132 URL:
http://svn.reactos.org/svn/reactos?rev=53132&view=rev
Log: [CMAKE] * Convert add_importlibs to a function. Modified: trunk/reactos/cmake/CMakeMacros.cmake Modified: trunk/reactos/cmake/CMakeMacros.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/CMakeMacros.cmake?re…
============================================================================== --- trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] Sun Aug 7 22:48:11 2011 @@ -227,15 +227,15 @@ endmacro() endif() -macro(add_importlibs MODULE) - add_dependency_node(${MODULE}) +function(add_importlibs _module) + add_dependency_node(${_module}) foreach(LIB ${ARGN}) if ("${LIB}" MATCHES "msvcrt") add_definitions(-D_DLL -D__USE_CRTIMP) - target_link_libraries(${MODULE} msvcrtex) - endif() - target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}${CMAKE_STATIC_LIBRARY_SUFFIX}) - add_dependencies(${MODULE} lib${LIB}) - add_dependency_edge(${MODULE} ${LIB}) + target_link_libraries(${_module} msvcrtex) + endif() + target_link_libraries(${_module} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}${CMAKE_STATIC_LIBRARY_SUFFIX}) + add_dependencies(${_module} lib${LIB}) + add_dependency_edge(${_module} ${LIB}) endforeach() -endmacro() +endfunction()
13 years, 3 months
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
50
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Results per page:
10
25
50
100
200