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
January 2005
----- 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
28 participants
703 discussions
Start a n
N
ew thread
[gdalsnes] 12924: add comments + small fix/change
by gdalsnes@svn.reactos.com
add comments + small fix/change Modified: trunk/reactos/include/pseh/prettybased.h _____ Modified: trunk/reactos/include/pseh/prettybased.h --- trunk/reactos/include/pseh/prettybased.h 2005-01-11 01:12:36 UTC (rev 12923) +++ trunk/reactos/include/pseh/prettybased.h 2005-01-11 01:47:35 UTC (rev 12924) @@ -39,8 +39,12 @@ to prevent variables from being optimized into registers. See:
http://alphalinux.org/archives/axp-list/1998/February1998/0330.html
+-you can't use return within a try/except/finally block +-you can't use __LEAVE within a (for/do/while) loop. it will only leave the loop +and not the try-block itself + USAGE: __TRY{ @@ -98,7 +102,7 @@ { _SEHPortableFrame_t SEH_Header; _SEHJmpBuf_t SEH_JmpBuf; -/* alternative: _SEHJmpBuf_t* SEH_JmpRetPtr; */ + _SEHJmpBuf_t* SEH_JmpRetPtr; } _SEHFrame_t; @@ -151,12 +155,8 @@ if(_SEHSetJmp(jmpRetBuf) == 0) { - _SEHLongJmp_KeepEsp(myframe->SEH_JmpBuf, (int)&jmpRetBuf); - - /* alternative: myframe->SEH_JmpRetPtr = &jmpRetBuf; _SEHLongJmp_KeepEsp(myframe->SEH_JmpBuf, 2); - */ } } @@ -259,10 +259,9 @@ #define ___ENDTRY \ } while (0); \ \ - if (_ret > 1) \ + if (_ret == 2) \ { \ - _SEHLongJmp(*((_SEHJmpBuf_t*)_ret), 1); \ - /* alternative: _SEHLongJmp(*_SEHFrame->SEH_JmpRetPtr, 1); */ \ + _SEHLongJmp(*_SEHFrame->SEH_JmpRetPtr, 1); \ } \ break; \ } \ @@ -282,6 +281,7 @@ #define __ENDTRY #define _SEH_STATIC_FILTER(ACTION_) (ACTION_) #define __LEAVE __leave + #define __LEAVE2 __leave #else #define __TRY2 ___TRY #define __EXCEPT2 ___EXCEPT_DUAL @@ -292,6 +292,7 @@ #define __FINALLY ___FINALLY_SINGLE #define __ENDTRY ___ENDTRY #define __LEAVE break + #define __LEAVE2 break #endif
19 years, 10 months
1
0
0
0
[gdalsnes] 12923: remove duplicate macro
by gdalsnes@svn.reactos.com
remove duplicate macro Modified: trunk/reactos/include/pseh/prettybased.h _____ Modified: trunk/reactos/include/pseh/prettybased.h --- trunk/reactos/include/pseh/prettybased.h 2005-01-10 23:11:45 UTC (rev 12922) +++ trunk/reactos/include/pseh/prettybased.h 2005-01-11 01:12:36 UTC (rev 12923) @@ -191,24 +191,6 @@ -#define ___END_DUAL \ - } while (0); \ - \ - if (_ret > 1) \ - { \ - _SEHLongJmp(*((_SEHJmpBuf_t*)_ret), 1); \ - /* alternative: _SEHLongJmp(*_SEHFrame->SEH_JmpRetPtr, 1); */ \ - } \ - break; \ - } \ - } \ - \ - } while (0); - - - - - #define ___EXCEPT_SINGLE(filter) \ } while(0); \ \ @@ -274,7 +256,7 @@ -#define ___END_SINGLE \ +#define ___ENDTRY \ } while (0); \ \ if (_ret > 1) \ @@ -304,11 +286,11 @@ #define __TRY2 ___TRY #define __EXCEPT2 ___EXCEPT_DUAL #define __FINALLY2 ___FINALLY_DUAL - #define __ENDTRY2 ___END_DUAL + #define __ENDTRY2 __ENDTRY #define __TRY ___TRY #define __EXCEPT ___EXCEPT_SINGLE #define __FINALLY ___FINALLY_SINGLE - #define __ENDTRY ___END_SINGLE + #define __ENDTRY ___ENDTRY #define __LEAVE break #endif
19 years, 10 months
1
0
0
0
[blight] 12922: Fix compilation without NDEBUG.
by blight@svn.reactos.com
Fix compilation without NDEBUG. Modified: trunk/reactos/subsys/win32k/ntuser/cursoricon.c Modified: trunk/reactos/subsys/win32k/ntuser/menu.c Modified: trunk/reactos/subsys/win32k/ntuser/msgqueue.c Modified: trunk/reactos/subsys/win32k/objects/gdiobj.c _____ Modified: trunk/reactos/subsys/win32k/ntuser/cursoricon.c --- trunk/reactos/subsys/win32k/ntuser/cursoricon.c 2005-01-10 21:32:18 UTC (rev 12921) +++ trunk/reactos/subsys/win32k/ntuser/cursoricon.c 2005-01-10 23:11:45 UTC (rev 12922) @@ -961,8 +961,6 @@ WinStaObject = IntGetWinStaObj(); if (WinStaObject == NULL) { - DPRINT("Validation of window station handle (0x%X) failed\n", - PROCESS_WINDOW_STATION()); return FALSE; } _____ Modified: trunk/reactos/subsys/win32k/ntuser/menu.c --- trunk/reactos/subsys/win32k/ntuser/menu.c 2005-01-10 21:32:18 UTC (rev 12921) +++ trunk/reactos/subsys/win32k/ntuser/menu.c 2005-01-10 23:11:45 UTC (rev 12922) @@ -1353,7 +1353,7 @@ if (!NT_SUCCESS(Status)) { DPRINT("Validation of window station handle (0x%X) failed\n", - PROCESS_WINDOW_STATION()); + PsGetCurrentProcess()->Win32WindowStation); SetLastNtError(Status); return (HMENU)0; } _____ Modified: trunk/reactos/subsys/win32k/ntuser/msgqueue.c --- trunk/reactos/subsys/win32k/ntuser/msgqueue.c 2005-01-10 21:32:18 UTC (rev 12921) +++ trunk/reactos/subsys/win32k/ntuser/msgqueue.c 2005-01-10 23:11:45 UTC (rev 12922) @@ -1679,7 +1679,7 @@ { Timer = CONTAINING_RECORD(MessageQueue->TimerListHead.Flink, TIMER_ENTRY, ListEntry); - DPRINT("Checking timer %p wnd %x expiry %I64d\n", Timer, Timer->wnd, + DPRINT("Checking timer %p wnd %x expiry %I64d\n", Timer, Timer->Wnd, Timer->ExpiryTime.QuadPart); EnumEntry = EnumEntry->Flink; if ((NULL == WndFilter || Timer->Wnd == WndFilter) && _____ Modified: trunk/reactos/subsys/win32k/objects/gdiobj.c --- trunk/reactos/subsys/win32k/objects/gdiobj.c 2005-01-10 21:32:18 UTC (rev 12921) +++ trunk/reactos/subsys/win32k/objects/gdiobj.c 2005-01-10 23:11:45 UTC (rev 12922) @@ -715,7 +715,7 @@ LONG ProcId; ULONG Index = RESERVE_ENTRIES_COUNT; - DPRINT("Starting CleanupForProcess prochandle %x Pid %d\n", Process, Pid); + DPRINT("Starting CleanupForProcess prochandle %x Pid %d\n", Process, Process->UniqueProcessId); CurrentProcess = PsGetCurrentProcess(); if (CurrentProcess != Process) { @@ -761,7 +761,7 @@ KeDetachProcess(); } - DPRINT("Completed cleanup for process %d\n", Pid); + DPRINT("Completed cleanup for process %d\n", Process->UniqueProcessId); return TRUE; }
19 years, 10 months
1
0
0
0
[mf] 12921: comment for _NO_ALPHABLEND in the makefile
by mf@svn.reactos.com
comment for _NO_ALPHABLEND in the makefile Modified: trunk/reactos/subsys/system/explorer/Makefile.MinGW Modified: trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp _____ Modified: trunk/reactos/subsys/system/explorer/Makefile.MinGW --- trunk/reactos/subsys/system/explorer/Makefile.MinGW 2005-01-10 21:20:06 UTC (rev 12920) +++ trunk/reactos/subsys/system/explorer/Makefile.MinGW 2005-01-10 21:32:18 UTC (rev 12921) @@ -8,6 +8,7 @@ CXX = g++ LINK = g++ +# -D_NO_ALPHABLEND for builds without msimg32.dll dependency CFLAGS = -DWIN32 -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DWINVER=0x0500 -fexceptions -Wall -I. RCFLAGS = -DWIN32 -D__WINDRES__ LFLAGS = -Wl,--subsystem,windows _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp --- trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp 2005-01-10 21:20:06 UTC (rev 12920) +++ trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp 2005-01-10 21:32:18 UTC (rev 12921) @@ -660,10 +660,12 @@ x += NOTIFYICON_DIST; } +#ifndef _NO_ALPHABLEND MemCanvas mem_dc; SelectedBitmap bmp(mem_dc, CreateCompatibleBitmap(canvas, NOTIFYICON_SIZE, NOTIFYICON_SIZE)); RECT rect = {0, 0, NOTIFYICON_SIZE, NOTIFYICON_SIZE}; BLENDFUNCTION blend = {AC_SRC_OVER, 0, 128, 0}; // 50 % visible +#endif for(NotifyIconSet::const_iterator it=_sorted_icons.begin(); it!=_sorted_icons.end(); ++it) { #ifndef _NO_ALPHABLEND
19 years, 10 months
1
0
0
0
[mf] 12920: _NO_ALPHABLEND compiler switch
by mf@svn.reactos.com
_NO_ALPHABLEND compiler switch Modified: trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp --- trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp 2005-01-10 19:44:47 UTC (rev 12919) +++ trunk/reactos/subsys/system/explorer/taskbar/traynotify.cpp 2005-01-10 21:20:06 UTC (rev 12920) @@ -635,9 +635,11 @@ UpdateWindow(_hwnd); } +#ifndef _NO_ALPHABLEND #ifdef _MSC_VER #pragma comment(lib, "msimg32") // for AlphaBlend() #endif +#endif void NotifyArea::Paint() { @@ -664,11 +666,13 @@ BLENDFUNCTION blend = {AC_SRC_OVER, 0, 128, 0}; // 50 % visible for(NotifyIconSet::const_iterator it=_sorted_icons.begin(); it!=_sorted_icons.end(); ++it) { +#ifndef _NO_ALPHABLEND if (it->_dwState & NIS_HIDDEN) { FillRect(mem_dc, &rect, GetSysColorBrush(COLOR_BTNFACE)); DrawIconEx(mem_dc, 0, 0, it->_hIcon, NOTIFYICON_SIZE, NOTIFYICON_SIZE, 0, 0, DI_NORMAL); AlphaBlend(canvas, x, y, NOTIFYICON_SIZE, NOTIFYICON_SIZE, mem_dc, 0, 0, NOTIFYICON_SIZE, NOTIFYICON_SIZE, blend); } else +#endif DrawIconEx(canvas, x, y, it->_hIcon, NOTIFYICON_SIZE, NOTIFYICON_SIZE, 0, 0, DI_NORMAL); x += NOTIFYICON_DIST;
19 years, 10 months
1
0
0
0
[robertk] 12919: changes for release of 0.2.5
by robertk@svn.reactos.com
changes for release of 0.2.5 Modified: branches/ros-branch-0_2_5/reactos/include/reactos/version.h _____ Modified: branches/ros-branch-0_2_5/reactos/include/reactos/version.h --- branches/ros-branch-0_2_5/reactos/include/reactos/version.h 2005-01-10 14:03:21 UTC (rev 12918) +++ branches/ros-branch-0_2_5/reactos/include/reactos/version.h 2005-01-10 19:44:47 UTC (rev 12919) @@ -1,4 +1,4 @@ -/* $Id: version.h,v 1.26.8.2 2004/12/29 09:24:21 gvg Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -22,7 +22,7 @@ #define KERNEL_VERSION_PATCH_LEVEL 5 /* KERNEL_VERSION_BUILD_TYPE is L"CVS", L"RC1", L"RC2" or L"RELEASE" */ -#define KERNEL_VERSION_BUILD_TYPE L"RC2" +#define KERNEL_VERSION_BUILD_TYPE L"RELEASE" #endif
19 years, 10 months
1
0
0
0
[royce] 12918: make sure parentElement is set properly for <xi:include> elements
by royce@svn.reactos.com
make sure parentElement is set properly for <xi:include> elements Modified: branches/xmlbuildsystem/reactos/tools/rbuild/XML.cpp _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/XML.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/XML.cpp 2005-01-10 10:10:49 UTC (rev 12917) +++ branches/xmlbuildsystem/reactos/tools/rbuild/XML.cpp 2005-01-10 14:03:21 UTC (rev 12918) @@ -709,6 +709,7 @@ return NULL; } // replace inclusion tree with the imported tree + e2->parentElement = e->parentElement; e2->name = e->name; e2->attributes = e->attributes; *parent_container = e2;
19 years, 10 months
1
0
0
0
[gvg] 12917: Sylvain Petreolle <spetreolle@yahoo.fr>:
by gvg@svn.reactos.com
Sylvain Petreolle <spetreolle(a)yahoo.fr>: Add French translation for timedate.cpl Added: trunk/reactos/lib/cpl/timedate/Fr.rc _____ Added: trunk/reactos/lib/cpl/timedate/Fr.rc --- trunk/reactos/lib/cpl/timedate/Fr.rc 2005-01-10 10:10:02 UTC (rev 12916) +++ trunk/reactos/lib/cpl/timedate/Fr.rc 2005-01-10 10:10:49 UTC (rev 12917) @@ -0,0 +1,42 @@ +LANGUAGE LANG_FRENCH, SUBLANG_DEFAULT + +IDD_DATETIMEPAGE DIALOGEX 0, 0, 252, 146 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Date && Heure" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "&Date", -1, 4, 2, 122, 125 + CONTROL "", IDC_DATEPICKER, "SysDateTimePick32", + DTS_SHORTDATEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, + 11, 17, 108, 12 + CONTROL "", IDC_MONTHCALENDAR, "SysMonthCal32", + WS_CHILD | WS_VISIBLE | WS_TABSTOP, + 11, 37, 108, 80 + GROUPBOX "&Heure", -1, 132, 2, 113, 125 + CONTROL "", IDC_TIMEPICKER, "SysDateTimePick32", + DTS_TIMEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, + 144, 17, 90, 12 + LTEXT "", IDC_TIMEZONE, 4, 136, 241, 8 +END + + +IDD_TIMEZONEPAGE DIALOGEX 0, 0, 252, 146 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Fuseau horaire" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, + CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + AUTOCHECKBOX "Ajuster automatiquement l'heure lors du &passage à l'heure d'été" + IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP +END + + +STRINGTABLE +BEGIN + IDS_CPLNAME "Date/Heure" + IDS_CPLDESCRIPTION "Change la date, l'heure et le fuseau horaire." + IDS_TIMEZONETEXT "Fuseau horaire actuel: %s" + IDS_TIMEZONEINVALID "Invalide" + IDS_TIMEZONEUNKNOWN "Inconnu" +END
19 years, 10 months
1
0
0
0
[gvg] 12916: Sylvain Petreolle <spetreolle@yahoo.fr>:
by gvg@svn.reactos.com
Sylvain Petreolle <spetreolle(a)yahoo.fr>: Add French translation for timedate.cpl Modified: trunk/reactos/lib/cpl/timedate/timedate.rc _____ Modified: trunk/reactos/lib/cpl/timedate/timedate.rc --- trunk/reactos/lib/cpl/timedate/timedate.rc 2005-01-10 04:43:05 UTC (rev 12915) +++ trunk/reactos/lib/cpl/timedate/timedate.rc 2005-01-10 10:10:02 UTC (rev 12916) @@ -17,6 +17,7 @@ IDC_CPLICON ICON "resources/applet.ico" +#include "De.rc" #include "En.rc" -#include "De.rc" +#include "Fr.rc"
19 years, 10 months
1
0
0
0
[arty] 12915: Added a work item to prevent stack overflow.
by arty@svn.reactos.com
Added a work item to prevent stack overflow. Modified: trunk/reactos/drivers/lib/ip/network/loopback.c _____ Modified: trunk/reactos/drivers/lib/ip/network/loopback.c --- trunk/reactos/drivers/lib/ip/network/loopback.c 2005-01-10 03:03:24 UTC (rev 12914) +++ trunk/reactos/drivers/lib/ip/network/loopback.c 2005-01-10 04:43:05 UTC (rev 12915) @@ -11,7 +11,108 @@ #include "precomp.h" PIP_INTERFACE Loopback = NULL; +typedef struct _LAN_WQ_ITEM { + LIST_ENTRY ListEntry; + PNDIS_PACKET Packet; + PLAN_ADAPTER Adapter; + UINT BytesTransferred; +} LAN_WQ_ITEM, *PLAN_WQ_ITEM; +/* Work around being called back into afd at Dpc level */ +KSPIN_LOCK LoopWorkLock; +LIST_ENTRY LoopWorkList; +WORK_QUEUE_ITEM LoopWorkItem; +BOOLEAN LoopReceiveWorkerBusy = FALSE; + +VOID STDCALL LoopReceiveWorker( PVOID Context ) { + PLIST_ENTRY ListEntry; + PLAN_WQ_ITEM WorkItem; + PNDIS_PACKET Packet; + PLAN_ADAPTER Adapter; + UINT BytesTransferred; + PNDIS_BUFFER NdisBuffer; + IP_PACKET IPPacket; + + TI_DbgPrint(DEBUG_DATALINK, ("Called.\n")); + + while( (ListEntry = + ExInterlockedRemoveHeadList( &LoopWorkList, &LoopWorkLock )) ) { + WorkItem = CONTAINING_RECORD(ListEntry, LAN_WQ_ITEM, ListEntry); + + TI_DbgPrint(DEBUG_DATALINK, ("WorkItem: %x\n", WorkItem)); + + Packet = WorkItem->Packet; + Adapter = WorkItem->Adapter; + BytesTransferred = WorkItem->BytesTransferred; + + ExFreePool( WorkItem ); + + IPPacket.NdisPacket = Packet; + + TI_DbgPrint(DEBUG_DATALINK, ("Packet %x Adapter %x Trans %x\n", + Packet, Adapter, BytesTransferred)); + + NdisGetFirstBufferFromPacket(Packet, + &NdisBuffer, + &IPPacket.Header, + &IPPacket.ContigSize, + &IPPacket.TotalSize); + + IPPacket.ContigSize = IPPacket.TotalSize = BytesTransferred; + /* Determine which upper layer protocol that should receive + this packet and pass it to the correct receive handler */ + + TI_DbgPrint(MID_TRACE, + ("ContigSize: %d, TotalSize: %d, BytesTransferred: %d\n", + IPPacket.ContigSize, IPPacket.TotalSize, + BytesTransferred)); + + IPPacket.Position = 0; + + IPReceive(Loopback, &IPPacket); + + FreeNdisPacket( Packet ); + } + TI_DbgPrint(DEBUG_DATALINK, ("Leaving\n")); + LoopReceiveWorkerBusy = FALSE; +} + +VOID LoopSubmitReceiveWork( + NDIS_HANDLE BindingContext, + PNDIS_PACKET Packet, + NDIS_STATUS Status, + UINT BytesTransferred) { + PLAN_WQ_ITEM WQItem; + PLAN_ADAPTER Adapter = (PLAN_ADAPTER)BindingContext; + KIRQL OldIrql; + + TcpipAcquireSpinLock( &LoopWorkLock, &OldIrql ); + + WQItem = ExAllocatePool( NonPagedPool, sizeof(LAN_WQ_ITEM) ); + if( !WQItem ) { + TcpipReleaseSpinLock( &LoopWorkLock, OldIrql ); + return; + } + + WQItem->Packet = Packet; + WQItem->Adapter = Adapter; + WQItem->BytesTransferred = BytesTransferred; + InsertTailList( &LoopWorkList, &WQItem->ListEntry ); + + TI_DbgPrint(DEBUG_DATALINK, ("Packet %x Adapter %x BytesTrans %x\n", + Packet, Adapter, BytesTransferred)); + + if( !LoopReceiveWorkerBusy ) { + LoopReceiveWorkerBusy = TRUE; + ExQueueWorkItem( &LoopWorkItem, CriticalWorkQueue ); + TI_DbgPrint(DEBUG_DATALINK, + ("Work item inserted %x %x\n", &LoopWorkItem, WQItem)); + } else { + DbgPrint("LOOP WORKER BUSY %x %x\n", &LoopWorkItem, WQItem); + } + TcpipReleaseSpinLock( &LoopWorkLock, OldIrql ); +} + VOID LoopTransmit( PVOID Context, PNDIS_PACKET NdisPacket, @@ -28,30 +129,31 @@ * Type = LAN protocol type (unused) */ { - IP_PACKET IPPacket; + PCHAR PacketBuffer; + UINT PacketLength; + PNDIS_PACKET XmitPacket; + NDIS_STATUS NdisStatus; - ASSERT_KM_POINTER(NdisPacket); - ASSERT_KM_POINTER(PC(NdisPacket)); - ASSERT_KM_POINTER(PC(NdisPacket)->DLComplete); + ASSERT_KM_POINTER(NdisPacket); + ASSERT_KM_POINTER(PC(NdisPacket)); + ASSERT_KM_POINTER(PC(NdisPacket)->DLComplete); + + TI_DbgPrint(MAX_TRACE, ("Called (NdisPacket = %x)\n", NdisPacket)); - TI_DbgPrint(MAX_TRACE, ("Called (NdisPacket = %x)\n", NdisPacket)); + GetDataPtr( NdisPacket, MaxLLHeaderSize, &PacketBuffer, &PacketLength ); - IPPacket.NdisPacket = NdisPacket; - IPPacket.HeaderSize = 0; - GetDataPtr( NdisPacket, 0, (PCHAR *)&IPPacket.Header, &IPPacket.TotalSize ); - IPPacket.Header += Offset; - IPPacket.ContigSize = IPPacket.TotalSize; - IPPacket.Position = Offset; + NdisStatus = AllocatePacketWithBuffer + ( &XmitPacket, PacketBuffer, PacketLength ); - TI_DbgPrint(MAX_TRACE, - ("Doing receive (complete: %x, context %x, packet %x)\n", - PC(NdisPacket)->DLComplete, Context, NdisPacket)); - IPReceive(Context, &IPPacket); - TI_DbgPrint(MAX_TRACE, - ("Finished receive (complete: %x, context %x, packet %x)\n", - PC(NdisPacket)->DLComplete, Context, NdisPacket)); - PC(NdisPacket)->DLComplete(PC(NdisPacket)->Context, NdisPacket, NDIS_STATUS_SUCCESS); - TI_DbgPrint(MAX_TRACE, ("Done\n")); + if( NT_SUCCESS(NdisStatus) ) { + LoopSubmitReceiveWork + ( NULL, XmitPacket, STATUS_SUCCESS, PacketLength ); + } + + (PC(NdisPacket)->DLComplete) + ( PC(NdisPacket)->Context, NdisPacket, STATUS_SUCCESS ); + + TI_DbgPrint(MAX_TRACE, ("Done\n")); } NDIS_STATUS LoopRegisterAdapter( @@ -73,6 +175,9 @@ TI_DbgPrint(MID_TRACE, ("Called.\n")); + InitializeListHead( &LoopWorkList ); + ExInitializeWorkItem( &LoopWorkItem, LoopReceiveWorker, NULL ); + /* Bind the adapter to network (IP) layer */ BindInfo.Context = NULL; BindInfo.HeaderSize = 0;
19 years, 10 months
1
0
0
0
← Newer
1
...
43
44
45
46
47
48
49
...
71
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200