[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Threading AutoResetEv
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Threading AutoResetEvent.cs,NONE,1.1 ManualResetEvent.cs,NONE,1.1 WaitEvent.cs,NONE,1.1WaitHandle.cs,1.5,1.6 |
Date: |
Sat, 07 Dec 2002 05:47:28 -0500 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Threading
In directory subversions:/tmp/cvs-serv7493/runtime/System/Threading
Modified Files:
WaitHandle.cs
Added Files:
AutoResetEvent.cs ManualResetEvent.cs WaitEvent.cs
Log Message:
Patch ID : 780 From Tum commited by Gopal
--- NEW FILE ---
/*
* WaitHandle.cs - Implementation of the "System.Threading.WaitHandle" class.
*
* Copyright (C) 2002 Free Software Foundation
*
* Authors: Thong Nguyen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Threading
{
using System.Runtime.CompilerServices;
/// <summary>
/// See ECMA specs.
/// </summary>
public class AutoResetEvent
: WaitHandle
{
/// <summary>
/// See ECMA specs.
/// </summary>
public AutoResetEvent(bool initialState)
{
IntPtr handle;
handle = WaitEvent.InternalCreateEvent(false,
initialState);
SetHandle(handle);
}
/// <summary>
/// See ECMA specs.
/// </summary>
public bool Set()
{
return WaitEvent.InternalSetEvent(Handle);
}
/// <summary>
/// See ECMA specs.
/// </summary>
public bool Reset()
{
return WaitEvent.InternalResetEvent(Handle);
}
}
}
--- NEW FILE ---
/*
* WaitHandle.cs - Implementation of the "System.Threading.WaitHandle" class.
*
* Copyright (C) 2002 Free Software Foundation
*
* Authors: Thong Nguyen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Threading
{
using System.Runtime.CompilerServices;
/// <summary>
/// See ECMA specs.
/// </summary>
public class ManualResetEvent
: WaitHandle
{
/// <summary>
/// See ECMA specs.
/// </summary>
public ManualResetEvent(bool initialState)
{
IntPtr handle;
handle = WaitEvent.InternalCreateEvent(true,
initialState);
SetHandle(handle);
}
/// <summary>
/// See ECMA specs.
/// </summary>
public bool Set()
{
return WaitEvent.InternalSetEvent(Handle);
}
/// <summary>
/// See ECMA specs.
/// </summary>
public bool Reset()
{
return WaitEvent.InternalResetEvent(Handle);
}
}
}
--- NEW FILE ---
/*
* WaitHandle.cs - Implementation of the "System.Threading.WaitHandle" class.
*
* Copyright (C) 2002 Free Software Foundation
*
* Authors: Thong Nguyen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Threading
{
using System.Runtime.CompilerServices;
/// <summary>
/// Provides access to internal wait event methods.
/// </summary>
internal sealed class WaitEvent
{
/// <summary>
/// Internal call to create an event.
/// </summary>
/// <param name="manualReset">If false, the event will
automatically reset itself.</param>
/// <param name="initialState">Initial state of the event (true
for signalled)</param>
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern IntPtr InternalCreateEvent(bool
manualReset, bool initialState);
/// <summary>
/// Set an event to the signalled state.
/// </summary>
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern bool InternalSetEvent(IntPtr handle);
/// <summary>
/// Set an event to the unsignalled state.
/// </summary>
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern bool InternalResetEvent(IntPtr handle);
}
}
Index: WaitHandle.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Threading/WaitHandle.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** WaitHandle.cs 3 Dec 2001 11:16:14 -0000 1.5
--- WaitHandle.cs 7 Dec 2002 10:47:26 -0000 1.6
***************
*** 31,34 ****
--- 31,40 ----
private IntPtr privateData;
+ /// <summary>
+ /// Constant that specifies a timeout occured within the
+ /// WaitAny or WaitAll methods.
+ /// </summary>
+ public const int WaitTimeout = 258;
+
// Constructors.
public WaitHandle()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Threading AutoResetEvent.cs,NONE,1.1 ManualResetEvent.cs,NONE,1.1 WaitEvent.cs,NONE,1.1WaitHandle.cs,1.5,1.6,
Gopal.V <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.524,1.525
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/tests/System.Xml TestXmlComment.cs,NONE,1.1 TestXmlDocumentFragment.cs,NONE,1.1 TestXmlDocumentType.cs,NONE,1.1 TestXmlSignificantWhitespace.cs,NONE,1.1 TestXmlWhitespace.cs,NONE,1.1 TestXml.cs,1.8,1.9
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.524,1.525
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/tests/System.Xml TestXmlComment.cs,NONE,1.1 TestXmlDocumentFragment.cs,NONE,1.1 TestXmlDocumentType.cs,NONE,1.1 TestXmlSignificantWhitespace.cs,NONE,1.1 TestXmlWhitespace.cs,NONE,1.1 TestXml.cs,1.8,1.9
- Index(es):