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
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
December 2008
----- 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
31 participants
710 discussions
Start a n
N
ew thread
[sginsberg] 38304: - Kill oskittcp warnings. Somewhat hacky? Yes indeed.
by sginsberg@svn.reactos.org
Author: sginsberg Date: Tue Dec 23 12:16:48 2008 New Revision: 38304 URL:
http://svn.reactos.org/svn/reactos?rev=38304&view=rev
Log: - Kill oskittcp warnings. Somewhat hacky? Yes indeed. Modified: trunk/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/queue.h trunk/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/systm.h trunk/reactos/lib/drivers/oskittcp/include/oskitfreebsd.h trunk/reactos/lib/drivers/oskittcp/oskittcp.rbuild trunk/reactos/lib/drivers/oskittcp/oskittcp/in_pcb.c trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c trunk/reactos/lib/drivers/oskittcp/oskittcp/ip_output.c trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_input.c Modified: trunk/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/queue.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/inclu…
============================================================================== --- trunk/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/queue.h [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/queue.h [iso-8859-1] Tue Dec 23 12:16:48 2008 @@ -98,10 +98,12 @@ struct type *slh_first; /* first element */ \ } +#if 0 #define SLIST_ENTRY(type) \ struct { \ struct type *sle_next; /* next element */ \ } +#endif /* * Singly-linked List functions. Modified: trunk/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/systm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/inclu…
============================================================================== --- trunk/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/systm.h [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/systm.h [iso-8859-1] Tue Dec 23 12:16:48 2008 @@ -132,7 +132,7 @@ static __inline int bsd_log ( int blah, const char* fmt, ... ) { va_list arg; - int i; + int i = 0; va_start(arg, fmt); #ifndef __NTDRIVER__ i = vprintf ( fmt, arg ); @@ -238,10 +238,14 @@ char **envv; }; int execve __P((struct proc *, struct execve_args *, int *retval)); + +#if 0 struct fork_args { int dummy; }; int fork __P((struct proc *, struct fork_args *, int retval[])); +#endif + struct sync_args { int dummy; }; Modified: trunk/reactos/lib/drivers/oskittcp/include/oskitfreebsd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/inclu…
============================================================================== --- trunk/reactos/lib/drivers/oskittcp/include/oskitfreebsd.h [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/oskittcp/include/oskitfreebsd.h [iso-8859-1] Tue Dec 23 12:16:48 2008 @@ -1,6 +1,8 @@ #ifndef _OSKITFREEBSD_H #define _OSKITFREEBSD_H +#undef PAGE_SIZE +#undef PAGE_SHIFT #include <ntddk.h> #ifdef linux Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
============================================================================== --- trunk/reactos/lib/drivers/oskittcp/oskittcp.rbuild [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/oskittcp/oskittcp.rbuild [iso-8859-1] Tue Dec 23 12:16:48 2008 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> -<module name="oskittcp" type="staticlibrary" allowwarnings="true"> +<module name="oskittcp" type="staticlibrary"> <define name="__NTDRIVER__"/> <define name="KERNEL"/> <define name="_DISABLE_TIDENTS"/> Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/in_pcb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
============================================================================== --- trunk/reactos/lib/drivers/oskittcp/oskittcp/in_pcb.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/oskittcp/oskittcp/in_pcb.c [iso-8859-1] Tue Dec 23 12:16:48 2008 @@ -102,7 +102,7 @@ OS_DbgPrint(OSK_MID_TRACE,("Called\n")); - if( nam ) OskitDumpBuffer( nam->m_data, nam->m_len ); + if( nam ) OskitDumpBuffer((OSK_PCHAR)nam->m_data, nam->m_len ); #ifndef __REACTOS__ if (in_ifaddr == 0) { Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
============================================================================== --- trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] Tue Dec 23 12:16:48 2008 @@ -35,12 +35,12 @@ void *fbsd_malloc( unsigned int bytes, char *file, unsigned line, ... ) { if( !OtcpEvent.TCPMalloc ) panic("no malloc"); return OtcpEvent.TCPMalloc - ( OtcpEvent.ClientData, (OSK_UINT)bytes, file, line ); + ( OtcpEvent.ClientData, (OSK_UINT)bytes, (OSK_PCHAR)file, line ); } void fbsd_free( void *data, char *file, unsigned line, ... ) { if( !OtcpEvent.TCPFree ) panic("no free"); - OtcpEvent.TCPFree( OtcpEvent.ClientData, data, file, line ); + OtcpEvent.TCPFree( OtcpEvent.ClientData, data, (OSK_PCHAR)file, line ); } void InitOskitTCP() { @@ -155,7 +155,7 @@ uio.uio_rw = UIO_READ; uio.uio_iovcnt = 1; iov.iov_len = Len; - iov.iov_base = Data; + iov.iov_base = (char *)Data; OS_DbgPrint(OSK_MID_TRACE,("Reading %d bytes from TCP:\n", Len)); @@ -260,7 +260,7 @@ struct iovec iov; iov.iov_len = Len; - iov.iov_base = Data; + iov.iov_base = (char *)Data; uio.uio_iov = &iov; uio.uio_iovcnt = 1; uio.uio_offset = 0; @@ -406,7 +406,7 @@ void OskitTCPReceiveDatagram( OSK_PCHAR Data, OSK_UINT Len, OSK_UINT IpHeaderLen ) { - struct mbuf *Ip = m_devget( Data, Len, 0, NULL, NULL ); + struct mbuf *Ip = m_devget( (char *)Data, Len, 0, NULL, NULL ); struct ip *iph; if( !Ip ) return; /* drop the segment */ Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/ip_output.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
============================================================================== --- trunk/reactos/lib/drivers/oskittcp/oskittcp/ip_output.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/oskittcp/oskittcp/ip_output.c [iso-8859-1] Tue Dec 23 12:16:48 2008 @@ -88,7 +88,7 @@ #endif register struct mbuf *m = m0; register int hlen = sizeof (struct ip); - int len, off, error = 0; + int len = 0, off, error = 0; /* * It might seem obvious at first glance that one could easily * make a one-behind cache out of this by simply making `iproute' @@ -108,7 +108,7 @@ */ struct route iproute; struct sockaddr_in *dst; - struct in_ifaddr *ia; + struct in_ifaddr *ia = NULL; #ifdef DIAGNOSTIC if ((m->m_flags & M_PKTHDR) == 0) @@ -380,7 +380,7 @@ m_copydata( m, 0, htons(ip->ip_len), new_m->m_data ); new_m->m_len = htons(ip->ip_len); error = OtcpEvent.PacketSend( OtcpEvent.ClientData, - new_m->m_data, new_m->m_len ); + (OSK_PCHAR)new_m->m_data, new_m->m_len ); m_free( new_m ); goto done; } @@ -520,7 +520,7 @@ m_copydata( m, 0, htons(ip->ip_len), new_m->m_data ); new_m->m_len = htons(ip->ip_len); error = OtcpEvent.PacketSend( OtcpEvent.ClientData, - new_m->m_data, new_m->m_len ); + (OSK_PCHAR)new_m->m_data, new_m->m_len ); m_free( new_m ); goto done; } Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_input.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
============================================================================== --- trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_input.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_input.c [iso-8859-1] Tue Dec 23 12:16:48 2008 @@ -486,7 +486,7 @@ * else do it below (after getting remote address). */ if (tp->t_state != TCPS_LISTEN) - tcp_dooptions(tp, optp, optlen, ti, &to); + tcp_dooptions(tp, (u_char *)optp, optlen, ti, &to); /* * Header prediction: check for the two common cases @@ -687,7 +687,7 @@ taop = &tao_noncached; bzero(taop, sizeof(*taop)); } - tcp_dooptions(tp, optp, optlen, ti, &to); + tcp_dooptions(tp, (u_char *)optp, optlen, ti, &to); if (iss) tp->iss = iss; else @@ -1974,7 +1974,7 @@ int offer; { register struct rtentry *rt; - struct ifnet *ifp; + struct ifnet *ifp = NULL; register int rtt, mss; u_long bufsize; struct inpcb *inp;
15 years, 9 months
1
0
0
0
[hyperion] 38303: modified include/reactos/libs/pseh/pseh2.h Actually support PSEH 2 on top of native syntax
by hyperion@svn.reactos.org
Author: hyperion Date: Tue Dec 23 12:12:21 2008 New Revision: 38303 URL:
http://svn.reactos.org/svn/reactos?rev=38303&view=rev
Log: modified include/reactos/libs/pseh/pseh2.h Actually support PSEH 2 on top of native syntax Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/pseh/…
============================================================================== --- trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] Tue Dec 23 12:12:21 2008 @@ -23,6 +23,7 @@ #ifndef KJK_PSEH2_H_ #define KJK_PSEH2_H_ +#if defined(__GNUC__) struct _EXCEPTION_RECORD; struct _EXCEPTION_POINTERS; struct _CONTEXT; @@ -72,8 +73,6 @@ #ifdef __cplusplus } #endif - -#if defined(__GNUC__) #if defined(__i386__) typedef struct __SEHTrampoline
15 years, 9 months
1
0
0
0
[sginsberg] 38302: - Silence ext2 FSD warnings. Also fix some bugs where the return status wasn't properly set. - 'allowwarnings=true' -- not anymore
by sginsberg@svn.reactos.org
Author: sginsberg Date: Tue Dec 23 11:43:25 2008 New Revision: 38302 URL:
http://svn.reactos.org/svn/reactos?rev=38302&view=rev
Log: - Silence ext2 FSD warnings. Also fix some bugs where the return status wasn't properly set. - 'allowwarnings=true' -- not anymore Modified: trunk/reactos/drivers/filesystems/ext2/ext2.rbuild trunk/reactos/drivers/filesystems/ext2/inc/protos.h trunk/reactos/drivers/filesystems/ext2/inc/struct.h trunk/reactos/drivers/filesystems/ext2/src/DiskIO.c trunk/reactos/drivers/filesystems/ext2/src/cleanup.c trunk/reactos/drivers/filesystems/ext2/src/close.c trunk/reactos/drivers/filesystems/ext2/src/create.c trunk/reactos/drivers/filesystems/ext2/src/dircntrl.c trunk/reactos/drivers/filesystems/ext2/src/ext2init.c trunk/reactos/drivers/filesystems/ext2/src/fastio.c trunk/reactos/drivers/filesystems/ext2/src/fileinfo.c trunk/reactos/drivers/filesystems/ext2/src/flush.c trunk/reactos/drivers/filesystems/ext2/src/fsctrl.c trunk/reactos/drivers/filesystems/ext2/src/io.c trunk/reactos/drivers/filesystems/ext2/src/metadata.c trunk/reactos/drivers/filesystems/ext2/src/misc.c trunk/reactos/drivers/filesystems/ext2/src/read.c trunk/reactos/drivers/filesystems/ext2/src/write.c Modified: trunk/reactos/drivers/filesystems/ext2/ext2.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/e…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/ext2.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/ext2.rbuild [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> -<module name="ext2fs" type="kernelmodedriver" installbase="system32/drivers" installname="ext2.sys" allowwarnings="true"> +<module name="ext2fs" type="kernelmodedriver" installbase="system32/drivers" installname="ext2.sys"> <bootstrap installbase="$(CDOUTPUT)" /> <include base="ext2fs">inc</include> <library>ntoskrnl</library> Modified: trunk/reactos/drivers/filesystems/ext2/inc/protos.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/i…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/inc/protos.h [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/inc/protos.h [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -548,7 +548,7 @@ extern BOOLEAN NTAPI Ext2FastIoUnlockAllByKey( IN PFILE_OBJECT FileObject, -PEPROCESS ProcessId, +PVOID ProcessId, ULONG Key, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject); Modified: trunk/reactos/drivers/filesystems/ext2/inc/struct.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/i…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/inc/struct.h [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/inc/struct.h [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -35,6 +35,7 @@ #define except(x) if (0 && (x)) #define finally if (1) #define GetExceptionInformation() 0 +#define GetExceptionCode() 0 // we will use the LARGE_INTEGER structure as defined by NT Modified: trunk/reactos/drivers/filesystems/ext2/src/DiskIO.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/DiskIO.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/DiskIO.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -168,7 +168,7 @@ { DebugTrace(DEBUG_TRACE_MISC, " !!!! Unable to create an IRP", 0 ); Status = STATUS_INSUFFICIENT_RESOURCES; - try_return( Status ); + try_return(); } // Modified: trunk/reactos/drivers/filesystems/ext2/src/cleanup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/cleanup.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/cleanup.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -140,7 +140,7 @@ { DebugTrace( DEBUG_TRACE_FILE_OBJ, "###### File Pointer 0x%LX [Cleanup]", PtrFileObject); } - try_return( RC ); + try_return(); } @@ -345,7 +345,7 @@ CompleteIrp = TRUE; } - try_return( RC ); + try_return(); try_exit: NOTHING; Modified: trunk/reactos/drivers/filesystems/ext2/src/close.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/close.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/close.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -142,7 +142,7 @@ { DebugTrace( DEBUG_TRACE_SPECIAL, "###### File Pointer 0x%LX [Close]", PtrFileObject); } - try_return( RC ); + try_return(); } // Get the FCB and CCB pointers @@ -400,7 +400,7 @@ DebugTrace(DEBUG_TRACE_MISC, "VCB Close Requested !!!", 0); CompleteIrp = TRUE; } - try_return( RC ); + try_return(); try_exit: NOTHING; Modified: trunk/reactos/drivers/filesystems/ext2/src/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/create.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/create.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -180,6 +180,9 @@ UNICODE_STRING AbsolutePathName; UNICODE_STRING RenameLinkTargetFileName; + /* Silence GCC warnings */ + RtlZeroMemory(&RelatedObjectName, sizeof(UNICODE_STRING)); + ASSERT(PtrIrpContext); ASSERT(PtrIrp); @@ -200,7 +203,7 @@ // Asynchronous processing required... RC = Ext2PostRequest(PtrIrpContext, PtrIrp); DeferredProcessing = TRUE; - try_return(RC); + try_return(); } // Obtaining the parameters specified by the user. @@ -259,7 +262,7 @@ if (PtrIrp->Overlay.AllocationSize.HighPart) { RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); } // Getting a pointer to the supplied security context @@ -324,7 +327,7 @@ // Verify Volume... // if (!NT_SUCCESS(RC = Ext2VerifyVolume(PtrVCB))) // { - // try_return(RC); + // try_return(); // } // If the volume has been locked, fail the request @@ -333,7 +336,7 @@ { DebugTrace(DEBUG_TRACE_MISC, "Volume locked. Failing Create", 0 ); RC = STATUS_ACCESS_DENIED; - try_return(RC); + try_return(); } @@ -348,34 +351,34 @@ if ((OpenTargetDirectory) || (PtrExtAttrBuffer)) { RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); } if (DirectoryOnlyRequested) { // a volume is not a directory RC = STATUS_NOT_A_DIRECTORY; - try_return(RC); + try_return(); } if ((RequestedDisposition != FILE_OPEN) && (RequestedDisposition != FILE_OPEN_IF)) { // cannot create a new volume, I'm afraid ... RC = STATUS_ACCESS_DENIED; - try_return(RC); + try_return(); } DebugTrace(DEBUG_TRACE_MISC, "Volume open requested", 0 ); RC = Ext2OpenVolume(PtrVCB, PtrIrpContext, PtrIrp, ShareAccess, PtrSecurityContext, PtrNewFileObject); ReturnedInformation = PtrIrp->IoStatus.Information; - try_return(RC); + try_return(); } if (OpenByFileId) { DebugTrace(DEBUG_TRACE_MISC, "Open by File Id requested", 0 ); RC = STATUS_ACCESS_DENIED; - try_return(RC); + try_return(); } // Relative path name specified... @@ -386,20 +389,20 @@ { // we must have a directory as the "related" object RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); } // Performing validity checks... if ((RelatedObjectName.Length == 0) || (RelatedObjectName.Buffer[0] != L'\\')) { RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); } if ((TargetObjectName.Length != 0) && (TargetObjectName.Buffer[0] == L'\\')) { RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); } // Creating an absolute path-name. @@ -408,7 +411,7 @@ if (!(AbsolutePathName.Buffer = Ext2AllocatePool(PagedPool, AbsolutePathName.MaximumLength ))) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return(RC); + try_return(); } RtlZeroMemory(AbsolutePathName.Buffer, AbsolutePathName.MaximumLength); @@ -429,14 +432,14 @@ if (TargetObjectName.Buffer[0] != L'\\') { RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); } { AbsolutePathName.MaximumLength = TargetObjectName.Length; if (!(AbsolutePathName.Buffer = Ext2AllocatePool(PagedPool, AbsolutePathName.MaximumLength ))) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return(RC); + try_return(); } RtlZeroMemory(AbsolutePathName.Buffer, AbsolutePathName.MaximumLength); @@ -456,12 +459,12 @@ (RequestedDisposition == FILE_OVERWRITE_IF)) { RC = STATUS_FILE_IS_A_DIRECTORY; - try_return(RC); + try_return(); } RC = Ext2OpenRootDirectory(PtrVCB, PtrIrpContext, PtrIrp, ShareAccess, PtrSecurityContext, PtrNewFileObject); DebugTrace(DEBUG_TRACE_MISC, " === Root directory opened", 0 ); - try_return(RC); + try_return(); } @@ -562,7 +565,7 @@ // Can have only a directory in the middle of the path... // RC = STATUS_OBJECT_PATH_NOT_FOUND; - try_return( RC ); + try_return(); } } else // searching on the disk... @@ -600,7 +603,7 @@ if( !CurrInodeNo ) { RC = STATUS_OBJECT_PATH_NOT_FOUND; - try_return( RC ); + try_return(); } // Set the allocation size for the object is specified //IoSetShareAccess(DesiredAccess, ShareAccess, PtrNewFileObject, &(PtrNewFCB->FCBShareAccess)); @@ -647,7 +650,7 @@ else { RC = STATUS_OBJECT_PATH_NOT_FOUND; - try_return( RC ); + try_return(); } } @@ -660,7 +663,7 @@ // Can have only a directory in the middle of the path... // RC = STATUS_OBJECT_PATH_NOT_FOUND; - try_return( RC ); + try_return(); } PtrCurrFileObject = NULL; @@ -681,7 +684,7 @@ { ReturnedInformation = FILE_EXISTS; RC = STATUS_OBJECT_NAME_COLLISION; - try_return(RC); + try_return(); } // Is this the type of file I was looking for? @@ -692,18 +695,18 @@ // Deny access! // Cannot open a special file... RC = STATUS_ACCESS_DENIED; - try_return( RC ); + try_return(); } if( DirectoryOnlyRequested && Type != EXT2_FT_DIR ) { RC = STATUS_NOT_A_DIRECTORY; - try_return( RC ); + try_return(); } if( FileOnlyRequested && Type == EXT2_FT_DIR ) { RC = STATUS_FILE_IS_A_DIRECTORY; - try_return(RC); + try_return(); } PtrCurrFileObject = PtrNewFileObject; @@ -733,7 +736,7 @@ PtrObjectName ) ) ) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return(RC); + try_return(); } if( Type == EXT2_FT_DIR ) @@ -781,7 +784,7 @@ (RequestedDisposition == FILE_OVERWRITE) || (RequestedDisposition == FILE_OVERWRITE_IF ))) { RC = STATUS_FILE_IS_A_DIRECTORY; - try_return(RC); + try_return(); } @@ -798,7 +801,7 @@ &(PtrNewFCB->FCBShareAccess), TRUE))) { // Ext2CloseCCB(PtrNewCCB); - try_return(RC); + try_return(); } } else @@ -1008,7 +1011,7 @@ if (!(PtrCCB = Ext2AllocateCCB())) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return(RC); + try_return(); } // initialize the CCB Modified: trunk/reactos/drivers/filesystems/ext2/src/dircntrl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/dircntrl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/dircntrl.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -429,7 +429,7 @@ { // Read Failure DebugTrace(DEBUG_TRACE_MISC, "Cache read failiure while reading in volume meta data", 0); - try_return( STATUS_ACCESS_DENIED ); + try_return( RC = STATUS_ACCESS_DENIED ); } else { @@ -694,11 +694,11 @@ case FileFullDirectoryInformation: // FullDirInformation-> DebugTrace(DEBUG_TRACE_DIRINFO, " === FileFullDirectoryInformation - Not handled", 0 ); - try_return( RC ); + try_return(); case FileNamesInformation: // NamesInformation-> DebugTrace(DEBUG_TRACE_DIRINFO, " === FileNamesInformation - Not handled", 0 ); - try_return( RC ); + try_return(); default: DebugTrace(DEBUG_TRACE_DIRINFO, " === Invalid Dir Info class - Not handled", 0 ); try_return( RC = STATUS_INVALID_INFO_CLASS ); @@ -719,7 +719,7 @@ RC = STATUS_NO_SUCH_FILE; else RC = STATUS_NO_MORE_FILES; - try_return( RC ); + try_return(); } else if( BytesReturned ) { Modified: trunk/reactos/drivers/filesystems/ext2/src/ext2init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/ext2init.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/ext2init.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -85,7 +85,7 @@ // in your commercial driver implementation, it would be // advisable for your driver to print an appropriate error // message to the system error log before leaving - // try_return(RC); + // try_return(); // } // we should have the registry data (if any), allocate zone memory ... @@ -98,7 +98,7 @@ if (!NT_SUCCESS(RC = Ext2InitializeZones())) { // we failed, print a message and leave ... - try_return(RC); + try_return(); } #endif @@ -143,7 +143,7 @@ &(Ext2GlobalData.Ext2DeviceObject)))) { // failed to create a device object, leave ... - try_return(RC); + try_return(); } Modified: trunk/reactos/drivers/filesystems/ext2/src/fastio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/fastio.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/fastio.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -593,7 +593,7 @@ *************************************************************************/ BOOLEAN NTAPI Ext2FastIoUnlockAllByKey( IN PFILE_OBJECT FileObject, -PEPROCESS ProcessId, +PVOID ProcessId, ULONG Key, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject) Modified: trunk/reactos/drivers/filesystems/ext2/src/fileinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/fileinfo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/fileinfo.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -144,7 +144,7 @@ { // This is not allowed. Caller must use get/set volume information instead. RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); } // ASSERT(PtrFCB->NodeIdentifier.NodeType == EXT2_NODE_TYPE_FCB); @@ -205,14 +205,14 @@ DebugTrace(DEBUG_TRACE_FILEINFO, "FileNetworkOpenInformation requested for %S", PtrFCB->FCBName->ObjectName.Buffer ); RC = Ext2GetNetworkOpenInformation(PtrFCB, (PFILE_NETWORK_OPEN_INFORMATION)PtrSystemBuffer, &BufferLength); // RC = STATUS_INVALID_PARAMETER; - // try_return(RC); + // try_return(); break; #endif // _WIN32_WINNT >= 0x0400 case FileInternalInformation: DebugTrace(DEBUG_TRACE_FILEINFO, "FileInternalInformation requested for %S", PtrFCB->FCBName->ObjectName.Buffer ); // RC = Ext2GetInternalInformation(...); RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); break; case FileEaInformation: DebugTrace(DEBUG_TRACE_FILEINFO, "FileEaInformation requested for %S", PtrFCB->FCBName->ObjectName.Buffer ); @@ -246,7 +246,7 @@ // RC = Ext2GetFileStreamInformation(...); RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); break; case FileAllInformation: @@ -274,11 +274,11 @@ if (!NT_SUCCESS(RC = Ext2GetBasicInformation(PtrFCB, (PFILE_BASIC_INFORMATION)&(PtrAllInfo->BasicInformation), &BufferLength))) { - try_return(RC); + try_return(); } if (!NT_SUCCESS(RC = Ext2GetStandardInformation(PtrFCB, &(PtrAllInfo->StandardInformation), &BufferLength))) { - try_return(RC); + try_return(); } // Similarly, get all of the others ... } @@ -291,19 +291,19 @@ case FileAlternateNameInformation: DebugTrace(DEBUG_TRACE_FILEINFO, "FileAlternateNameInformation requested for %S", PtrFCB->FCBName->ObjectName.Buffer ); RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); // RC = Ext2GetAltNameInformation(...); break; case FileCompressionInformation: DebugTrace(DEBUG_TRACE_FILEINFO, "FileCompressionInformation requested for %S", PtrFCB->FCBName->ObjectName.Buffer ); RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); // RC = Ext2GetCompressionInformation(...); break; default: RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); } // If we completed successfully, the return the amount of information transferred. @@ -409,7 +409,7 @@ DebugTrace(DEBUG_TRACE_FILEINFO, "Attempt to set FileEndOfFileInformation for %S", PtrFCB->FCBName->ObjectName.Buffer ); // RC = Ext2SetEOF(...); RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); break; case FilePositionInformation: @@ -449,7 +449,7 @@ case FileLinkInformation: DebugTrace(DEBUG_TRACE_FILEINFO, "Attempt to set FileLinkInformation for %S", PtrFCB->FCBName->ObjectName.Buffer ); RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); // When you implement your rename/link routine, be careful to // check the following two arguments: // TargetFileObject = PtrIoStackLocation->Parameters.SetFile.FileObject; @@ -484,7 +484,7 @@ default: DebugTrace(DEBUG_TRACE_FILEINFO, "Unrecoganised SetFileInformation code for %S", PtrFCB->FCBName->ObjectName.Buffer ); RC = STATUS_INVALID_PARAMETER; - try_return(RC); + try_return(); } } @@ -934,7 +934,7 @@ // "un-delete" the file. Ext2ClearFlag(PtrFCB->FCBFlags, EXT2_FCB_DELETE_ON_CLOSE); PtrFileObject->DeletePending = FALSE; - try_return(RC); + try_return(); } // Do some checking to see if the file can even be deleted. @@ -942,7 +942,7 @@ if (PtrFCB->FCBFlags & EXT2_FCB_DELETE_ON_CLOSE) { // All done! - try_return(RC); + try_return(); } if (PtrFCB->FCBFlags & EXT2_FCB_READ_ONLY) Modified: trunk/reactos/drivers/filesystems/ext2/src/flush.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/flush.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/flush.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -138,7 +138,7 @@ // If we cannot wait, post the request immediately since a flush is inherently blocking/synchronous. if (!CanWait) { PostRequest = TRUE; - try_return(RC); + try_return(); } // Check the type of object passed-in. That will determine the course of @@ -160,7 +160,7 @@ Ext2FlushLogicalVolume(PtrIrpContext, PtrIrp, PtrVCB); - try_return(RC); + try_return(); } if (!(PtrFCB->FCBFlags & EXT2_FCB_DIRECTORY)) Modified: trunk/reactos/drivers/filesystems/ext2/src/fsctrl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/fsctrl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/fsctrl.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -221,8 +221,6 @@ PEXT2_GROUP_DESCRIPTOR PtrGroupDescriptor = NULL; - PEXT2_INODE PtrInode = NULL; - // Inititalising variables PtrVPB = IrpSp->Parameters.MountVolume.Vpb; @@ -257,7 +255,7 @@ DebugTrace(DEBUG_TRACE_MOUNT, "OEM[%s]", BootSector->Oem); if (BootSector->Oem[0]) { - try_return (STATUS_WRONG_VOLUME); + try_return (Status = STATUS_WRONG_VOLUME); } // Allocating memory for reading in Super Block... @@ -299,7 +297,7 @@ (PDEVICE_OBJECT *)&PtrVolumeDeviceObject)) // The Volume Device Object ) { - try_return( Status ); + try_return(); } // @@ -444,7 +442,7 @@ PtrRootFileObject = IoCreateStreamFileObject(NULL, TargetDeviceObject ); if( !PtrRootFileObject ) { - try_return( Status ); + try_return(); } // // Associate the file stream with the Volume parameter block... @@ -473,7 +471,7 @@ PtrVCB, PtrObjectName ) ) ) { - try_return( Status ); + try_return(); } Modified: trunk/reactos/drivers/filesystems/ext2/src/io.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/io.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/io.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -76,7 +76,7 @@ if ( !PtrSyncEvent ) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return ( RC ); + try_return(); } KeInitializeEvent( PtrSyncEvent, SynchronizationEvent, FALSE ); } @@ -87,7 +87,7 @@ if ( !PtrIoContext ) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return ( RC ); + try_return(); } RtlZeroMemory( PtrIoContext, sizeof(EXT2_IO_CONTEXT) ); @@ -198,13 +198,13 @@ KeWaitForSingleObject( PtrSyncEvent, Executive, KernelMode, FALSE, (PLARGE_INTEGER)NULL ); DbgPrint("DEADLY WAIT DONE\n"); - try_return ( RC ); + try_return(); } else { // Asynchronous IO... RC = STATUS_PENDING; - try_return ( RC ); + try_return(); } try_exit: NOTHING; @@ -259,7 +259,7 @@ if ( !PtrSyncEvent ) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return ( RC ); + try_return(); } KeInitializeEvent( PtrSyncEvent, SynchronizationEvent, FALSE ); } @@ -271,7 +271,7 @@ if ( !PtrIoContext ) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return ( RC ); + try_return(); } RtlZeroMemory( PtrIoContext, sizeof(EXT2_IO_CONTEXT) ); Modified: trunk/reactos/drivers/filesystems/ext2/src/metadata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/metadata.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/metadata.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -83,7 +83,7 @@ DebugTrace(DEBUG_TRACE_MISC, "&&&&&& Invalid Inode no. Group no %d - too big", GroupNo ); DebugTrace(DEBUG_TRACE_MISC, "Only %d groups available on disk", PtrVcb->NoOfGroups ); RC = STATUS_UNSUCCESSFUL; - try_return( RC ); + try_return(); } //if( PtrVcb->InodeTableBlock[ GroupNo ] == 0 ) @@ -91,7 +91,7 @@ { DebugTrace(DEBUG_TRACE_MISC, "&&&&&& Inode Table Group Invalid - Group no %d ", GroupNo ); RC = STATUS_UNSUCCESSFUL; - try_return( RC ); + try_return(); } // Inode numbers start at 1 and not from 0 @@ -135,7 +135,7 @@ (PVOID*)&PtrPinnedReadBuffer )) { RC = STATUS_UNSUCCESSFUL; - try_return( RC ); + try_return(); } else { @@ -736,14 +736,14 @@ DebugTrace(DEBUG_TRACE_MISC, "&&&&&& Invalid Inode no. Group no %d - too big", GroupNo ); DebugTrace(DEBUG_TRACE_MISC, "Only %d groups available on disk", PtrVcb->NoOfGroups ); RC = STATUS_UNSUCCESSFUL; - try_return( RC ); + try_return(); } if( PtrVcb->PtrGroupDescriptors[ GroupNo ].InodeTablesBlock == 0 ) { DebugTrace(DEBUG_TRACE_MISC, "&&&&&& Inode Table Group Invalid - Group no %d ", GroupNo ); RC = STATUS_UNSUCCESSFUL; - try_return( RC ); + try_return(); } Index = ( InodeNo - 1 ) - ( GroupNo * PtrVcb->InodesPerGroup ); @@ -781,7 +781,7 @@ (PVOID*)&PtrPinnedBuffer ) ) { RC = STATUS_UNSUCCESSFUL; - try_return( RC ); + try_return(); } else { Modified: trunk/reactos/drivers/filesystems/ext2/src/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/misc.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/misc.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -92,27 +92,27 @@ // allocate memory for each of the zones and initialize the zones ... if (!(Ext2GlobalData.ObjectNameZone = Ext2AllocatePool(NonPagedPool, SizeOfObjectNameZone ))) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return(RC); + try_return(); } if (!(Ext2GlobalData.CCBZone = Ext2AllocatePool(NonPagedPool, SizeOfCCBZone ))) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return(RC); + try_return(); } if (!(Ext2GlobalData.FCBZone = Ext2AllocatePool(NonPagedPool, SizeOfFCBZone ))) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return(RC); + try_return(); } if (!(Ext2GlobalData.ByteLockZone = Ext2AllocatePool(NonPagedPool, SizeOfByteLockZone ))) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return(RC); + try_return(); } if (!(Ext2GlobalData.IrpContextZone = Ext2AllocatePool(NonPagedPool, SizeOfIrpContextZone ))) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return(RC); + try_return(); } // initialize each of the zone headers ... @@ -120,7 +120,7 @@ Ext2QuadAlign(sizeof(Ext2ObjectName)), Ext2GlobalData.ObjectNameZone, SizeOfObjectNameZone))) { // failed the initialization, leave ... - try_return(RC); + try_return(); } if (!NT_SUCCESS(RC = ExInitializeZone(&(Ext2GlobalData.CCBZoneHeader), @@ -128,7 +128,7 @@ Ext2GlobalData.CCBZone, SizeOfCCBZone))) { // failed the initialization, leave ... - try_return(RC); + try_return(); } if (!NT_SUCCESS(RC = ExInitializeZone(&(Ext2GlobalData.FCBZoneHeader), @@ -136,7 +136,7 @@ Ext2GlobalData.FCBZone, SizeOfFCBZone))) { // failed the initialization, leave ... - try_return(RC); + try_return(); } if (!NT_SUCCESS(RC = ExInitializeZone(&(Ext2GlobalData.ByteLockZoneHeader), @@ -144,7 +144,7 @@ Ext2GlobalData.ByteLockZone, SizeOfByteLockZone))) { // failed the initialization, leave ... - try_return(RC); + try_return(); } if (!NT_SUCCESS(RC = ExInitializeZone(&(Ext2GlobalData.IrpContextZoneHeader), @@ -152,7 +152,7 @@ Ext2GlobalData.IrpContextZone, SizeOfIrpContextZone))) { // failed the initialization, leave ... - try_return(RC); + try_return(); } try_exit: NOTHING; Modified: trunk/reactos/drivers/filesystems/ext2/src/read.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/read.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/read.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -255,7 +255,7 @@ if (ReadLength == 0) { // a 0 byte read can be immediately succeeded - try_return(RC); + try_return(); } // Is this a read of the volume itself ? @@ -320,7 +320,7 @@ { RC = STATUS_END_OF_FILE; NumberBytesRead = 0; - try_return( RC ); + try_return(); } } if( PagingIo || NonBufferedIo ) @@ -332,7 +332,7 @@ PtrIrpContext, PtrIrp, PtrVCB, ByteOffset, ReadLength, SynchronousIo); - try_return(RC); + try_return(); } else { @@ -357,7 +357,7 @@ RC = STATUS_UNSUCCESSFUL; NumberBytesRead = 0; - try_return( RC ); + try_return(); } else { @@ -367,7 +367,7 @@ PtrBCB = NULL; RC = STATUS_SUCCESS; NumberBytesRead = ReadLength; - try_return(RC); + try_return(); } } @@ -400,7 +400,7 @@ if ( ( PtrFCB->FCBFlags & EXT2_FCB_DIRECTORY ) && !PagingIo ) { RC = STATUS_INVALID_DEVICE_REQUEST; - try_return(RC); + try_return(); } PtrReqdFCB = &(PtrFCB->NTRequiredFCB); @@ -448,7 +448,7 @@ // If the flush failed, return error to the caller if (!NT_SUCCESS(RC = PtrIrp->IoStatus.Status)) { - try_return(RC); + try_return(); } } } @@ -573,7 +573,7 @@ NumberBytesRead = PtrIrp->IoStatus.Information; RC = PtrIrp->IoStatus.Status; - try_return(RC); + try_return(); } // This is a regular run-of-the-mill cached I/O request. Let the @@ -593,13 +593,13 @@ // Mark Irp Pending ... IoMarkIrpPending( PtrIrp ); RC = STATUS_PENDING; - try_return(RC); + try_return(); } // We have the data RC = PtrIrp->IoStatus.Status; NumberBytesRead = PtrIrp->IoStatus.Information; - try_return(RC); + try_return(); } else // NonBuffered or Paged IO { @@ -693,7 +693,7 @@ // Mark Irp Pending ... IoMarkIrpPending( PtrIrp ); RC = STATUS_PENDING; - try_return(RC); + try_return(); DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume meta data - Retrying", 0); } } @@ -732,7 +732,7 @@ // Mark Irp Pending ... IoMarkIrpPending( PtrIrp ); RC = STATUS_PENDING; - try_return(RC); + try_return(); DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume meta data - Retrying", 0); } @@ -839,7 +839,7 @@ // Mark Irp Pending ... IoMarkIrpPending( PtrIrp ); RC = STATUS_PENDING; - try_return(RC); + try_return(); DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume meta data - Retrying", 0); } @@ -1146,7 +1146,7 @@ { CompleteIrp = FALSE; } - try_return( RC ); + try_return(); } try_exit: NOTHING; @@ -1374,7 +1374,7 @@ if (!(PtrMdl = IoAllocateMdl(PtrIrp->UserBuffer, Length, FALSE, FALSE, PtrIrp))) { RC = STATUS_INSUFFICIENT_RESOURCES; - try_return(RC); + try_return(); } // Probe and lock the pages described by the MDL Modified: trunk/reactos/drivers/filesystems/ext2/src/write.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/write.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/write.c [iso-8859-1] Tue Dec 23 11:43:25 2008 @@ -241,7 +241,7 @@ if (WriteLength == 0) { // a 0 byte write can be immediately succeeded - try_return(RC); + try_return(); } // Is this a write of the volume itself ? @@ -310,14 +310,14 @@ // RC = STATUS_END_OF_FILE; NumberBytesWritten = 0; - try_return( RC ); + try_return(); } } // Lock the callers buffer if (!NT_SUCCESS(RC = Ext2LockCallersBuffer(PtrIrp, TRUE, WriteLength))) { - try_return(RC); + try_return(); } // Forward the request to the lower level driver @@ -337,7 +337,7 @@ PtrIrpContext, PtrIrp, PtrVCB, ByteOffset, WriteLength, SynchronousIo ); - try_return(RC); + try_return(); } else { @@ -375,7 +375,7 @@ // Go ahead and complete the IRP... } - try_return(RC); + try_return(); } @@ -433,7 +433,7 @@ // Nope... User initiated directory writes are not allowed! // Fail this request... RC = STATUS_INVALID_DEVICE_REQUEST; - try_return(RC); + try_return(); } } @@ -496,7 +496,7 @@ // If the flush failed, return error to the caller if (!NT_SUCCESS(RC = PtrIrp->IoStatus.Status)) { - try_return(RC); + try_return(); } // Attempt the purge and ignore the return code @@ -555,7 +555,7 @@ // Page request for writing outside the file... // No op this IRP by completing it... // - try_return(RC); + try_return(); } if( ByteOffset.QuadPart + WriteLength > PtrReqdFCB->CommonFCBHeader.AllocationSize.QuadPart ) @@ -688,7 +688,7 @@ NumberBytesWritten = PtrIrp->IoStatus.Information; RC = PtrIrp->IoStatus.Status; - try_return(RC); + try_return(); } // This is a regular run-of-the-mill cached I/O request. Let the @@ -781,7 +781,7 @@ Ext2DeallocateUnicodeString( &ErrorMessage ); RC = STATUS_INSUFFICIENT_RESOURCES; - try_return ( RC ); + try_return(); } if( ( ByteOffset.QuadPart + WriteLength ) > DirectBlockSize && @@ -813,7 +813,7 @@ // Mark Irp Pending ... IoMarkIrpPending( PtrIrp ); RC = STATUS_PENDING; - try_return(RC); + try_return(); DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume meta data", 0); } } @@ -852,7 +852,7 @@ // Mark Irp Pending ... IoMarkIrpPending( PtrIrp ); RC = STATUS_PENDING; - try_return(RC); + try_return(); DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume meta data - Retrying", 0); } @@ -944,7 +944,7 @@ // Mark Irp Pending ... IoMarkIrpPending( PtrIrp ); RC = STATUS_PENDING; - try_return(RC); + try_return(); DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume meta data - Retrying", 0); } @@ -1055,7 +1055,7 @@ // Mark Irp Pending ... IoMarkIrpPending( PtrIrp ); RC = STATUS_PENDING; - try_return(RC); + try_return(); DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume meta data - Retrying", 0); } @@ -1324,7 +1324,7 @@ { CompleteIrp = FALSE; } - try_return( RC ); + try_return(); } try_exit: NOTHING;
15 years, 9 months
1
0
0
0
[fireball] 38301: - Get back to using deprecated functions (because of linux...). - Disable warning 4996.
by fireball@svn.reactos.org
Author: fireball Date: Tue Dec 23 08:35:23 2008 New Revision: 38301 URL:
http://svn.reactos.org/svn/reactos?rev=38301&view=rev
Log: - Get back to using deprecated functions (because of linux...). - Disable warning 4996. Modified: trunk/reactos/tools/rbuild/automaticdependency.cpp trunk/reactos/tools/rbuild/backend/backend.cpp trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp trunk/reactos/tools/rbuild/compilationunit.cpp trunk/reactos/tools/rbuild/directory.cpp trunk/reactos/tools/rbuild/module.cpp trunk/reactos/tools/rbuild/pch.h trunk/reactos/tools/rbuild/rbuild.vcproj trunk/reactos/tools/rbuild/testsupportcode.cpp Modified: trunk/reactos/tools/rbuild/automaticdependency.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/automaticdepe…
============================================================================== --- trunk/reactos/tools/rbuild/automaticdependency.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/automaticdependency.cpp [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -60,7 +60,7 @@ if ( !f ) throw FileNotFoundException ( filename ); - if ( fstat ( _fileno ( f ), &statbuf ) != 0 ) + if ( fstat ( fileno ( f ), &statbuf ) != 0 ) { fclose ( f ); throw AccessDeniedException ( filename ); Modified: trunk/reactos/tools/rbuild/backend/backend.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/backe…
============================================================================== --- trunk/reactos/tools/rbuild/backend/backend.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/backend.cpp [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -32,7 +32,7 @@ Backend::Factory::Factory ( const std::string& name_, const std::string& description_ ) { string name(name_); - _strlwr ( &name[0] ); + strlwr ( &name[0] ); if ( !ref++ ) factories = new map<string,Factory*>; (*factories)[name] = this; @@ -55,7 +55,7 @@ Configuration& configuration ) { string sname ( name ); - _strlwr ( &sname[0] ); + strlwr ( &sname[0] ); if ( !factories || !factories->size () ) throw InvalidOperationException ( __FILE__, __LINE__, Modified: trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/codeb…
============================================================================== --- trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -268,7 +268,7 @@ string::size_type pos = file.find_last_of (sSep); if ( pos != string::npos ) file.erase ( 0, pos+1 ); - if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) ) + if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) file = ReplaceExtension ( file, ".res" ); else file = ReplaceExtension ( file, ".obj" ); @@ -429,7 +429,7 @@ string fullpath = files[i]->file.relative_path + sSep + files[i]->file.name; string file = string(".") + &fullpath[cbproj_path.size()]; - if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) ) + if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) resource_files.push_back ( file ); else source_files.push_back ( file ); Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -621,7 +621,7 @@ if ( !f ) throw FileNotFoundException ( NormalizeFilename ( xmlbuildfile.topIncludeFilename ) ); - if ( fstat ( _fileno ( f ), &statbuf ) != 0 ) + if ( fstat ( fileno ( f ), &statbuf ) != 0 ) { fclose ( f ); throw AccessDeniedException ( NormalizeFilename ( xmlbuildfile.topIncludeFilename ) ); @@ -1064,7 +1064,7 @@ { usePipe = (exitcode == 0); fclose ( f ); - _unlink ( pipe_detectionObjectFilename.c_str () ); + unlink ( pipe_detectionObjectFilename.c_str () ); } else usePipe = false; @@ -1097,7 +1097,7 @@ { use_pch = true; fclose ( f ); - _unlink ( path.c_str () ); + unlink ( path.c_str () ); } else use_pch = false; Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -63,7 +63,7 @@ GetTargetMacro ( const Module& module, bool with_dollar ) { string s ( module.name ); - _strupr ( &s[0] ); + strupr ( &s[0] ); s += "_TARGET"; if ( with_dollar ) return ssprintf ( "$(%s)", s.c_str() ); @@ -2399,13 +2399,13 @@ const char * crtAttr = module.CRT.c_str (); const char * crtLib = NULL; - if ( _stricmp ( crtAttr, "libc" ) == 0 ) + if ( stricmp ( crtAttr, "libc" ) == 0 ) crtLib = "crt"; - else if ( _stricmp ( crtAttr, "msvcrt" ) == 0 ) + else if ( stricmp ( crtAttr, "msvcrt" ) == 0 ) crtLib = "msvcrt"; - else if ( _stricmp ( crtAttr, "libcntpr" ) == 0 ) + else if ( stricmp ( crtAttr, "libcntpr" ) == 0 ) crtLib = "libcntpr"; - else if ( _stricmp ( crtAttr, "ntdll" ) == 0 ) + else if ( stricmp ( crtAttr, "ntdll" ) == 0 ) crtLib = "ntdll"; if ( crtLib ) Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -21,6 +21,7 @@ */ #ifdef _MSC_VER #pragma warning ( disable : 4786 ) +#pragma warning ( disable : 4996 ) #endif//_MSC_VER #include <iostream> @@ -340,7 +341,7 @@ string::size_type pos = file.find_last_of (DEF_SSEP); if ( pos != string::npos ) file.erase ( 0, pos+1 ); - if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) ) + if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) file = ReplaceExtension ( file, ".res" ); else file = ReplaceExtension ( file, ".obj" ); Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -108,11 +108,11 @@ string file = path + std::string("\\") + files[i]->file.name; source_files.push_back ( file ); - if ( !_stricmp ( Right(file,2).c_str(), ".c" ) ) + if ( !stricmp ( Right(file,2).c_str(), ".c" ) ) c_srcs.push_back ( file ); - if ( !_stricmp ( Right(file,2).c_str(), ".h" ) ) + if ( !stricmp ( Right(file,2).c_str(), ".h" ) ) header_files.push_back ( file ); - if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) ) + if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) resource_files.push_back ( file ); } const vector<Include*>& incs = data.includes; Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -159,9 +159,9 @@ module.output->relative_path ); string file = path + std::string("\\") + files[i]->file.name; - if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) ) + if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) resource_files.push_back ( file ); - else if ( !_stricmp ( Right(file,2).c_str(), ".h" ) ) + else if ( !stricmp ( Right(file,2).c_str(), ".h" ) ) header_files.push_back ( file ); else source_files.push_back ( file ); Modified: trunk/reactos/tools/rbuild/compilationunit.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/compilationun…
============================================================================== --- trunk/reactos/tools/rbuild/compilationunit.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/compilationunit.cpp [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -88,7 +88,7 @@ { const File& file = *files[i]; string fileExtension = GetExtension ( file.file ); - if ( !_stricmp ( fileExtension.c_str (), extension.c_str () ) ) + if ( !stricmp ( fileExtension.c_str (), extension.c_str () ) ) return true; } return false; Modified: trunk/reactos/tools/rbuild/directory.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/directory.cpp…
============================================================================== --- trunk/reactos/tools/rbuild/directory.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/directory.cpp [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -26,7 +26,7 @@ #endif//_MSC_VER #ifdef WIN32 -#define MKDIR(s) _mkdir(s) +#define MKDIR(s) mkdir(s) #else #define MKDIR(s) mkdir(s, 0755) #endif Modified: trunk/reactos/tools/rbuild/module.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
============================================================================== --- trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -238,9 +238,9 @@ if ( att != NULL ) { const char* p = att->value.c_str(); - if ( !_stricmp ( p, "true" ) || !_stricmp ( p, "yes" ) ) + if ( !stricmp ( p, "true" ) || !stricmp ( p, "yes" ) ) return true; - else if ( !_stricmp ( p, "false" ) || !_stricmp ( p, "no" ) ) + else if ( !stricmp ( p, "false" ) || !stricmp ( p, "no" ) ) return false; else { @@ -358,26 +358,26 @@ { CRT = att->value; - if ( _stricmp ( CRT.c_str (), "auto" ) == 0 ) + if ( stricmp ( CRT.c_str (), "auto" ) == 0 ) CRT = GetDefaultModuleCRT (); } else CRT = GetDefaultModuleCRT (); const char * crtAttr = CRT.c_str (); - if ( crtAttr == NULL || _stricmp ( crtAttr, "none" ) == 0 ) + if ( crtAttr == NULL || stricmp ( crtAttr, "none" ) == 0 ) dynamicCRT = false; - else if ( _stricmp ( crtAttr, "libc" ) == 0 ) + else if ( stricmp ( crtAttr, "libc" ) == 0 ) dynamicCRT = false; - else if ( _stricmp ( crtAttr, "msvcrt" ) == 0 ) + else if ( stricmp ( crtAttr, "msvcrt" ) == 0 ) dynamicCRT = true; - else if ( _stricmp ( crtAttr, "libcntpr" ) == 0 ) + else if ( stricmp ( crtAttr, "libcntpr" ) == 0 ) dynamicCRT = false; - else if ( _stricmp ( crtAttr, "ntdll" ) == 0 ) + else if ( stricmp ( crtAttr, "ntdll" ) == 0 ) dynamicCRT = true; - else if ( _stricmp ( crtAttr, "static" ) == 0 ) + else if ( stricmp ( crtAttr, "static" ) == 0 ) dynamicCRT = false; - else if ( _stricmp ( crtAttr, "dll" ) == 0 ) + else if ( stricmp ( crtAttr, "dll" ) == 0 ) dynamicCRT = true; else { @@ -609,9 +609,9 @@ const XMLAttribute* att = e.GetAttribute ( "first", false ); if ( att != NULL ) { - if ( !_stricmp ( att->value.c_str(), "true" ) ) + if ( !stricmp ( att->value.c_str(), "true" ) ) first = true; - else if ( _stricmp ( att->value.c_str(), "false" ) ) + else if ( stricmp ( att->value.c_str(), "false" ) ) { throw XMLInvalidBuildFileException ( e.location, @@ -626,11 +626,11 @@ { // check for c++ file string ext = GetExtension ( e.value ); - if ( !_stricmp ( ext.c_str(), ".cpp" ) ) + if ( !stricmp ( ext.c_str(), ".cpp" ) ) cplusplus = true; - else if ( !_stricmp ( ext.c_str(), ".cc" ) ) + else if ( !stricmp ( ext.c_str(), ".cc" ) ) cplusplus = true; - else if ( !_stricmp ( ext.c_str(), ".cxx" ) ) + else if ( !stricmp ( ext.c_str(), ".cxx" ) ) cplusplus = true; } File* pFile = new File ( directory, @@ -1857,9 +1857,9 @@ if ( att != NULL ) { const char* p = att->value.c_str(); - if ( !_stricmp ( p, "true" ) || !_stricmp ( p, "yes" ) ) + if ( !stricmp ( p, "true" ) || !stricmp ( p, "yes" ) ) isInternal = true; - else if ( !_stricmp ( p, "false" ) || !_stricmp ( p, "no" ) ) + else if ( !stricmp ( p, "false" ) || !stricmp ( p, "no" ) ) isInternal = false; else { Modified: trunk/reactos/tools/rbuild/pch.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/pch.h?rev=383…
============================================================================== --- trunk/reactos/tools/rbuild/pch.h [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/pch.h [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -20,6 +20,7 @@ #ifdef _MSC_VER #pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information +#pragma warning ( disable : 4996 ) // CRT deprecate #endif//_MSC_VER #include <string> Modified: trunk/reactos/tools/rbuild/rbuild.vcproj URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.vcproj…
============================================================================== --- trunk/reactos/tools/rbuild/rbuild.vcproj [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/rbuild.vcproj [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -133,7 +133,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..,../../lib/inflib,../../include/reactos;../../include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;INFLIB_HOST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;INFLIB_HOST;_CRT_SECURE_NO_WARNINGS;_CRT_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE" BasicRuntimeChecks="3" RuntimeLibrary="1" DefaultCharIsUnsigned="true" Modified: trunk/reactos/tools/rbuild/testsupportcode.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/testsupportco…
============================================================================== --- trunk/reactos/tools/rbuild/testsupportcode.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/testsupportcode.cpp [iso-8859-1] Tue Dec 23 08:35:23 2008 @@ -293,7 +293,7 @@ bool TestSupportCode::IsTestFile ( string& filename ) const { - if ( _stricmp ( GetFilename ( filename ).c_str (), "setup.c" ) == 0 ) + if ( stricmp ( GetFilename ( filename ).c_str (), "setup.c" ) == 0 ) return false; return true; }
15 years, 9 months
1
0
0
0
[fireball] 38300: - Replace all deprecated functions with underscored names. - Add _CRT_SECURE_NO_DEPRECATE to VC project file to suppress security warnings.
by fireball@svn.reactos.org
Author: fireball Date: Tue Dec 23 08:19:19 2008 New Revision: 38300 URL:
http://svn.reactos.org/svn/reactos?rev=38300&view=rev
Log: - Replace all deprecated functions with underscored names. - Add _CRT_SECURE_NO_DEPRECATE to VC project file to suppress security warnings. Modified: trunk/reactos/tools/rbuild/automaticdependency.cpp trunk/reactos/tools/rbuild/backend/backend.cpp trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp trunk/reactos/tools/rbuild/compilationunit.cpp trunk/reactos/tools/rbuild/directory.cpp trunk/reactos/tools/rbuild/module.cpp trunk/reactos/tools/rbuild/rbuild.vcproj trunk/reactos/tools/rbuild/testsupportcode.cpp Modified: trunk/reactos/tools/rbuild/automaticdependency.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/automaticdepe…
============================================================================== --- trunk/reactos/tools/rbuild/automaticdependency.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/automaticdependency.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008 @@ -60,7 +60,7 @@ if ( !f ) throw FileNotFoundException ( filename ); - if ( fstat ( fileno ( f ), &statbuf ) != 0 ) + if ( fstat ( _fileno ( f ), &statbuf ) != 0 ) { fclose ( f ); throw AccessDeniedException ( filename ); Modified: trunk/reactos/tools/rbuild/backend/backend.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/backe…
============================================================================== --- trunk/reactos/tools/rbuild/backend/backend.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/backend.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008 @@ -32,7 +32,7 @@ Backend::Factory::Factory ( const std::string& name_, const std::string& description_ ) { string name(name_); - strlwr ( &name[0] ); + _strlwr ( &name[0] ); if ( !ref++ ) factories = new map<string,Factory*>; (*factories)[name] = this; @@ -55,7 +55,7 @@ Configuration& configuration ) { string sname ( name ); - strlwr ( &sname[0] ); + _strlwr ( &sname[0] ); if ( !factories || !factories->size () ) throw InvalidOperationException ( __FILE__, __LINE__, Modified: trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/codeb…
============================================================================== --- trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/codeblocks/codeblocks.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008 @@ -268,7 +268,7 @@ string::size_type pos = file.find_last_of (sSep); if ( pos != string::npos ) file.erase ( 0, pos+1 ); - if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) + if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) ) file = ReplaceExtension ( file, ".res" ); else file = ReplaceExtension ( file, ".obj" ); @@ -429,7 +429,7 @@ string fullpath = files[i]->file.relative_path + sSep + files[i]->file.name; string file = string(".") + &fullpath[cbproj_path.size()]; - if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) + if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) ) resource_files.push_back ( file ); else source_files.push_back ( file ); Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008 @@ -621,7 +621,7 @@ if ( !f ) throw FileNotFoundException ( NormalizeFilename ( xmlbuildfile.topIncludeFilename ) ); - if ( fstat ( fileno ( f ), &statbuf ) != 0 ) + if ( fstat ( _fileno ( f ), &statbuf ) != 0 ) { fclose ( f ); throw AccessDeniedException ( NormalizeFilename ( xmlbuildfile.topIncludeFilename ) ); @@ -1064,7 +1064,7 @@ { usePipe = (exitcode == 0); fclose ( f ); - unlink ( pipe_detectionObjectFilename.c_str () ); + _unlink ( pipe_detectionObjectFilename.c_str () ); } else usePipe = false; @@ -1097,7 +1097,7 @@ { use_pch = true; fclose ( f ); - unlink ( path.c_str () ); + _unlink ( path.c_str () ); } else use_pch = false; Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008 @@ -63,7 +63,7 @@ GetTargetMacro ( const Module& module, bool with_dollar ) { string s ( module.name ); - strupr ( &s[0] ); + _strupr ( &s[0] ); s += "_TARGET"; if ( with_dollar ) return ssprintf ( "$(%s)", s.c_str() ); @@ -2399,13 +2399,13 @@ const char * crtAttr = module.CRT.c_str (); const char * crtLib = NULL; - if ( stricmp ( crtAttr, "libc" ) == 0 ) + if ( _stricmp ( crtAttr, "libc" ) == 0 ) crtLib = "crt"; - else if ( stricmp ( crtAttr, "msvcrt" ) == 0 ) + else if ( _stricmp ( crtAttr, "msvcrt" ) == 0 ) crtLib = "msvcrt"; - else if ( stricmp ( crtAttr, "libcntpr" ) == 0 ) + else if ( _stricmp ( crtAttr, "libcntpr" ) == 0 ) crtLib = "libcntpr"; - else if ( stricmp ( crtAttr, "ntdll" ) == 0 ) + else if ( _stricmp ( crtAttr, "ntdll" ) == 0 ) crtLib = "ntdll"; if ( crtLib ) Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008 @@ -340,7 +340,7 @@ string::size_type pos = file.find_last_of (DEF_SSEP); if ( pos != string::npos ) file.erase ( 0, pos+1 ); - if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) + if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) ) file = ReplaceExtension ( file, ".res" ); else file = ReplaceExtension ( file, ".obj" ); Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008 @@ -108,11 +108,11 @@ string file = path + std::string("\\") + files[i]->file.name; source_files.push_back ( file ); - if ( !stricmp ( Right(file,2).c_str(), ".c" ) ) + if ( !_stricmp ( Right(file,2).c_str(), ".c" ) ) c_srcs.push_back ( file ); - if ( !stricmp ( Right(file,2).c_str(), ".h" ) ) + if ( !_stricmp ( Right(file,2).c_str(), ".h" ) ) header_files.push_back ( file ); - if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) + if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) ) resource_files.push_back ( file ); } const vector<Include*>& incs = data.includes; Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008 @@ -159,9 +159,9 @@ module.output->relative_path ); string file = path + std::string("\\") + files[i]->file.name; - if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) + if ( !_stricmp ( Right(file,3).c_str(), ".rc" ) ) resource_files.push_back ( file ); - else if ( !stricmp ( Right(file,2).c_str(), ".h" ) ) + else if ( !_stricmp ( Right(file,2).c_str(), ".h" ) ) header_files.push_back ( file ); else source_files.push_back ( file ); Modified: trunk/reactos/tools/rbuild/compilationunit.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/compilationun…
============================================================================== --- trunk/reactos/tools/rbuild/compilationunit.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/compilationunit.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008 @@ -88,7 +88,7 @@ { const File& file = *files[i]; string fileExtension = GetExtension ( file.file ); - if ( !stricmp ( fileExtension.c_str (), extension.c_str () ) ) + if ( !_stricmp ( fileExtension.c_str (), extension.c_str () ) ) return true; } return false; Modified: trunk/reactos/tools/rbuild/directory.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/directory.cpp…
============================================================================== --- trunk/reactos/tools/rbuild/directory.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/directory.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008 @@ -26,7 +26,7 @@ #endif//_MSC_VER #ifdef WIN32 -#define MKDIR(s) mkdir(s) +#define MKDIR(s) _mkdir(s) #else #define MKDIR(s) mkdir(s, 0755) #endif Modified: trunk/reactos/tools/rbuild/module.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
============================================================================== --- trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008 @@ -238,9 +238,9 @@ if ( att != NULL ) { const char* p = att->value.c_str(); - if ( !stricmp ( p, "true" ) || !stricmp ( p, "yes" ) ) + if ( !_stricmp ( p, "true" ) || !_stricmp ( p, "yes" ) ) return true; - else if ( !stricmp ( p, "false" ) || !stricmp ( p, "no" ) ) + else if ( !_stricmp ( p, "false" ) || !_stricmp ( p, "no" ) ) return false; else { @@ -358,26 +358,26 @@ { CRT = att->value; - if ( stricmp ( CRT.c_str (), "auto" ) == 0 ) + if ( _stricmp ( CRT.c_str (), "auto" ) == 0 ) CRT = GetDefaultModuleCRT (); } else CRT = GetDefaultModuleCRT (); const char * crtAttr = CRT.c_str (); - if ( crtAttr == NULL || stricmp ( crtAttr, "none" ) == 0 ) + if ( crtAttr == NULL || _stricmp ( crtAttr, "none" ) == 0 ) dynamicCRT = false; - else if ( stricmp ( crtAttr, "libc" ) == 0 ) + else if ( _stricmp ( crtAttr, "libc" ) == 0 ) dynamicCRT = false; - else if ( stricmp ( crtAttr, "msvcrt" ) == 0 ) + else if ( _stricmp ( crtAttr, "msvcrt" ) == 0 ) dynamicCRT = true; - else if ( stricmp ( crtAttr, "libcntpr" ) == 0 ) + else if ( _stricmp ( crtAttr, "libcntpr" ) == 0 ) dynamicCRT = false; - else if ( stricmp ( crtAttr, "ntdll" ) == 0 ) + else if ( _stricmp ( crtAttr, "ntdll" ) == 0 ) dynamicCRT = true; - else if ( stricmp ( crtAttr, "static" ) == 0 ) + else if ( _stricmp ( crtAttr, "static" ) == 0 ) dynamicCRT = false; - else if ( stricmp ( crtAttr, "dll" ) == 0 ) + else if ( _stricmp ( crtAttr, "dll" ) == 0 ) dynamicCRT = true; else { @@ -609,9 +609,9 @@ const XMLAttribute* att = e.GetAttribute ( "first", false ); if ( att != NULL ) { - if ( !stricmp ( att->value.c_str(), "true" ) ) + if ( !_stricmp ( att->value.c_str(), "true" ) ) first = true; - else if ( stricmp ( att->value.c_str(), "false" ) ) + else if ( _stricmp ( att->value.c_str(), "false" ) ) { throw XMLInvalidBuildFileException ( e.location, @@ -626,11 +626,11 @@ { // check for c++ file string ext = GetExtension ( e.value ); - if ( !stricmp ( ext.c_str(), ".cpp" ) ) + if ( !_stricmp ( ext.c_str(), ".cpp" ) ) cplusplus = true; - else if ( !stricmp ( ext.c_str(), ".cc" ) ) + else if ( !_stricmp ( ext.c_str(), ".cc" ) ) cplusplus = true; - else if ( !stricmp ( ext.c_str(), ".cxx" ) ) + else if ( !_stricmp ( ext.c_str(), ".cxx" ) ) cplusplus = true; } File* pFile = new File ( directory, @@ -1857,9 +1857,9 @@ if ( att != NULL ) { const char* p = att->value.c_str(); - if ( !stricmp ( p, "true" ) || !stricmp ( p, "yes" ) ) + if ( !_stricmp ( p, "true" ) || !_stricmp ( p, "yes" ) ) isInternal = true; - else if ( !stricmp ( p, "false" ) || !stricmp ( p, "no" ) ) + else if ( !_stricmp ( p, "false" ) || !_stricmp ( p, "no" ) ) isInternal = false; else { Modified: trunk/reactos/tools/rbuild/rbuild.vcproj URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.vcproj…
============================================================================== --- trunk/reactos/tools/rbuild/rbuild.vcproj [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/rbuild.vcproj [iso-8859-1] Tue Dec 23 08:19:19 2008 @@ -133,7 +133,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..,../../lib/inflib,../../include/reactos;../../include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;INFLIB_HOST;_CRT_SECURE_NO_WARNINGS" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;INFLIB_HOST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE" BasicRuntimeChecks="3" RuntimeLibrary="1" DefaultCharIsUnsigned="true" Modified: trunk/reactos/tools/rbuild/testsupportcode.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/testsupportco…
============================================================================== --- trunk/reactos/tools/rbuild/testsupportcode.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/testsupportcode.cpp [iso-8859-1] Tue Dec 23 08:19:19 2008 @@ -293,7 +293,7 @@ bool TestSupportCode::IsTestFile ( string& filename ) const { - if ( stricmp ( GetFilename ( filename ).c_str (), "setup.c" ) == 0 ) + if ( _stricmp ( GetFilename ( filename ).c_str (), "setup.c" ) == 0 ) return false; return true; }
15 years, 9 months
1
0
0
0
[cgutman] 38299: - Enable memtrack on debug builds only
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Dec 23 07:28:02 2008 New Revision: 38299 URL:
http://svn.reactos.org/svn/reactos?rev=38299&view=rev
Log: - Enable memtrack on debug builds only Modified: branches/aicom-network-fixes/drivers/network/tcpip/include/memtrack.h branches/aicom-network-fixes/lib/drivers/ip/network/memtrack.c branches/aicom-network-fixes/lib/drivers/oskittcp/include/memtrack.h Modified: branches/aicom-network-fixes/drivers/network/tcpip/include/memtrack.h URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/include/memtrack.h [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/include/memtrack.h [iso-8859-1] Tue Dec 23 07:28:02 2008 @@ -15,6 +15,7 @@ #define AllocatePacketWithBuffer(x,y,z) AllocatePacketWithBufferX(x,y,z,__FILE__,__LINE__) #define FreeNdisPacket(x) FreeNdisPacketX(x,__FILE__,__LINE__) +#ifdef DBG #define MTMARK() TrackDumpFL(__FILE__, __LINE__) #define exAllocatePool(x,y) ExAllocatePoolX(x,y,__FILE__,__LINE__) #define exAllocatePoolWithTag(x,y,z) ExAllocatePoolX(x,y,__FILE__,__LINE__) @@ -62,5 +63,20 @@ } #define MEMTRACK_MAX_TAGS_TO_TRACK 64 +#else +#define MTMARK() +#define Track(x,y) +#define TrackingInit() +#define TrackDump() +#define Untrack(x) +#define TrackTag(x) +#define exAllocatePoolWithTag(x,y,z) ExAllocatePoolWithTag(x,y,z) +#define exAllocatePool(x,y) ExAllocatePool(x,y) +#define exFreePool(x) ExFreePool(x) +#define exAllocateFromNPagedLookasideList(x) ExAllocateFromNPagedLookasideList(x) +#define exFreeToNPagedLookasideList(x,y) ExFreeToNPagedLookasideList(x,y) +#define TrackWithTag(w,x,y,z) +#define UntrackFL(w,x,y,z) +#endif #endif/*MEMMTRAC_H*/ Modified: branches/aicom-network-fixes/lib/drivers/ip/network/memtrack.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/network/memtrack.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/network/memtrack.c [iso-8859-1] Tue Dec 23 07:28:02 2008 @@ -2,6 +2,7 @@ #include "precomp.h" +#ifdef DBG #define TRACK_TAG TAG('T','r','C','K') static LIST_ENTRY AllocatedObjectsList; @@ -163,3 +164,4 @@ TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql ); } +#endif /* DBG */ Modified: branches/aicom-network-fixes/lib/drivers/oskittcp/include/memtrack.h URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/oskittcp/include/memtrack.h [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/oskittcp/include/memtrack.h [iso-8859-1] Tue Dec 23 07:28:02 2008 @@ -8,6 +8,7 @@ #define FBSD_MALLOC FOURCC('d','s','b','f') #define EXALLOC_TAG FOURCC('E','x','A','l') +#ifdef DBG #define MTMARK() TrackDumpFL(__FILE__, __LINE__) #define NdisAllocateBuffer(x,y,z,a,b) { \ NdisAllocateBuffer(x,y,z,a,b); \ @@ -59,5 +60,21 @@ } #define MEMTRACK_MAX_TAGS_TO_TRACK 64 +#else +#define MTMARK() +#define Track(x,y) +#define TrackingInit() +#define TrackDump() +#define Untrack(x) +#define TrackTag(x) +#define FreeNdisPacket FreeNdisPacketX +#define exFreePool(x) ExFreePool(x) +#define exAllocatePool(x,y) ExAllocatePool(x,y) +#define exAllocatePoolWithTag(x,y,z) ExAllocatePoolWithTag(x,y,z) +#define exAllocateFromNPagedLookasideList(x) ExAllocateFromNPagedLookasideList(x) +#define exFreeToNPagedLookasideList(x,y) ExFreeToNPagedLookasideList(x,y) +#define TrackWithTag(w,x,y,z) +#define UntrackFL(w,x,y,z) +#endif #endif/*MEMMTRAC_H*/
15 years, 9 months
1
0
0
0
[cgutman] 38298: Huge memtrack commit (part 2 of 2)
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Dec 23 06:40:58 2008 New Revision: 38298 URL:
http://svn.reactos.org/svn/reactos?rev=38298&view=rev
Log: Huge memtrack commit (part 2 of 2) Modified: branches/aicom-network-fixes/lib/drivers/ip/network/address.c branches/aicom-network-fixes/lib/drivers/ip/network/ip.c branches/aicom-network-fixes/lib/drivers/ip/network/loopback.c branches/aicom-network-fixes/lib/drivers/ip/network/memtrack.c branches/aicom-network-fixes/lib/drivers/ip/network/neighbor.c branches/aicom-network-fixes/lib/drivers/ip/network/ports.c branches/aicom-network-fixes/lib/drivers/ip/network/receive.c branches/aicom-network-fixes/lib/drivers/ip/network/router.c branches/aicom-network-fixes/lib/drivers/ip/network/transmit.c branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/accept.c branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/tcp.c branches/aicom-network-fixes/lib/drivers/oskittcp/include/memtrack.h Modified: branches/aicom-network-fixes/lib/drivers/ip/network/address.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/network/address.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/network/address.c [iso-8859-1] Tue Dec 23 06:40:58 2008 @@ -106,7 +106,7 @@ * Nothing */ { - PoolFreeBuffer(Object); + exFreePool(Object); } Modified: branches/aicom-network-fixes/lib/drivers/ip/network/ip.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/network/ip.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/network/ip.c [iso-8859-1] Tue Dec 23 06:40:58 2008 @@ -33,7 +33,7 @@ * Object = Pointer to an IP packet structure */ { - TcpipFreeToNPagedLookasideList(&IPPacketList, Object); + exFreeToNPagedLookasideList(&IPPacketList, Object); } @@ -70,7 +70,7 @@ { PIP_PACKET IPPacket; - IPPacket = TcpipAllocateFromNPagedLookasideList(&IPPacketList); + IPPacket = exAllocateFromNPagedLookasideList(&IPPacketList); if (!IPPacket) return NULL; Modified: branches/aicom-network-fixes/lib/drivers/ip/network/loopback.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/network/loopback.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/network/loopback.c [iso-8859-1] Tue Dec 23 06:40:58 2008 @@ -45,7 +45,7 @@ Adapter = WorkItem->Adapter; BytesTransferred = WorkItem->BytesTransferred; - ExFreePool( WorkItem ); + exFreePool( WorkItem ); IPPacket.NdisPacket = Packet; @@ -88,7 +88,7 @@ TcpipAcquireSpinLock( &LoopWorkLock, &OldIrql ); - WQItem = ExAllocatePool( NonPagedPool, sizeof(LAN_WQ_ITEM) ); + WQItem = exAllocatePool( NonPagedPool, sizeof(LAN_WQ_ITEM) ); if( !WQItem ) { TcpipReleaseSpinLock( &LoopWorkLock, OldIrql ); return; Modified: branches/aicom-network-fixes/lib/drivers/ip/network/memtrack.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/network/memtrack.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/network/memtrack.c [iso-8859-1] Tue Dec 23 06:40:58 2008 @@ -1,7 +1,6 @@ #define MEMTRACK_NO_POOL #include "precomp.h" -#ifdef MEMTRACK #define TRACK_TAG TAG('T','r','C','K') @@ -29,12 +28,24 @@ 0 ); } -VOID ShowTrackedThing( PCHAR What, PALLOCATION_TRACKER Thing, - PCHAR File, UINT Line ) { - /* if( ShowTag( Thing->Tag ) ) */ - if( File ) { +VOID ShowTrackedThing( PCHAR What, PALLOCATION_TRACKER Thing, BOOLEAN ForceShow ) { + + if (ForceShow) + { + DbgPrint("[%s] Thing %08x %c%c%c%c (%s:%d)\n", + What, + Thing->Thing, + ((PCHAR)&Thing->Tag)[3], + ((PCHAR)&Thing->Tag)[2], + ((PCHAR)&Thing->Tag)[1], + ((PCHAR)&Thing->Tag)[0], + Thing->FileName, + Thing->LineNo); + } + else + { TI_DbgPrint(MAX_TRACE, - ("[%s] Thing %08x %c%c%c%c (%s:%d) (Called from %s:%d)\n", + ("[%s] Thing %08x %c%c%c%c (%s:%d)\n", What, Thing->Thing, ((PCHAR)&Thing->Tag)[3], @@ -42,19 +53,7 @@ ((PCHAR)&Thing->Tag)[1], ((PCHAR)&Thing->Tag)[0], Thing->FileName, - Thing->LineNo, - File, Line)); - } else { - TI_DbgPrint(MAX_TRACE, - ( "[%s] Thing %08x %c%c%c%c (%s:%d)\n", - What, - Thing->Thing, - ((PCHAR)&Thing->Tag)[3], - ((PCHAR)&Thing->Tag)[2], - ((PCHAR)&Thing->Tag)[1], - ((PCHAR)&Thing->Tag)[0], - Thing->FileName, - Thing->LineNo )); + Thing->LineNo)); } } @@ -66,6 +65,15 @@ PLIST_ENTRY Entry; PALLOCATION_TRACKER ThingInList; + if (!TrackedThing) return; + + TrackedThing->Tag = Tag; + TrackedThing->Thing = Thing; + TrackedThing->FileName = FileName; + TrackedThing->LineNo = LineNo; + + ShowTrackedThing( "Alloc", TrackedThing, FALSE ); + TcpipAcquireSpinLock( &AllocatedObjectsLock, &OldIrql ); Entry = AllocatedObjectsList.Flink; while( Entry != &AllocatedObjectsList ) { @@ -74,25 +82,21 @@ RemoveEntryList(Entry); TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql ); - ShowTrackedThing( "Alloc", ThingInList, FileName, LineNo ); - PoolFreeBuffer( ThingInList ); + ShowTrackedThing( "Alloc", ThingInList, FALSE ); + TrackDumpFL( FileName, LineNo ); DbgPrint("TRACK: SPECIFIED ALREADY ALLOCATED ITEM %x\n", Thing); + ShowTrackedThing( "Double Alloc (Item in list)", ThingInList, TRUE ); + ShowTrackedThing( "Double Alloc (Item not in list)", TrackedThing, TRUE ); TcpipBugCheck( 0 ); + + ExFreeToNPagedLookasideList( &AllocatedObjectsLookasideList, + ThingInList ); } Entry = Entry->Flink; } - if( TrackedThing ) { - TrackedThing->Tag = Tag; - TrackedThing->Thing = Thing; - TrackedThing->FileName = FileName; - TrackedThing->LineNo = LineNo; - - - InsertHeadList( &AllocatedObjectsList, &TrackedThing->Entry ); - ShowTrackedThing( "Alloc", TrackedThing, FileName, LineNo ); - } + InsertHeadList( &AllocatedObjectsList, &TrackedThing->Entry ); TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql ); @@ -107,7 +111,7 @@ return TagsToShow[i] ? TRUE : FALSE; } -VOID UntrackFL( PCHAR File, DWORD Line, PVOID Thing ) { +VOID UntrackFL( PCHAR File, DWORD Line, PVOID Thing, DWORD Tag ) { KIRQL OldIrql; PLIST_ENTRY Entry; PALLOCATION_TRACKER ThingInList; @@ -119,19 +123,25 @@ if( ThingInList->Thing == Thing ) { RemoveEntryList(Entry); - ShowTrackedThing( "Free ", ThingInList, File, Line ); + ShowTrackedThing( "Free ", ThingInList, FALSE ); + + if ( ThingInList->Tag != Tag ) { + DbgPrint("UNTRACK: TAG DOES NOT MATCH (%x)\n", Thing); + ShowTrackedThing("Tag Mismatch (Item in list)", ThingInList, TRUE); + TcpipBugCheck( 0 ); + } ExFreeToNPagedLookasideList( &AllocatedObjectsLookasideList, ThingInList ); TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql ); + /* TrackDumpFL( File, Line ); */ return; } Entry = Entry->Flink; } TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql ); - TrackDumpFL( File, Line ); DbgPrint("UNTRACK: SPECIFIED ALREADY FREE ITEM %x\n", Thing); TcpipBugCheck( 0 ); } @@ -147,10 +157,9 @@ Entry = AllocatedObjectsList.Flink; while( Entry != &AllocatedObjectsList ) { Thing = CONTAINING_RECORD(Entry, ALLOCATION_TRACKER, Entry); - ShowTrackedThing( "Dump ", Thing, 0, 0 ); + ShowTrackedThing( "Dump ", Thing, FALSE ); Entry = Entry->Flink; } TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql ); } -#endif/*MEMTRACK*/ Modified: branches/aicom-network-fixes/lib/drivers/ip/network/neighbor.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/network/neighbor.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/network/neighbor.c [iso-8859-1] Tue Dec 23 06:40:58 2008 @@ -21,7 +21,7 @@ ASSERT_KM_POINTER(Packet->Complete); Packet->Complete( Packet->Context, Packet->Packet, Status ); TI_DbgPrint(MID_TRACE, ("Completed\n")); - PoolFreeBuffer( Packet ); + exFreePool( Packet ); TI_DbgPrint(MID_TRACE, ("Freed\n")); } @@ -89,7 +89,7 @@ ErrorCode ); } - PoolFreeBuffer( Packet ); + exFreePool( Packet ); } } @@ -283,7 +283,7 @@ "LinkAddress (0x%X) LinkAddressLength (%d) State (0x%X)\n", Interface, Address, LinkAddress, LinkAddressLength, State)); - NCE = ExAllocatePool + NCE = exAllocatePool (NonPagedPool, sizeof(NEIGHBOR_CACHE_ENTRY) + LinkAddressLength); if (NCE == NULL) { @@ -466,7 +466,7 @@ (DEBUG_NCACHE, ("Called. NCE (0x%X) NdisPacket (0x%X).\n", NCE, NdisPacket)); - Packet = PoolAllocateBuffer( sizeof(NEIGHBOR_PACKET) ); + Packet = exAllocatePool( NonPagedPool, sizeof(NEIGHBOR_PACKET) ); if( !Packet ) return FALSE; /* FIXME: Should we limit the number of queued packets? */ @@ -529,7 +529,7 @@ *PrevNCE = CurNCE->Next; NBFlushPacketQueue( CurNCE, TRUE, NDIS_STATUS_REQUEST_ABORTED ); - ExFreePool(CurNCE); + exFreePool(CurNCE); break; } Modified: branches/aicom-network-fixes/lib/drivers/ip/network/ports.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/network/ports.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/network/ports.c [iso-8859-1] Tue Dec 23 06:40:58 2008 @@ -17,7 +17,7 @@ PortSet->PortsToOversee = PortsToManage; PortSet->ProtoBitBuffer = - PoolAllocateBuffer( (PortSet->PortsToOversee + 7) / 8 ); + exAllocatePool( NonPagedPool, (PortSet->PortsToOversee + 7) / 8 ); if(!PortSet->ProtoBitBuffer) return STATUS_INSUFFICIENT_RESOURCES; RtlInitializeBitMap( &PortSet->ProtoBitmap, PortSet->ProtoBitBuffer, @@ -28,7 +28,7 @@ } VOID PortsShutdown( PPORT_SET PortSet ) { - PoolFreeBuffer( PortSet->ProtoBitBuffer ); + exFreePool( PortSet->ProtoBitBuffer ); } VOID DeallocatePort( PPORT_SET PortSet, ULONG Port ) { Modified: branches/aicom-network-fixes/lib/drivers/ip/network/receive.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/network/receive.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/network/receive.c [iso-8859-1] Tue Dec 23 06:40:58 2008 @@ -41,7 +41,7 @@ TI_DbgPrint(DEBUG_IP, ("Called. First (%d) Last (%d).\n", First, Last)); - Hole = TcpipAllocateFromNPagedLookasideList(&IPHoleList); + Hole = exAllocateFromNPagedLookasideList(&IPHoleList); if (!Hole) { TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); return NULL; @@ -82,7 +82,7 @@ TI_DbgPrint(DEBUG_IP, ("Freeing hole descriptor at (0x%X).\n", CurrentH)); /* And free the hole descriptor */ - TcpipFreeToNPagedLookasideList(&IPHoleList, CurrentH); + exFreeToNPagedLookasideList(&IPHoleList, CurrentH); CurrentEntry = NextEntry; } @@ -103,13 +103,13 @@ TI_DbgPrint(DEBUG_IP, ("Freeing fragment at (0x%X).\n", CurrentF)); /* And free the fragment descriptor */ - TcpipFreeToNPagedLookasideList(&IPFragmentList, CurrentF); + exFreeToNPagedLookasideList(&IPFragmentList, CurrentF); CurrentEntry = NextEntry; } TI_DbgPrint(DEBUG_IP, ("Freeing IPDR data at (0x%X).\n", IPDR)); - TcpipFreeToNPagedLookasideList(&IPDRList, IPDR); + exFreeToNPagedLookasideList(&IPDRList, IPDR); } @@ -311,7 +311,7 @@ TI_DbgPrint(DEBUG_IP, ("Starting new assembly.\n")); /* We don't have a reassembly structure, create one */ - IPDR = TcpipAllocateFromNPagedLookasideList(&IPDRList); + IPDR = exAllocateFromNPagedLookasideList(&IPDRList); if (!IPDR) /* We don't have the resources to process this packet, discard it */ return; @@ -322,7 +322,7 @@ Hole = CreateHoleDescriptor(0, 65536); if (!Hole) { /* We don't have the resources to process this packet, discard it */ - TcpipFreeToNPagedLookasideList(&IPDRList, IPDR); + exFreeToNPagedLookasideList(&IPDRList, IPDR); return; } AddrInitIPv4(&IPDR->SrcAddr, IPv4Header->SrcAddr); @@ -390,7 +390,7 @@ /* Put the new hole descriptor in the list */ InsertTailList(&IPDR->HoleListHead, &Hole->ListEntry); } else - TcpipFreeToNPagedLookasideList(&IPHoleList, Hole); + exFreeToNPagedLookasideList(&IPHoleList, Hole); /* If this is the first fragment, save the IP header */ if (FragFirst == 0) { @@ -404,7 +404,7 @@ /* Create a buffer, copy the data into it and put it in the fragment list */ - Fragment = TcpipAllocateFromNPagedLookasideList(&IPFragmentList); + Fragment = exAllocateFromNPagedLookasideList(&IPFragmentList); if (!Fragment) { /* We don't have the resources to process this packet, discard it */ Cleanup(&IPDR->Lock, OldIrql, IPDR, NULL); Modified: branches/aicom-network-fixes/lib/drivers/ip/network/router.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/network/router.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/network/router.c [iso-8859-1] Tue Dec 23 06:40:58 2008 @@ -51,7 +51,7 @@ * Object = Pointer to an forward information base structure */ { - PoolFreeBuffer(Object); + exFreePool(Object); } @@ -213,7 +213,7 @@ A2S(Netmask), A2S(&Router->Address))); - FIBE = PoolAllocateBuffer(sizeof(FIB_ENTRY)); + FIBE = exAllocatePool(NonPagedPool, sizeof(FIB_ENTRY)); if (!FIBE) { TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); return NULL; Modified: branches/aicom-network-fixes/lib/drivers/ip/network/transmit.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/network/transmit.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/network/transmit.c [iso-8859-1] Tue Dec 23 06:40:58 2008 @@ -212,14 +212,14 @@ if (!PrepareNextFragment(IFC)) { FreeNdisPacket(IFC->NdisPacket); - ExFreePool(IFC); + exFreePool(IFC); return NDIS_STATUS_FAILURE; } if (!NT_SUCCESS((NdisStatus = IPSendFragment(IFC->NdisPacket, NCE, IFC)))) { FreeNdisPacket(IFC->NdisPacket); - ExFreePool(IFC); + exFreePool(IFC); } return NdisStatus; Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/accept.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/accept.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/accept.c [iso-8859-1] Tue Dec 23 06:40:58 2008 @@ -115,7 +115,7 @@ if( Bucket->AssociatedEndpoint == Connection ) { RemoveEntryList( &Bucket->Entry ); - ExFreePool( Bucket ); + exFreePool( Bucket ); break; } @@ -142,7 +142,7 @@ (PTDI_REQUEST_KERNEL)Request ); if( Status == STATUS_PENDING ) { - Bucket = ExAllocatePool( NonPagedPool, sizeof(*Bucket) ); + Bucket = exAllocatePool( NonPagedPool, sizeof(*Bucket) ); if( Bucket ) { Bucket->AssociatedEndpoint = Connection; Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] Tue Dec 23 06:40:58 2008 @@ -119,7 +119,7 @@ ("Called TSLEEP: tok = %x, pri = %d, wmesg = %s, tmio = %x\n", token, priority, msg, tmio)); - SleepingThread = PoolAllocateBuffer( sizeof( *SleepingThread ) ); + SleepingThread = exAllocatePool( NonPagedPool, sizeof( *SleepingThread ) ); if( SleepingThread ) { KeInitializeEvent( &SleepingThread->Event, NotificationEvent, FALSE ); SleepingThread->SleepToken = token; @@ -146,7 +146,7 @@ TcpipRecursiveMutexEnter( &TCPLock, TRUE ); - PoolFreeBuffer( SleepingThread ); + exFreePool( SleepingThread ); } else return OSK_ENOBUFS; @@ -238,22 +238,22 @@ if ( ! Found ) { if ( ArrayAllocated <= ArrayUsed ) { NewSize = ( 0 == ArrayAllocated ? 16 : 2 * ArrayAllocated ); - NewArray = PoolAllocateBuffer( 2 * NewSize * sizeof( OSK_UINT ) ); + NewArray = exAllocatePool( NonPagedPool, 2 * NewSize * sizeof( OSK_UINT ) ); if ( NULL != NewArray ) { if ( 0 != ArrayAllocated ) { memcpy( NewArray, Sizes, ArrayAllocated * sizeof( OSK_UINT ) ); - PoolFreeBuffer( Sizes ); + exFreePool( Sizes ); memcpy( NewArray + NewSize, Counts, ArrayAllocated * sizeof( OSK_UINT ) ); - PoolFreeBuffer( Counts ); + exFreePool( Counts ); } Sizes = NewArray; Counts = NewArray + NewSize; ArrayAllocated = NewSize; } else if ( 0 != ArrayAllocated ) { - PoolFreeBuffer( Sizes ); - PoolFreeBuffer( Counts ); + exFreePool( Sizes ); + exFreePool( Counts ); ArrayAllocated = 0; } } @@ -281,7 +281,7 @@ v = ExAllocateFromNPagedLookasideList( &LargeLookasideList ); Signature = SIGNATURE_LARGE; } else { - v = PoolAllocateBuffer( Bytes + sizeof(ULONG) ); + v = ExAllocatePool( NonPagedPool, Bytes + sizeof(ULONG) ); Signature = SIGNATURE_OTHER; } if( v ) { @@ -297,7 +297,7 @@ void *data, OSK_PCHAR File, OSK_UINT Line ) { ULONG Signature; - UntrackFL( (PCHAR)File, Line, data ); + UntrackFL( (PCHAR)File, Line, data, FOURCC('f','b','s','d') ); data = (void *)((char *) data - sizeof(ULONG)); Signature = *((ULONG *) data); if ( SIGNATURE_SMALL == Signature ) { @@ -305,7 +305,7 @@ } else if ( SIGNATURE_LARGE == Signature ) { ExFreeToNPagedLookasideList( &LargeLookasideList, data ); } else if ( SIGNATURE_OTHER == Signature ) { - PoolFreeBuffer( data ); + ExFreePool( data ); } else { ASSERT( FALSE ); } Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/tcp.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] Tue Dec 23 06:40:58 2008 @@ -53,7 +53,7 @@ Complete( Bucket->Request.RequestContext, Status, 0 ); /* Frees the bucket allocated in TCPConnect */ - PoolFreeBuffer( Bucket ); + exFreePool( Bucket ); } } @@ -90,7 +90,7 @@ break; } else { Complete( Bucket->Request.RequestContext, Status, 0 ); - PoolFreeBuffer( Bucket ); + exFreePool( Bucket ); } } } @@ -142,7 +142,7 @@ Complete( Bucket->Request.RequestContext, STATUS_SUCCESS, Received ); - PoolFreeBuffer( Bucket ); + exFreePool( Bucket ); } else if( Status == STATUS_PENDING ) { InsertHeadList ( &Connection->ReceiveRequest, &Bucket->Entry ); @@ -152,7 +152,7 @@ ("Completing Receive request: %x %x\n", Bucket->Request, Status)); Complete( Bucket->Request.RequestContext, Status, 0 ); - PoolFreeBuffer( Bucket ); + exFreePool( Bucket ); } } } @@ -201,7 +201,7 @@ Complete( Bucket->Request.RequestContext, STATUS_SUCCESS, Sent ); - PoolFreeBuffer( Bucket ); + exFreePool( Bucket ); } else if( Status == STATUS_PENDING ) { InsertHeadList ( &Connection->SendRequest, &Bucket->Entry ); @@ -211,7 +211,7 @@ ("Completing Send request: %x %x\n", Bucket->Request, Status)); Complete( Bucket->Request.RequestContext, Status, 0 ); - PoolFreeBuffer( Bucket ); + exFreePool( Bucket ); } } } @@ -238,7 +238,7 @@ Bucket = CONTAINING_RECORD( Entry, TDI_BUCKET, Entry ); Complete = Bucket->Request.RequestNotifyObject; Complete( Bucket->Request.RequestContext, IrpStatus[i], 0 ); - PoolFreeBuffer( Bucket ); + exFreePool( Bucket ); } } } @@ -260,7 +260,7 @@ PCONNECTION_ENDPOINT TCPAllocateConnectionEndpoint( PVOID ClientContext ) { PCONNECTION_ENDPOINT Connection = - ExAllocatePool(NonPagedPool, sizeof(CONNECTION_ENDPOINT)); + exAllocatePool(NonPagedPool, sizeof(CONNECTION_ENDPOINT)); if (!Connection) return Connection; @@ -283,7 +283,7 @@ VOID TCPFreeConnectionEndpoint( PCONNECTION_ENDPOINT Connection ) { TCPClose( Connection ); - ExFreePool( Connection ); + exFreePool( Connection ); } NTSTATUS TCPSocket( PCONNECTION_ENDPOINT Connection, @@ -545,7 +545,7 @@ TI_DbgPrint(DEBUG_TCP,("TCPConnect: Called\n")); - Bucket = ExAllocatePool( NonPagedPool, sizeof(*Bucket) ); + Bucket = exAllocatePool( NonPagedPool, sizeof(*Bucket) ); if( !Bucket ) return STATUS_NO_MEMORY; TcpipRecursiveMutexEnter( &TCPLock, TRUE ); @@ -695,7 +695,7 @@ /* Keep this request around ... there was no data yet */ if( Status == STATUS_PENDING ) { /* Freed in TCPSocketState */ - Bucket = ExAllocatePool( NonPagedPool, sizeof(*Bucket) ); + Bucket = exAllocatePool( NonPagedPool, sizeof(*Bucket) ); if( !Bucket ) { TI_DbgPrint(DEBUG_TCP,("Failed to allocate bucket\n")); TcpipRecursiveMutexLeave( &TCPLock ); @@ -754,7 +754,7 @@ /* Keep this request around ... there was no data yet */ if( Status == STATUS_PENDING ) { /* Freed in TCPSocketState */ - Bucket = ExAllocatePool( NonPagedPool, sizeof(*Bucket) ); + Bucket = exAllocatePool( NonPagedPool, sizeof(*Bucket) ); if( !Bucket ) { TI_DbgPrint(DEBUG_TCP,("Failed to allocate bucket\n")); TcpipRecursiveMutexLeave( &TCPLock ); @@ -845,7 +845,7 @@ if( Bucket->Request.RequestContext == Irp ) { RemoveEntryList( &Bucket->Entry ); - PoolFreeBuffer( Bucket ); + exFreePool( Bucket ); break; } } Modified: branches/aicom-network-fixes/lib/drivers/oskittcp/include/memtrack.h URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
============================================================================== --- branches/aicom-network-fixes/lib/drivers/oskittcp/include/memtrack.h [iso-8859-1] (original) +++ branches/aicom-network-fixes/lib/drivers/oskittcp/include/memtrack.h [iso-8859-1] Tue Dec 23 06:40:58 2008 @@ -8,7 +8,6 @@ #define FBSD_MALLOC FOURCC('d','s','b','f') #define EXALLOC_TAG FOURCC('E','x','A','l') -#ifdef MEMTRACK #define MTMARK() TrackDumpFL(__FILE__, __LINE__) #define NdisAllocateBuffer(x,y,z,a,b) { \ NdisAllocateBuffer(x,y,z,a,b); \ @@ -60,19 +59,5 @@ } #define MEMTRACK_MAX_TAGS_TO_TRACK 64 -#else -#define MTMARK() -#define Track(x,y) -#define TrackingInit() -#define TrackDump() -#define Untrack(x) -#define TrackTag(x) -#define FreeNdisPacket FreeNdisPacketX -#define exFreePool(x) ExFreePool(x) -#define exAllocatePool(x,y) ExAllocatePool(x,y) -#define exAllocatePoolWithTag(x,y,z) ExAllocatePoolWithTag(x,y,z) -#define TrackWithTag(a,b,c,d) -#define UntrackFL(a,b,c) -#endif #endif/*MEMMTRAC_H*/
15 years, 9 months
1
0
0
0
[cgutman] 38297: Huge memtrack commit (part 1 of 2) - Add checking for proper tags - Enable memtrack by default - Display the conflicting entries when an error occurs - Remove pool* routines and replace with ex* routines
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Dec 23 06:39:55 2008 New Revision: 38297 URL:
http://svn.reactos.org/svn/reactos?rev=38297&view=rev
Log: Huge memtrack commit (part 1 of 2) - Add checking for proper tags - Enable memtrack by default - Display the conflicting entries when an error occurs - Remove pool* routines and replace with ex* routines Removed: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/pool.c Modified: branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c branches/aicom-network-fixes/drivers/network/tcpip/include/memtrack.h branches/aicom-network-fixes/drivers/network/tcpip/include/pool.h branches/aicom-network-fixes/drivers/network/tcpip/tcpip.rbuild branches/aicom-network-fixes/drivers/network/tcpip/tcpip/buffer.c branches/aicom-network-fixes/drivers/network/tcpip/tcpip/dispatch.c branches/aicom-network-fixes/drivers/network/tcpip/tcpip/fileobjs.c branches/aicom-network-fixes/drivers/network/tcpip/tcpip/iinfo.c branches/aicom-network-fixes/drivers/network/tcpip/tcpip/main.c branches/aicom-network-fixes/drivers/network/tcpip/tcpip/mockbuffer.c branches/aicom-network-fixes/drivers/network/tcpip/tcpip/ninfo.c Modified: branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Tue Dec 23 06:39:55 2008 @@ -703,7 +703,7 @@ UnicodeString.MaximumLength = Information->DataLength; String->Buffer = - (PWCHAR)exAllocatePool( NonPagedPool, + (PWCHAR)ExAllocatePool( NonPagedPool, UnicodeString.MaximumLength + sizeof(WCHAR) ); if( !String->Buffer ) return STATUS_NO_MEMORY; Modified: branches/aicom-network-fixes/drivers/network/tcpip/include/memtrack.h URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/include/memtrack.h [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/include/memtrack.h [iso-8859-1] Tue Dec 23 06:39:55 2008 @@ -10,15 +10,17 @@ #define FBSD_MALLOC FOURCC('d','s','b','f') #define EXALLOC_TAG FOURCC('E','x','A','l') #define IRP_TAG FOURCC('P','I','R','P') +#define NPLOOK_TAG FOURCC('N','P','L','A') #define AllocatePacketWithBuffer(x,y,z) AllocatePacketWithBufferX(x,y,z,__FILE__,__LINE__) #define FreeNdisPacket(x) FreeNdisPacketX(x,__FILE__,__LINE__) -#ifdef MEMTRACK #define MTMARK() TrackDumpFL(__FILE__, __LINE__) #define exAllocatePool(x,y) ExAllocatePoolX(x,y,__FILE__,__LINE__) #define exAllocatePoolWithTag(x,y,z) ExAllocatePoolX(x,y,__FILE__,__LINE__) #define exFreePool(x) ExFreePoolX(x,__FILE__,__LINE__) +#define exAllocateFromNPagedLookasideList(x) ExAllocateFromNPagedLookasideListX(x,__FILE__,__LINE__) +#define exFreeToNPagedLookasideList(x,y) ExFreeToNPagedLookasideListX(x,y,__FILE__,__LINE__) typedef struct _ALLOCATION_TRACKER { LIST_ENTRY Entry; @@ -31,35 +33,34 @@ VOID TrackingInit(); VOID TrackWithTag( DWORD Tag, PVOID Thing, PCHAR File, DWORD Line ); #define Track(Tag,Thing) TrackWithTag(Tag,Thing,__FILE__,__LINE__) -VOID UntrackFL( PCHAR File, DWORD Line, PVOID Thing ); +VOID UntrackFL( PCHAR File, DWORD Line, PVOID Thing, DWORD Tag ); #define Untrack(Thing) UntrackFL(__FILE__,__LINE__,Thing) VOID TrackDumpFL( PCHAR File, DWORD Line ); #define TrackDump() TrackDumpFL(__FILE__,__LINE__) VOID TrackTag( DWORD Tag ); +static __inline PVOID ExAllocateFromNPagedLookasideListX( PNPAGED_LOOKASIDE_LIST List, PCHAR File, ULONG Line ) { + PVOID Out = ExAllocateFromNPagedLookasideList( List ); + if( Out ) TrackWithTag( NPLOOK_TAG, Out, File, Line ); + return Out; +} + +static __inline VOID ExFreeToNPagedLookasideListX( PNPAGED_LOOKASIDE_LIST List, PVOID Thing, PCHAR File, ULONG Line ) { + UntrackFL(File, Line, Thing, NPLOOK_TAG); + ExFreeToNPagedLookasideList( List, Thing ); +} + static __inline PVOID ExAllocatePoolX( POOL_TYPE type, SIZE_T size, PCHAR File, ULONG Line ) { - PVOID Out = PoolAllocateBuffer( size ); + PVOID Out = ExAllocatePool( type, size ); if( Out ) TrackWithTag( EXALLOC_TAG, Out, File, Line ); return Out; } + static __inline VOID ExFreePoolX( PVOID Data, PCHAR File, ULONG Line ) { - UntrackFL(File, Line, Data); - PoolFreeBuffer(Data); + UntrackFL(File, Line, Data, EXALLOC_TAG); + ExFreePool( Data ); } #define MEMTRACK_MAX_TAGS_TO_TRACK 64 -#else -#define MTMARK() -#define Track(x,y) -#define TrackingInit() -#define TrackDump() -#define Untrack(x) -#define TrackTag(x) -#define exAllocatePoolWithTag(x,y,z) ExAllocatePoolWithTag(x,y,z) -#define exAllocatePool(x,y) PoolAllocateBuffer(y) -#define exFreePool(x) PoolFreeBuffer(x) -#define TrackWithTag(w,x,y,z) -#define UntrackFL(x,y,z) -#endif #endif/*MEMMTRAC_H*/ Modified: branches/aicom-network-fixes/drivers/network/tcpip/include/pool.h URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/include/pool.h [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/include/pool.h [iso-8859-1] Tue Dec 23 06:39:55 2008 @@ -7,16 +7,6 @@ #ifndef __POOL_H #define __POOL_H - -PVOID PoolAllocateBuffer( - ULONG Size); - -VOID PoolFreeBuffer( - PVOID Buffer); - -PVOID TcpipAllocateFromNPagedLookasideList( PNPAGED_LOOKASIDE_LIST List ); -VOID TcpipFreeToNPagedLookasideList( PNPAGED_LOOKASIDE_LIST List, - PVOID Thing ); NDIS_STATUS PrependPacket( PNDIS_PACKET Packet, PCHAR Data, UINT Len, BOOLEAN Copy ); Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip.rbuild [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip.rbuild [iso-8859-1] Tue Dec 23 06:39:55 2008 @@ -33,7 +33,6 @@ <file>lock.c</file> <file>main.c</file> <file>ninfo.c</file> - <file>pool.c</file> <file>proto.c</file> <file>tinfo.c</file> <file>wait.c</file> Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/buffer.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/buffer.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/buffer.c [iso-8859-1] Tue Dec 23 06:39:55 2008 @@ -318,7 +318,7 @@ PCHAR NewBuf; if( Copy ) { - NewBuf = ExAllocatePool( NonPagedPool, Length ); + NewBuf = exAllocatePool( NonPagedPool, Length ); if( !NewBuf ) return NDIS_STATUS_RESOURCES; RtlCopyMemory( NewBuf, Data, Length ); } else NewBuf = Data; @@ -350,25 +350,22 @@ NDIS_STATUS Status; PCHAR NewData; - NewData = ExAllocatePool( NonPagedPool, Len ); + NewData = exAllocatePool( NonPagedPool, Len ); if( !NewData ) return NDIS_STATUS_RESOURCES; - TrackWithTag(EXALLOC_TAG, NewData, File, Line); if( Data ) RtlCopyMemory(NewData, Data, Len); NdisAllocatePacket( &Status, &Packet, GlobalPacketPool ); if( Status != NDIS_STATUS_SUCCESS ) { - UntrackFL( File, Line, NewData ); - ExFreePool( NewData ); + exFreePool( NewData ); return Status; } TrackWithTag(NDIS_PACKET_TAG, Packet, File, Line); NdisAllocateBuffer( &Status, &Buffer, GlobalBufferPool, NewData, Len ); if( Status != NDIS_STATUS_SUCCESS ) { - UntrackFL( File, Line, NewData ); - ExFreePool( NewData ); - UntrackFL( File, Line, Packet ); + exFreePool( NewData ); + UntrackFL( File, Line, Packet, NDIS_PACKET_TAG ); FreeNdisPacket( Packet ); return Status; } @@ -404,14 +401,13 @@ NdisGetNextBuffer(Buffer, &NextBuffer); NdisQueryBuffer(Buffer, &Data, &Length); TI_DbgPrint(DEBUG_PBUFFER, ("Freeing ndis buffer (0x%X)\n", Buffer)); - UntrackFL(File,Line,Buffer); + UntrackFL(File,Line,Buffer,NDIS_BUFFER_TAG); NdisFreeBuffer(Buffer); TI_DbgPrint(DEBUG_PBUFFER, ("Freeing exal buffer (0x%X)\n", Data)); - UntrackFL(File,Line,Data); - ExFreePool(Data); + exFreePool(Data); } /* Finally free the NDIS packet discriptor */ - UntrackFL(File,Line,Packet); + UntrackFL(File,Line,Packet,NDIS_PACKET_TAG); NdisFreePacket(Packet); } Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/dispatch.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] Tue Dec 23 06:39:55 2008 @@ -1281,7 +1281,7 @@ QueryContext->Irp->IoStatus.Information = ByteCount; QueryContext->Irp->IoStatus.Status = Status; - ExFreePool(QueryContext); + exFreePool(QueryContext); } @@ -1344,7 +1344,7 @@ IrpSp->Parameters.DeviceIoControl.Type3InputBuffer; OutputBuffer = Irp->UserBuffer; - QueryContext = ExAllocatePool(NonPagedPool, sizeof(TI_QUERY_CONTEXT)); + QueryContext = exAllocatePool(NonPagedPool, sizeof(TI_QUERY_CONTEXT)); if (QueryContext) { _SEH_TRY { InputMdl = IoAllocateMdl(InputBuffer, @@ -1407,7 +1407,7 @@ IoFreeMdl(OutputMdl); } - ExFreePool(QueryContext); + exFreePool(QueryContext); } else Status = STATUS_INSUFFICIENT_RESOURCES; } else if( InputBufferLength == @@ -1420,7 +1420,7 @@ Size = 0; - QueryContext = ExAllocatePool(NonPagedPool, sizeof(TI_QUERY_CONTEXT)); + QueryContext = exAllocatePool(NonPagedPool, sizeof(TI_QUERY_CONTEXT)); if (!QueryContext) return STATUS_INSUFFICIENT_RESOURCES; _SEH_TRY { @@ -1440,7 +1440,7 @@ if( !NT_SUCCESS(Status) || !InputMdl ) { if( InputMdl ) IoFreeMdl( InputMdl ); - ExFreePool(QueryContext); + exFreePool(QueryContext); return Status; } Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/fileobjs.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] Tue Dec 23 06:39:55 2008 @@ -123,7 +123,7 @@ * Object = Pointer to address file object to free */ { - ExFreePool(Object); + exFreePool(Object); } @@ -135,7 +135,7 @@ * Object = Pointer to address file object to free */ { - ExFreePool(Object); + exFreePool(Object); } @@ -190,7 +190,7 @@ /* Abort the request and free its resources */ TcpipReleaseSpinLock(&AddrFile->Lock, OldIrql); (*SendRequest->Complete)(SendRequest->Context, STATUS_ADDRESS_CLOSED, 0); - ExFreePool(SendRequest); + exFreePool(SendRequest); TcpipAcquireSpinLock(&AddrFile->Lock, &OldIrql); CurrentEntry = NextEntry; } @@ -247,7 +247,7 @@ TI_DbgPrint(MID_TRACE, ("Called (Proto %d).\n", Protocol)); - AddrFile = ExAllocatePool(NonPagedPool, sizeof(ADDRESS_FILE)); + AddrFile = exAllocatePool(NonPagedPool, sizeof(ADDRESS_FILE)); if (!AddrFile) { TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); return STATUS_INSUFFICIENT_RESOURCES; @@ -272,7 +272,7 @@ Matched = AddrLocateADEv4(IPv4Address, &AddrFile->Address); if (!Matched) { - ExFreePool(AddrFile); + exFreePool(AddrFile); TI_DbgPrint(MIN_TRACE, ("Non-local address given (0x%X).\n", DN2H(IPv4Address))); return STATUS_INVALID_PARAMETER; } @@ -290,7 +290,7 @@ AddrFile->Port != Address->Address[0].Address[0].sin_port) || AddrFile->Port == 0xffff) { - ExFreePool(AddrFile); + exFreePool(AddrFile); return STATUS_INVALID_PARAMETER; } @@ -306,7 +306,7 @@ AddrFile->Port != Address->Address[0].Address[0].sin_port) || AddrFile->Port == 0xffff) { - ExFreePool(AddrFile); + exFreePool(AddrFile); return STATUS_INVALID_PARAMETER; } @@ -389,7 +389,7 @@ TCPFreePort( AddrFile->Port ); if( AddrFile->Listener ) { TCPClose( AddrFile->Listener ); - ExFreePool( AddrFile->Listener ); + exFreePool( AddrFile->Listener ); } break; @@ -518,7 +518,7 @@ PCONTROL_CHANNEL ControlChannel; TI_DbgPrint(MID_TRACE, ("Called.\n")); - ControlChannel = ExAllocatePool(NonPagedPool, sizeof(*ControlChannel)); + ControlChannel = exAllocatePool(NonPagedPool, sizeof(*ControlChannel)); if (!ControlChannel) { TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); @@ -558,7 +558,7 @@ PCONTROL_CHANNEL ControlChannel = Request->Handle.ControlChannel; NTSTATUS Status = STATUS_SUCCESS; - ExFreePool(ControlChannel); + exFreePool(ControlChannel); Request->Handle.ControlChannel = NULL; return Status; Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/iinfo.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/iinfo.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/iinfo.c [iso-8859-1] Tue Dec 23 06:39:55 2008 @@ -26,7 +26,7 @@ Interface, IF, ID->tei_entity, ID->tei_instance)); OutData = - (PIFENTRY)ExAllocatePool( NonPagedPool, + (PIFENTRY)exAllocatePool( NonPagedPool, sizeof(IFENTRY) + MAX_IFDESCR_LEN ); if( !OutData ) return TDI_NO_RESOURCES; /* Out of memory */ @@ -71,7 +71,7 @@ ID->tei_entity, ID->tei_instance, Size)); Status = InfoCopyOut( (PCHAR)OutData, Size, Buffer, BufferSize ); - ExFreePool( OutData ); + exFreePool( OutData ); TI_DbgPrint(DEBUG_INFO,("Returning %x\n", Status)); @@ -86,7 +86,7 @@ DWORD NumNeighbors = NBCopyNeighbors( Interface, NULL ); DWORD MemSize = NumNeighbors * sizeof(IPARP_ENTRY); PIPARP_ENTRY ArpEntries = - ExAllocatePoolWithTag + exAllocatePoolWithTag ( NonPagedPool, MemSize, FOURCC('A','R','P','t') ); if( !ArpEntries ) return STATUS_NO_MEMORY; @@ -94,7 +94,7 @@ Status = InfoCopyOut( (PVOID)ArpEntries, MemSize, Buffer, BufferSize ); - ExFreePool( ArpEntries ); + exFreePool( ArpEntries ); return Status; } Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/main.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/main.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/main.c [iso-8859-1] Tue Dec 23 06:39:55 2008 @@ -131,7 +131,7 @@ #endif CP /* Allocate resources here. We release them again if something failed */ - Context = ExAllocatePool(NonPagedPool, sizeof(TRANSPORT_CONTEXT)); + Context = exAllocatePool(NonPagedPool, sizeof(TRANSPORT_CONTEXT)); if (!Context) { TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); return STATUS_INSUFFICIENT_RESOURCES; @@ -169,7 +169,7 @@ TI_DbgPrint(MIN_TRACE, ("AddressType: %\n", Address->Address[0].AddressType)); } - PoolFreeBuffer(Context); + exFreePool(Context); return STATUS_INVALID_PARAMETER; } CP @@ -186,12 +186,12 @@ Status = TiGetProtocolNumber(&IrpSp->FileObject->FileName, &Protocol); if (!NT_SUCCESS(Status)) { TI_DbgPrint(MIN_TRACE, ("Raw IP protocol number is invalid.\n")); - PoolFreeBuffer(Context); + exFreePool(Context); return STATUS_INVALID_PARAMETER; } } else { TI_DbgPrint(MIN_TRACE, ("Invalid device object at (0x%X).\n", DeviceObject)); - PoolFreeBuffer(Context); + exFreePool(Context); return STATUS_INVALID_PARAMETER; } CP @@ -213,7 +213,7 @@ if (EaInfo->EaValueLength < sizeof(PVOID)) { TI_DbgPrint(MIN_TRACE, ("Parameters are invalid.\n")); - PoolFreeBuffer(Context); + exFreePool(Context); return STATUS_INVALID_PARAMETER; } @@ -221,7 +221,7 @@ if (DeviceObject != TCPDeviceObject) { TI_DbgPrint(MIN_TRACE, ("Bad device object.\n")); - PoolFreeBuffer(Context); + exFreePool(Context); return STATUS_INVALID_PARAMETER; } @@ -244,7 +244,7 @@ } if (!NT_SUCCESS(Status)) - PoolFreeBuffer(Context); + exFreePool(Context); TI_DbgPrint(DEBUG_IRP, ("Leaving. Status = (0x%X).\n", Status)); @@ -353,7 +353,7 @@ case IRP_MJ_CLOSE: Context = (PTRANSPORT_CONTEXT)IrpSp->FileObject->FsContext; if (Context) - PoolFreeBuffer(Context); + exFreePool(Context); Status = STATUS_SUCCESS; break; @@ -608,7 +608,7 @@ IoDeleteDevice(IPDeviceObject); if (EntityList) - PoolFreeBuffer(EntityList); + exFreePool(EntityList); TI_DbgPrint(MAX_TRACE, ("Leaving.\n")); } @@ -714,7 +714,7 @@ /* Setup network layer and transport layer entities */ KeInitializeSpinLock(&EntityListLock); - EntityList = ExAllocatePool(NonPagedPool, sizeof(TDIEntityID) * MAX_TDI_ENTITIES ); + EntityList = exAllocatePool(NonPagedPool, sizeof(TDIEntityID) * MAX_TDI_ENTITIES ); if (!EntityList) { TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); ChewShutdown(); @@ -746,7 +746,7 @@ IoDeleteDevice(RawIPDeviceObject); IoDeleteDevice(UDPDeviceObject); IoDeleteDevice(TCPDeviceObject); - ExFreePool(EntityList); + exFreePool(EntityList); return STATUS_INSUFFICIENT_RESOURCES; } @@ -758,7 +758,7 @@ IoDeleteDevice(RawIPDeviceObject); IoDeleteDevice(UDPDeviceObject); IoDeleteDevice(TCPDeviceObject); - ExFreePool(EntityList); + exFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); return STATUS_INSUFFICIENT_RESOURCES; } @@ -787,7 +787,7 @@ IoDeleteDevice(RawIPDeviceObject); IoDeleteDevice(UDPDeviceObject); IoDeleteDevice(TCPDeviceObject); - ExFreePool(EntityList); + exFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); return Status; @@ -802,7 +802,7 @@ IoDeleteDevice(RawIPDeviceObject); IoDeleteDevice(UDPDeviceObject); IoDeleteDevice(TCPDeviceObject); - ExFreePool(EntityList); + exFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); return Status; @@ -818,7 +818,7 @@ IoDeleteDevice(RawIPDeviceObject); IoDeleteDevice(UDPDeviceObject); IoDeleteDevice(TCPDeviceObject); - ExFreePool(EntityList); + exFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); return Status; @@ -846,7 +846,7 @@ IoDeleteDevice(RawIPDeviceObject); IoDeleteDevice(UDPDeviceObject); IoDeleteDevice(TCPDeviceObject); - ExFreePool(EntityList); + exFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); return Status; @@ -865,7 +865,7 @@ IoDeleteDevice(RawIPDeviceObject); IoDeleteDevice(UDPDeviceObject); IoDeleteDevice(TCPDeviceObject); - ExFreePool(EntityList); + exFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); LANUnregisterProtocol(); Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/mockbuffer.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/mockbuffer.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/mockbuffer.c [iso-8859-1] Tue Dec 23 06:39:55 2008 @@ -430,7 +430,7 @@ NDIS_STATUS Status; PCHAR NewData; - NewData = ExAllocatePool( NonPagedPool, Len ); + NewData = exAllocatePool( NonPagedPool, Len ); if( !NewData ) return NDIS_STATUS_NOT_ACCEPTED; // XXX TrackWithTag(EXALLOC_TAG, NewData, File, Line); @@ -439,14 +439,14 @@ NdisAllocatePacket( &Status, &Packet, GlobalPacketPool ); if( Status != NDIS_STATUS_SUCCESS ) { - ExFreePool( NewData ); + exFreePool( NewData ); return Status; } TrackWithTag(NDIS_PACKET_TAG, Packet, File, Line); NdisAllocateBuffer( &Status, &Buffer, GlobalBufferPool, NewData, Len ); if( Status != NDIS_STATUS_SUCCESS ) { - ExFreePool( NewData ); + exFreePool( NewData ); FreeNdisPacket( Packet ); } TrackWithTag(NDIS_BUFFER_TAG, Buffer, File, Line); @@ -482,8 +482,7 @@ XNdisQueryBuffer(Buffer, &Data, &Length); UntrackFL(File,Line,Buffer); NdisFreeBuffer(Buffer); - UntrackFL(File,Line,Data); - ExFreePool(Data); + exFreePool(Data); } /* Finally free the NDIS packet discriptor */ Modified: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/ninfo.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/ninfo.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/ninfo.c [iso-8859-1] Tue Dec 23 06:39:55 2008 @@ -21,7 +21,7 @@ UINT Count = 0; UINT IfCount = CountInterfaces(); PIPADDR_ENTRY IpAddress = - ExAllocatePool( NonPagedPool, sizeof( IPADDR_ENTRY ) * IfCount ); + exAllocatePool( NonPagedPool, sizeof( IPADDR_ENTRY ) * IfCount ); PIPADDR_ENTRY IpCurrent = IpAddress; IF_LIST_ITER(CurrentIF); @@ -58,7 +58,7 @@ Status = InfoCopyOut( (PCHAR)IpAddress, sizeof(*IpAddress) * IfCount, Buffer, BufferSize ); - ExFreePool( IpAddress ); + exFreePool( IpAddress ); TI_DbgPrint(DEBUG_INFO, ("Returning %08x\n", Status)); @@ -72,17 +72,17 @@ UINT RtCount = CountFIBs(); UINT Size = sizeof( IPROUTE_ENTRY ) * RtCount; PFIB_ENTRY RCache = - ExAllocatePool( NonPagedPool, sizeof( FIB_ENTRY ) * RtCount ), + exAllocatePool( NonPagedPool, sizeof( FIB_ENTRY ) * RtCount ), RCacheCur = RCache; - PIPROUTE_ENTRY RouteEntries = ExAllocatePool( NonPagedPool, Size ), + PIPROUTE_ENTRY RouteEntries = exAllocatePool( NonPagedPool, Size ), RtCurrent = RouteEntries; TI_DbgPrint(DEBUG_INFO, ("Called, routes = %d, RCache = %08x\n", RtCount, RCache)); if( !RCache || !RouteEntries ) { - if( RCache ) ExFreePool( RCache ); - if( RouteEntries ) ExFreePool( RouteEntries ); + if( RCache ) exFreePool( RCache ); + if( RouteEntries ) exFreePool( RouteEntries ); return TDI_NO_RESOURCES; } @@ -133,8 +133,8 @@ Status = InfoCopyOut( (PCHAR)RouteEntries, Size, Buffer, BufferSize ); - ExFreePool( RouteEntries ); - ExFreePool( RCache ); + exFreePool( RouteEntries ); + exFreePool( RCache ); TI_DbgPrint(DEBUG_INFO, ("Returning %08x\n", Status)); Removed: branches/aicom-network-fixes/drivers/network/tcpip/tcpip/pool.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/tcpip/tcpip/pool.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/tcpip/tcpip/pool.c (removed) @@ -1,68 +1,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS TCP/IP protocol driver - * FILE: tcpip/pool.c - * PURPOSE: Routines for controling pools - * PROGRAMMERS: Casper S. Hornstrup (chorns(a)users.sourceforge.net) - * REVISIONS: - * CSH 01/08-2000 Created - */ - -#include "precomp.h" - - -PVOID PoolAllocateBuffer( - ULONG Size) -/* - * FUNCTION: Returns a buffer from the free buffer pool - * RETURNS: - * Pointer to buffer, NULL if there was not enough - * free resources - */ -{ - PVOID Buffer; - - /* FIXME: Get buffer from a free buffer pool with enough room */ - - Buffer = ExAllocatePool(NonPagedPool, Size); - - TI_DbgPrint(DEBUG_MEMORY, ("Allocated (%i) bytes at (0x%X).\n", Size, Buffer)); - - return Buffer; -} - - -VOID PoolFreeBuffer( - PVOID Buffer) -/* - * FUNCTION: Returns a buffer to the free buffer pool - * ARGUMENTS: - * Buffer = Buffer to return to free buffer pool - */ -{ - /* FIXME: Put buffer in free buffer pool */ - - TI_DbgPrint(DEBUG_MEMORY, ("Freeing buffer at (0x%X).\n", Buffer)); - - ExFreePool(Buffer); -} - -PVOID TcpipAllocateFromNPagedLookasideList( PNPAGED_LOOKASIDE_LIST List ) { - PVOID Buffer; - - Buffer = ExAllocateFromNPagedLookasideList( List ); - - TI_DbgPrint(DEBUG_MEMORY, ("Allocated from Nonpaged Lookaside List at (0x%X).\n", Buffer)); - - return Buffer; -} - -VOID TcpipFreeToNPagedLookasideList( PNPAGED_LOOKASIDE_LIST List, - PVOID Thing ) { - - TI_DbgPrint(DEBUG_MEMORY, ("Freeing buffer (0x%X) to Nonpaged Lookaside List.\n", Thing)); - - ExFreeToNPagedLookasideList( List, Thing ); -} - -/* EOF */
15 years, 9 months
1
0
0
0
[jimtabor] 38296: - More updates to global server information structure.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Dec 22 22:51:03 2008 New Revision: 38296 URL:
http://svn.reactos.org/svn/reactos?rev=38296&view=rev
Log: - More updates to global server information structure. Modified: trunk/reactos/include/reactos/win32k/ntuser.h Modified: trunk/reactos/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Mon Dec 22 22:51:03 2008 @@ -277,6 +277,14 @@ COLORREF SysColors[COLOR_MENUBAR+1]; // GetSysColor HBRUSH SysColorBrushes[COLOR_MENUBAR+1]; // GetSysColorBrush HPEN SysColorPens[COLOR_MENUBAR+1]; // ReactOS exclusive + HBRUSH hbrGray; + POINTL ptCursor; + // + DWORD cxSysFontChar; + DWORD cySysFontChar; + DWORD cxMsgFontChar; + DWORD cyMsgFontChar; + TEXTMETRICW tmSysFont; // RECTL rcScreen; WORD BitCount; @@ -284,7 +292,7 @@ BYTE BitsPixel; BYTE Planes; WORD reserved; - DWORD PUSIFlags; + DWORD PUSIFlags; // PERUSERSERVERINFO Flags. ULONG uCaretWidth; LANGID UILangID; UINT LastRITWasKeyboard : 1;
15 years, 9 months
1
0
0
0
[hyperion] 38295: modified include/reactos/libs/pseh/pseh2.h modified lib/pseh/framebased-gcchack.c modified lib/pseh/i386/framebased-gcchack.S (Re)added arguments to _SEH2_EXCEPT nested routines, so that using _SEH2_GetExceptionCode and _SEH2_GetExceptionInformation in exception filters doesn't force the creation of function trampolines (and related horrid inline code) Reimplemented some internal library routines in C
by hyperion@svn.reactos.org
Author: hyperion Date: Mon Dec 22 20:45:25 2008 New Revision: 38295 URL:
http://svn.reactos.org/svn/reactos?rev=38295&view=rev
Log: modified include/reactos/libs/pseh/pseh2.h modified lib/pseh/framebased-gcchack.c modified lib/pseh/i386/framebased-gcchack.S (Re)added arguments to _SEH2_EXCEPT nested routines, so that using _SEH2_GetExceptionCode and _SEH2_GetExceptionInformation in exception filters doesn't force the creation of function trampolines (and related horrid inline code) Reimplemented some internal library routines in C Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h trunk/reactos/lib/pseh/framebased-gcchack.c trunk/reactos/lib/pseh/i386/framebased-gcchack.S Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/pseh/…
============================================================================== --- trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] Mon Dec 22 20:45:25 2008 @@ -46,7 +46,6 @@ { _SEH2Registration_t SF_Registration; volatile struct __SEH2TryLevel * volatile SF_TopTryLevel; - struct _EXCEPTION_POINTERS * volatile SF_ExceptionInformation; volatile unsigned long SF_Code; } _SEH2Frame_t; @@ -140,15 +139,23 @@ #define __SEH_FORCE_NEST \ __asm__ __volatile__("#%0" : : "r" (&_SEHFrame)) -#define __SEH_DECLARE_EXCEPT_PFN(NAME_) int (__cdecl * NAME_)(void) -#define __SEH_DECLARE_EXCEPT(NAME_) int __cdecl NAME_(void) -#define __SEH_DEFINE_EXCEPT(NAME_) int __cdecl NAME_(void) - -#define __SEH_DECLARE_FINALLY_PFN(NAME_) void (__cdecl * NAME_)(void) -#define __SEH_DECLARE_FINALLY(NAME_) void __cdecl NAME_(void) -#define __SEH_DEFINE_FINALLY(NAME_) void __cdecl NAME_(void) - -#define __SEH_RETURN_EXCEPT(R_) return (int)(R_) +#define __SEH_EXCEPT_RET long +#define __SEH_EXCEPT_ARGS __attribute__((unused)) _SEH2Frame_t * _SEH2FrameP, __attribute__((unused)) struct _EXCEPTION_POINTERS * _SEHExceptionInformation +#define __SEH_EXCEPT_ARGS_ , __SEH_EXCEPT_ARGS +#define __SEH_EXCEPT_PFN __SEH_DECLARE_EXCEPT_PFN +#define __SEH_DECLARE_EXCEPT_PFN(NAME_) __SEH_EXCEPT_RET (__cdecl * NAME_)(__SEH_EXCEPT_ARGS) +#define __SEH_DECLARE_EXCEPT(NAME_) __SEH_EXCEPT_RET __cdecl NAME_(__SEH_EXCEPT_ARGS) +#define __SEH_DEFINE_EXCEPT(NAME_) __SEH_EXCEPT_RET __cdecl NAME_(__SEH_EXCEPT_ARGS) + +#define __SEH_FINALLY_RET void +#define __SEH_FINALLY_ARGS void +#define __SEH_FINALLY_ARGS_ +#define __SEH_FINALLY_PFN __SEH_DECLARE_FINALLY_PFN +#define __SEH_DECLARE_FINALLY_PFN(NAME_) __SEH_FINALLY_RET (__cdecl * NAME_)(__SEH_FINALLY_ARGS) +#define __SEH_DECLARE_FINALLY(NAME_) __SEH_FINALLY_RET __cdecl NAME_(__SEH_FINALLY_ARGS) +#define __SEH_DEFINE_FINALLY(NAME_) __SEH_FINALLY_RET __cdecl NAME_(__SEH_FINALLY_ARGS) + +#define __SEH_RETURN_EXCEPT(R_) return (long)(R_) #define __SEH_RETURN_FINALLY() return #define __SEH_BEGIN_TRY \ @@ -175,9 +182,9 @@ #define __SEH_LEAVE_TRYLEVEL() __SEH_SET_TRYLEVEL(_SEHPrevTryLevelP) #define __SEH_END_SCOPE_CHAIN \ - static const int _SEH2ScopeKind = 1; \ - static _SEH2Frame_t * const _SEH2FrameP = 0; \ - static _SEH2TryLevel_t * const _SEH2TryLevelP = 0; + static __attribute__((unused)) const int _SEH2ScopeKind = 1; \ + static __attribute__((unused)) _SEH2Frame_t * const _SEH2FrameP = 0; \ + static __attribute__((unused)) _SEH2TryLevel_t * const _SEH2TryLevelP = 0; #define __SEH_BEGIN_SCOPE \ for(;;) \ @@ -287,35 +294,39 @@ \ _SEHBeforeTry:; \ \ - if(__builtin_constant_p((__VA_ARGS__))) \ - { \ - if((__VA_ARGS__) > 0) \ + { \ + __attribute__((unused)) struct _EXCEPTION_POINTERS * volatile _SEHExceptionInformation; \ + \ + if(__builtin_constant_p((__VA_ARGS__))) \ { \ - _SEHTryLevel.ST_Filter = (void *)1; \ + if((__VA_ARGS__) > 0) \ + { \ + _SEHTryLevel.ST_Filter = (void *)1; \ + _SEHTryLevel.ST_Body = &&_SEHBeginExcept; \ + __SEH_USE_LABEL(_SEHBeginExcept); \ + } \ + else if((__VA_ARGS__) < 0) \ + { \ + _SEHTryLevel.ST_Filter = (void *)-1; \ + _SEHTryLevel.ST_Body = NULL; \ + } \ + else \ + { \ + _SEHTryLevel.ST_Filter = (void *)0; \ + _SEHTryLevel.ST_Body = NULL; \ + } \ + } \ + else \ + { \ + __SEH_DEFINE_EXCEPT(_SEHExcept) \ + { \ + __SEH_RETURN_EXCEPT((__VA_ARGS__)); \ + } \ + \ + _SEHTryLevel.ST_Filter = &_SEHExcept; \ _SEHTryLevel.ST_Body = &&_SEHBeginExcept; \ __SEH_USE_LABEL(_SEHBeginExcept); \ } \ - else if((__VA_ARGS__) < 0) \ - { \ - _SEHTryLevel.ST_Filter = (void *)-1; \ - _SEHTryLevel.ST_Body = NULL; \ - } \ - else \ - { \ - _SEHTryLevel.ST_Filter = (void *)0; \ - _SEHTryLevel.ST_Body = NULL; \ - } \ - } \ - else \ - { \ - __SEH_DEFINE_EXCEPT(_SEHExcept) \ - { \ - __SEH_RETURN_EXCEPT((__VA_ARGS__)); \ - } \ - \ - _SEHTryLevel.ST_Filter = &_SEHExcept; \ - _SEHTryLevel.ST_Body = &&_SEHBeginExcept; \ - __SEH_USE_LABEL(_SEHBeginExcept); \ } \ \ __SEH_BARRIER; \ @@ -347,8 +358,6 @@ _SEHBeginExcept:; \ { \ { \ - _SEH2Frame_t * const _SEH2FrameP = _SEHTopTryLevel ? &_SEHFrame : _SEHCurFrameP; \ - (void)_SEH2FrameP; \ __SEH_BARRIER; #define _SEH2_END \ @@ -360,7 +369,7 @@ } \ __SEH_END_SCOPE; -#define _SEH2_GetExceptionInformation() ((_SEH2FrameP)->SF_ExceptionInformation) +#define _SEH2_GetExceptionInformation() (_SEHExceptionInformation) #define _SEH2_GetExceptionCode() ((_SEH2FrameP)->SF_Code) #define _SEH2_AbnormalTermination() (_SEHAbnormalTermination) Modified: trunk/reactos/lib/pseh/framebased-gcchack.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/framebased-gcchac…
============================================================================== --- trunk/reactos/lib/pseh/framebased-gcchack.c [iso-8859-1] (original) +++ trunk/reactos/lib/pseh/framebased-gcchack.c [iso-8859-1] Mon Dec 22 20:45:25 2008 @@ -20,14 +20,15 @@ DEALINGS IN THE SOFTWARE. */ -#define _NTSYSTEM_ +#define _NTSYSTEM_ /* removes dllimport attribute from RtlUnwind */ + #define STRICT #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <pseh/pseh2.h> - #include <excpt.h> +#include <intrin.h> #ifndef EXCEPTION_EXIT_UNWIND #define EXCEPTION_EXIT_UNWIND 4 @@ -37,17 +38,28 @@ #define EXCEPTION_UNWINDING 2 #endif -extern _SEH2Registration_t * __cdecl _SEH2CurrentRegistration(void); - -extern int __SEH2Except(void *, void *); -extern void __SEH2Finally(void *, void *); extern DECLSPEC_NORETURN int __SEH2Handle(void *, void *, void *); - -extern void __cdecl __SEH2EnterFrame(_SEH2Registration_t *); -extern void __cdecl __SEH2LeaveFrame(void); - extern int __cdecl __SEH2FrameHandler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *); extern int __cdecl __SEH2NestedHandler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *); + +FORCEINLINE +_SEH2Registration_t * __cdecl _SEH2CurrentRegistration(void) +{ + return (_SEH2Registration_t *)__readfsdword(0); +} + +FORCEINLINE +void __cdecl __SEH2EnterFrame(_SEH2Registration_t * frame) +{ + frame->SER_Prev = _SEH2CurrentRegistration(); + __writefsdword(0, (unsigned long)frame); +} + +FORCEINLINE +void __cdecl __SEH2LeaveFrame(void) +{ + __writefsdword(0, (unsigned long)_SEH2CurrentRegistration()->SER_Prev); +} FORCEINLINE void _SEH2GlobalUnwind(void * target) @@ -67,11 +79,12 @@ ); } -FORCEINLINE -int _SEH2Except(_SEH2Frame_t * frame, volatile _SEH2TryLevel_t * trylevel) +static +__SEH_EXCEPT_RET _SEH2Except(_SEH2Frame_t * frame, volatile _SEH2TryLevel_t * trylevel, struct _EXCEPTION_POINTERS * ep) { void * filter = trylevel->ST_Filter; void * context = NULL; + __SEH_EXCEPT_RET ret; if(filter == (void *)0) return 0; @@ -88,10 +101,22 @@ filter = _SEHFunctionFromTrampoline((_SEHTrampoline_t *)filter); } - return __SEH2Except(filter, context); -} - -FORCEINLINE + __asm__ __volatile__ + ( + "push %[ep]\n" + "push %[frame]\n" + "call *%[filter]\n" + "pop %%edx\n" + "pop %%edx\n" : + [ret] "=a" (ret) : + "c" (context), [filter] "r" (filter), [frame] "g" (frame), [ep] "g" (ep) : + "edx", "flags", "memory" + ); + + return ret; +} + +static void _SEH2Finally(_SEH2Frame_t * frame, volatile _SEH2TryLevel_t * trylevel) { if(trylevel->ST_Filter == NULL && trylevel->ST_Body != NULL) @@ -105,7 +130,7 @@ body = _SEHFunctionFromTrampoline((_SEHTrampoline_t *)body); } - __SEH2Finally(body, context); + __asm__ __volatile__("call *%1\n" : : "c" (context), "r" (body) : "eax", "edx", "flags", "memory"); } } @@ -179,11 +204,10 @@ ep.ContextRecord = ContextRecord; frame->SF_Code = ExceptionRecord->ExceptionCode; - frame->SF_ExceptionInformation = &ep; for(trylevel = frame->SF_TopTryLevel; trylevel != NULL; trylevel = trylevel->ST_Next) { - ret = _SEH2Except(frame, trylevel); + ret = _SEH2Except(frame, trylevel, &ep); if(ret < 0) return ExceptionContinueExecution; Modified: trunk/reactos/lib/pseh/i386/framebased-gcchack.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/i386/framebased-g…
============================================================================== --- trunk/reactos/lib/pseh/i386/framebased-gcchack.S [iso-8859-1] (original) +++ trunk/reactos/lib/pseh/i386/framebased-gcchack.S [iso-8859-1] Mon Dec 22 20:45:25 2008 @@ -21,32 +21,6 @@ .text .intel_syntax noprefix -.func _SEH2CurrentRegistration -.globl __SEH2CurrentRegistration -__SEH2CurrentRegistration: - mov eax, [fs:0] - ret -.endfunc - -.func __SEH2EnterFrame -.globl ___SEH2EnterFrame -___SEH2EnterFrame: - mov eax, [esp+4] - mov ecx, [fs:0] - mov [eax], ecx - mov [fs:0], eax - ret -.endfunc - -.func __SEH2LeaveFrame -.globl ___SEH2LeaveFrame -___SEH2LeaveFrame: - mov eax, [fs:0] - mov eax, [eax] - mov [fs:0], eax - ret -.endfunc - .func __SEH2Handle .globl ___SEH2Handle ___SEH2Handle: @@ -54,28 +28,6 @@ mov ebp, [esp+8] mov esp, [esp+12] jmp eax -.endfunc - -.func __SEH2Except -.globl ___SEH2Except -___SEH2Except: - mov eax, [esp+4] - mov ecx, [esp+8] - - call eax - - ret -.endfunc - -.func __SEH2Finally -.globl ___SEH2Finally -___SEH2Finally: - mov eax, [esp+4] - mov ecx, [esp+8] - - call eax - - ret .endfunc .func __SEH2FrameHandler
15 years, 9 months
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
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