Author: greatlrd
Date: Sat Mar 22 17:11:54 2008
New Revision: 32750
URL:
http://svn.reactos.org/svn/reactos?rev=3D32750&view=3Drev
Log:
implemented NdisScheduleWorkItem writen by me and arty
Modified:
trunk/reactos/drivers/network/ndis/ndis.def
trunk/reactos/drivers/network/ndis/ndis/stubs.c
trunk/reactos/include/ddk/ndis.h
Modified: trunk/reactos/drivers/network/ndis/ndis.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/=
ndis.def?rev=3D32750&r1=3D32749&r2=3D32750&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/drivers/network/ndis/ndis.def (original)
+++ trunk/reactos/drivers/network/ndis/ndis.def Sat Mar 22 17:11:54 2008
@@ -269,5 +269,6 @@
NdisWritePcmciaAttributeMemory@16
TrFilterDprIndicateReceive@28
TrFilterDprIndicateReceiveComplete@4
+NdisScheduleWorkItem@4
=
; EOF
Modified: trunk/reactos/drivers/network/ndis/ndis/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/=
ndis/stubs.c?rev=3D32750&r1=3D32749&r2=3D32750&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/drivers/network/ndis/ndis/stubs.c (original)
+++ trunk/reactos/drivers/network/ndis/ndis/stubs.c Sat Mar 22 17:11:54 2008
@@ -9,7 +9,6 @@
*/
=
#include "ndissys.h"
-
=
/*
* @unimplemented
@@ -1037,4 +1036,27 @@
return NDIS_STATUS_FAILURE;
}
=
+
+ =
+VOID
+STDCALL
+ndisProcWorkItemHandler(PVOID pContext)
+{
+ PNDIS_WORK_ITEM pNdisItem =3D (PNDIS_WORK_ITEM)pContext;
+ pNdisItem->Routine(pNdisItem, pNdisItem->Context);
+}
+
+EXPORT
+NDIS_STATUS
+NdisScheduleWorkItem(
+ IN PNDIS_WORK_ITEM pWorkItem)
+{
+ PWORK_QUEUE_ITEM pntWorkItem =3D (PWORK_QUEUE_ITEM)pWorkItem->WrapperR=
eserved;
+ ExInitializeWorkItem(pntWorkItem, ndisProcWorkItemHandler, pWorkItem);
+ ExQueueWorkItem(pntWorkItem, CriticalWorkQueue);
+ return NDIS_STATUS_SUCCESS;
+}
+
+
+
/* EOF */
Modified: trunk/reactos/include/ddk/ndis.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ndis.h?re=
v=3D32750&r1=3D32749&r2=3D32750&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/include/ddk/ndis.h (original)
+++ trunk/reactos/include/ddk/ndis.h Sat Mar 22 17:11:54 2008
@@ -2285,7 +2285,7 @@
=
#endif
=
-#if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_ARM)
+#if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_ARM) || defined(_M=
_PPC)
=
/*
* VOID
@@ -2309,17 +2309,17 @@
#else
=
#define NdisMoveMappedMemory(Destination, Source, Length) \
-{
- PUCHAR _Dest =3D Destination, _Src =3D Source, _End =3D _Dest + Length;
- while (_Dest < _End)
- *_Dest++ =3D _Src++;
+{ \
+ PUCHAR _Dest =3D Destination, _Src =3D Source, _End =3D _Dest + Length; \
+ while (_Dest < _End) \
+ *_Dest++ =3D _Src++; \
}
=
#define NdisZeroMappedMemory(Destination, Length) \
-{
- PUCHAR _Dest =3D Destination, _End =3D _Dest + Length;
- while (_Dest < _End)
- *_Dest++ =3D 0;
+{ \
+ PUCHAR _Dest =3D Destination, _End =3D _Dest + Length; \
+ while (_Dest < _End) \
+ *_Dest++ =3D 0; \
}
=
#endif /* _M_IX86 or _M_AMD64 */
@@ -4152,6 +4152,8 @@
PVOID WorkItemContext;
} NDIS_MINIPORT_WORK_ITEM, *PNDIS_MINIPORT_WORK_ITEM;
=
+/* Forward declare to pick up a consistent type */
+typedef struct _NDIS_WORK_ITEM;
#pragma warning(push)
typedef VOID (*NDIS_PROC)(struct _NDIS_WORK_ITEM *, PVOID);
#pragma warning(pop)
@@ -4161,7 +4163,6 @@
NDIS_PROC Routine;
UCHAR WrapperReserved[8*sizeof(PVOID)];
} NDIS_WORK_ITEM, *PNDIS_WORK_ITEM;
-
=
typedef struct _NDIS_BIND_PATHS {
UINT Number;