[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine int_proto.h,1.35,1.36 int_table.
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine int_proto.h,1.35,1.36 int_table.c,1.38,1.39 lib_thread.c,1.7,1.8 |
Date: |
Sat, 07 Dec 2002 05:46:57 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv7459/engine
Modified Files:
int_proto.h int_table.c lib_thread.c
Log Message:
Patch ID: 781 from Tum committed by t3rmin4tor
Index: int_proto.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_proto.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** int_proto.h 5 Dec 2002 18:49:39 -0000 1.35
--- int_proto.h 7 Dec 2002 10:46:55 -0000 1.36
***************
*** 216,219 ****
--- 216,223 ----
extern void _IL_Thread_InternalSetPriority(ILExecThread * _thread, ILObject *
_this, ILInt32 value);
+ extern ILNativeInt _IL_WaitEvent_InternalCreateEvent(ILExecThread * _thread,
ILBool manualReset, ILBool initialState);
+ extern ILBool _IL_WaitEvent_InternalSetEvent(ILExecThread * _thread,
ILNativeInt handle);
+ extern ILBool _IL_WaitEvent_InternalResetEvent(ILExecThread * _thread,
ILNativeInt handle);
+
extern ILInt32 _IL_DefaultEncoding_InternalCodePage(ILExecThread * _thread);
extern ILInt32 _IL_DefaultEncoding_InternalGetByteCount_acii(ILExecThread *
_thread, System_Array * chars, ILInt32 index, ILInt32 count);
Index: int_table.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_table.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** int_table.c 5 Dec 2002 18:49:39 -0000 1.38
--- int_table.c 7 Dec 2002 10:46:55 -0000 1.39
***************
*** 1151,1154 ****
--- 1151,1182 ----
#if !defined(HAVE_LIBFFI)
+ static void marshal_jpbb(void (*fn)(), void *rvalue, void **avalue)
+ {
+ *((ILNativeUInt *)rvalue) = (*(ILNativeUInt (*)(void *, ILInt8,
ILInt8))fn)(*((void * *)(avalue[0])), *((ILInt8 *)(avalue[1])), *((ILInt8
*)(avalue[2])));
+ }
+
+ #endif
+
+ #if !defined(HAVE_LIBFFI)
+
+ static void marshal_bpj(void (*fn)(), void *rvalue, void **avalue)
+ {
+ *((ILNativeInt *)rvalue) = (*(ILInt8 (*)(void *,
ILNativeUInt))fn)(*((void * *)(avalue[0])), *((ILNativeUInt *)(avalue[1])));
+ }
+
+ #endif
+
+ #ifndef _IL_WaitEvent_suppressed
+
+ IL_METHOD_BEGIN(WaitEvent_Methods)
+ IL_METHOD("InternalCreateEvent", "(ZZ)j",
_IL_WaitEvent_InternalCreateEvent, marshal_jpbb)
+ IL_METHOD("InternalSetEvent", "(j)Z", _IL_WaitEvent_InternalSetEvent,
marshal_bpj)
+ IL_METHOD("InternalResetEvent", "(j)Z",
_IL_WaitEvent_InternalResetEvent, marshal_bpj)
+ IL_METHOD_END
+
+ #endif
+
+ #if !defined(HAVE_LIBFFI)
+
static void marshal_ip(void (*fn)(), void *rvalue, void **avalue)
{
***************
*** 1582,1594 ****
#if !defined(HAVE_LIBFFI)
- static void marshal_bpj(void (*fn)(), void *rvalue, void **avalue)
- {
- *((ILNativeInt *)rvalue) = (*(ILInt8 (*)(void *,
ILNativeUInt))fn)(*((void * *)(avalue[0])), *((ILNativeUInt *)(avalue[1])));
- }
-
- #endif
-
- #if !defined(HAVE_LIBFFI)
-
static void marshal_ipj(void (*fn)(), void *rvalue, void **avalue)
{
--- 1610,1613 ----
***************
*** 2530,2533 ****
--- 2549,2555 ----
#ifndef _IL_TypedReference_suppressed
{"TypedReference", "System", TypedReference_Methods},
+ #endif
+ #ifndef _IL_WaitEvent_suppressed
+ {"WaitEvent", "System.Threading", WaitEvent_Methods},
#endif
#ifndef _IL_WaitHandle_suppressed
Index: lib_thread.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_thread.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** lib_thread.c 21 Jul 2002 22:34:33 -0000 1.7
--- lib_thread.c 7 Dec 2002 10:46:55 -0000 1.8
***************
*** 26,29 ****
--- 26,31 ----
#endif
+ #define WIN32_WAIT_TIMEOUT (258L)
+
/*
* public static void Enter(Object obj);
***************
*** 806,810 ****
result = ILWaitAny(handles, (ILUInt32)(waitHandles->length), timeout);
HandleWaitResult(_thread, result);
! return (result == 0);
}
--- 808,825 ----
result = ILWaitAny(handles, (ILUInt32)(waitHandles->length), timeout);
HandleWaitResult(_thread, result);
! /*return (result == 0);*/
!
! /* Now returns index of the handle that was set and proper timeout
value */
!
! if (result == IL_WAIT_TIMEOUT)
! {
! result = WIN32_WAIT_TIMEOUT;
! }
! else if (result < 0)
! {
! /* TODO: FIXME: Docs don't state how to report an error! */
! }
!
! return result;
}
***************
*** 877,880 ****
--- 892,932 ----
ILWaitMutexRelease((ILWaitHandle *)mutex);
}
+ }
+
+ /*
+ * Internal WaitEvent methods.
+ */
+
+ /*
+ * internal static extern IntPtr InternalCreateEvent(bool manualReset, bool
initialState);
+ */
+ ILNativeInt _IL_WaitEvent_InternalCreateEvent(ILExecThread *_thread, ILBool
manualReset, ILBool initialState)
+ {
+ ILWaitHandle *event;
+
+ event = ILWaitEventCreate((int)manualReset, (int)initialState);
+
+ if (event == 0)
+ {
+ ILExecThreadThrowOutOfMemory(_thread);
+ }
+
+ return (ILNativeInt)event;
+ }
+
+ /*
+ * internal static extern bool InternalSetEvent(IntPtr handle);
+ */
+ ILBool _IL_WaitEvent_InternalResetEvent(ILExecThread *_thread, ILNativeInt
event)
+ {
+ return (ILBool)ILWaitEventReset((ILWaitHandle *)event);
+ }
+
+ /*
+ * internal static extern bool InternalResetEvent(IntPtr handle);
+ */
+ ILBool _IL_WaitEvent_InternalSetEvent(ILExecThread *_thread, ILNativeInt
event)
+ {
+ return (ILBool)ILWaitEventSet((ILWaitHandle *)event);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine int_proto.h,1.35,1.36 int_table.c,1.38,1.39 lib_thread.c,1.7,1.8,
Gopal.V <address@hidden> <=