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/IO FileStream.cs, 1.15


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO FileStream.cs, 1.15, 1.16
Date: Tue, 19 Aug 2003 01:06:33 -0400

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

Modified Files:
        FileStream.cs 
Log Message:


Add internalcalls to support "FileStream.Lock" and "FileStream.Unlock".


Index: FileStream.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO/FileStream.cs,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** FileStream.cs       24 Apr 2003 09:20:35 -0000      1.15
--- FileStream.cs       19 Aug 2003 05:06:31 -0000      1.16
***************
*** 840,844 ****
  
        // Lock a region of the file stream.
-       [TODO]
        public virtual void Lock(long position, long length)
                        {
--- 840,843 ----
***************
*** 859,868 ****
                                                throw new 
ObjectDisposedException(_("IO_StreamClosed"));
                                        }
!                                       // TODO
                                }
                        }
  
        // Unlock a region of the file stream.
-       [TODO]
        public virtual void Unlock(long position, long length)
                        {
--- 858,870 ----
                                                throw new 
ObjectDisposedException(_("IO_StreamClosed"));
                                        }
!                                       if(!FileMethods.Lock(handle, position, 
length))
!                                       {
!                                               throw new IOException
!                                                       
(FileMethods.GetErrno(), _("IO_LockFailed"));
!                                       }
                                }
                        }
  
        // Unlock a region of the file stream.
        public virtual void Unlock(long position, long length)
                        {
***************
*** 883,887 ****
                                                throw new 
ObjectDisposedException(_("IO_StreamClosed"));
                                        }
!                                       // TODO
                                }
                        }
--- 885,893 ----
                                                throw new 
ObjectDisposedException(_("IO_StreamClosed"));
                                        }
!                                       if(!FileMethods.Unlock(handle, 
position, length))
!                                       {
!                                               throw new IOException
!                                                       
(FileMethods.GetErrno(), _("IO_UnlockFailed"));
!                                       }
                                }
                        }





reply via email to

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