dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Threading Thread.cs, 1


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Threading Thread.cs, 1.16, 1.17
Date: Thu, 24 Jul 2003 02:30:39 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Threading
In directory subversions:/tmp/cvs-serv17640/runtime/System/Threading

Modified Files:
        Thread.cs 
Log Message:


Implement local data store slots for threads, based around
a "[ThreadStatic]" variable.


Index: Thread.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Threading/Thread.cs,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** Thread.cs   26 Jun 2003 03:43:38 -0000      1.16
--- Thread.cs   24 Jul 2003 06:30:37 -0000      1.17
***************
*** 354,377 ****
  
        // Allocate a local data store slot.
-       [TODO]
        public static LocalDataStoreSlot AllocateDataSlot()
                        {
!                               // TODO
!                               return null;
                        }
  
        // Allocate a named data store slot.
-       [TODO]
        public static LocalDataStoreSlot AllocateNamedDataSlot(String name)
                        {
!                               // TODO
!                               return null;
                        }
  
        // Free a named data store slot.
-       [TODO]
        public static void FreeNamedDataSlot(String name)
                        {
!                               // TODO
                        }
  
--- 354,372 ----
  
        // Allocate a local data store slot.
        public static LocalDataStoreSlot AllocateDataSlot()
                        {
!                               return new LocalDataStoreSlot(false, null);
                        }
  
        // Allocate a named data store slot.
        public static LocalDataStoreSlot AllocateNamedDataSlot(String name)
                        {
!                               return LocalDataStoreSlot.GetNamed(name);
                        }
  
        // Free a named data store slot.
        public static void FreeNamedDataSlot(String name)
                        {
!                               LocalDataStoreSlot.FreeNamed(name);
                        }
  
***************
*** 383,391 ****
  
        // Get the data in a particular data store slot.
-       [TODO]
        public static Object GetData(LocalDataStoreSlot slot)
                        {
!                               // TODO
!                               return null;
                        }
  
--- 378,391 ----
  
        // Get the data in a particular data store slot.
        public static Object GetData(LocalDataStoreSlot slot)
                        {
!                               if(slot == null)
!                               {
!                                       return null;
!                               }
!                               else
!                               {
!                                       return slot.Data;
!                               }
                        }
  
***************
*** 399,407 ****
  
        // Get a previously allocated named data store slot.
-       [TODO]
        public static LocalDataStoreSlot GetNamedDataSlot(String name)
                        {
!                               // TODO
!                               return null;
                        }
  
--- 399,405 ----
  
        // Get a previously allocated named data store slot.
        public static LocalDataStoreSlot GetNamedDataSlot(String name)
                        {
!                               return LocalDataStoreSlot.GetNamed(name);
                        }
  
***************
*** 427,434 ****
  
        // Set the data in a particular local data store slot.
-       [TODO]
        public static void SetData(LocalDataStoreSlot slot, Object data)
                        {
!                               // TODO
                        }
  
--- 425,434 ----
  
        // Set the data in a particular local data store slot.
        public static void SetData(LocalDataStoreSlot slot, Object data)
                        {
!                               if(slot != null)
!                               {
!                                       slot.Data = data;
!                               }
                        }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]