2005-09-27 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / io-layer / ChangeLog
index 671fa91736a73e03f7d49a604b3f2d03b8dcf69c..19ee14aca039dc104ad188c86b5a91ab536ae3f9 100644 (file)
@@ -1,3 +1,428 @@
+2005-09-26  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * io.c: Apply patch from #76192 (Can't write files past 2gb on AMD64 
+       (x86_64)) for Brion on IRC (Dick approved it).
+
+2005-09-23  Dick Porter  <dick@ximian.com>
+
+       * processes.c: Don't wait for processes that have already been
+       signalled; also fix typo.
+
+       * handles.c: Improve locking inside new handle and handle
+       searching functions.
+
+2005-09-20  Dick Porter  <dick@ximian.com>
+
+       * collection.c: 
+       * processes.c: Periodically waitpid for known process IDs.  Fixes
+       bug 74870.
+
+2005-09-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c:
+       (CreateFile): if the file is a named pipe, treat the handle as a pipe,
+       not as a file. Fixes bug #76075.
+
+2005-08-27  Zoltan Varga  <vargaz@gmail.com>
+
+       * atomic.h: Add support for intel icc.
+
+2005-08-25  Zoltan Varga  <vargaz@gmail.com>
+
+       * io-layer.h: Include winbase.h not WinBase.h.
+
+2005-08-19  Dick Porter  <dick@ximian.com>
+
+       * threads.c, threads.h, thread-private.h: Use a gsize to store the
+       thread ID, so it can hold a 64 bit value if needed.
+
+2005-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * error.c: map ENOENT to WSAECONNREFUSED. It might happen when
+       connecting to unix sockets. Closes bug #75632.
+
+2005-07-05  Dick Porter  <dick@ximian.com>
+
+       * io.c: Make sure SIGPIPE is ignored when calling write(2).
+       Prevents the runtime exiting when writing to a closed pipe,
+       fixing bug 75468.
+
+2005-06-30  Dick Porter  <dick@ximian.com>
+
+       * shared.c (_wapi_shm_semaphores_init): Add some helpful error
+       messages when semget () fails due to lack of resources.
+
+2005-06-21  Dick Porter  <dick@ximian.com>
+
+       * mutex-private.h:
+       * thread-private.h:
+       * mutexes.c: 
+       * threads.c: Keep a list of owned mutexes in each thread handle,
+       so that it is easier to abandon them when the thread exits.
+       Removes a bottleneck when multiple threads are finishing in
+       parallel.
+
+2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c: (GetLogicalDrives) when a bogus line is read, don't leak memory.
+       When the buffer has not enough space, close the file before returning.
+
+2005-06-09  Duncan Mak  <duncan@novell.com>
+
+       * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
+       all public headers. Fixes #74919.
+
+2005-05-30  Zoltan Varga  <vargaz@freemail.hu>
+
+       * atomic.h: Add IA64 atomic ops.
+
+2005-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * processes.c: make ExitCode be valid even if the user didn't call
+       WaitForExit() and is just polling on HasExited.
+
+2005-05-17  Dick Porter  <dick@ximian.com>
+
+       * io.c (file_getfilesize): Clear the error value, so that files
+       with sizes with the low bits 0xFFFFFFFF can be distinguished from
+       a genuine error.
+
+2005-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * shared.c: forgot to ignore a warning.
+
+2005-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * shared.c: don't display warnings after reboots.
+
+2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * sockets.c: on windows, getsockopt/setsockopt for send/receive timeout
+       use an integer in milliseconds. We were using a struct timeval.
+
+2005-05-06  Dick Porter  <dick@ximian.com>
+
+       * handles-private.h: 
+       * mutexes.c: 
+       * wapi-private.h: 
+       * shared.h:
+       * shared.c: 
+       * wait.c: 
+       * handles.c: 
+       * collection.h: Use SysV semaphores for managing access to the
+       shared memory - in return for the ludicrous api we get
+       synchronisation primitives that can be cleaned up by the kernel
+       even when a process quits unexpectedly.  This removes the
+       timestamp issues.
+
+2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
+
+       * handles.c: Always use polling in the waits, since
+       mono_cond_timedwait can't be interruped by the thread abort signal.
+
+2005-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * events.c: calling Set on AutoResetEvent several times has the same
+       effect as calling it only once if no thread is waiting for it.
+
+2005-04-29  Dick Porter  <dick@ximian.com>
+
+       * processes.c (EnumProcesses): Use a GArray instead of a GPtrArray
+       now it's storing pids not handles, also fixes memory leak caused
+       by unclear glib documentation.
+
+       * sockets.c (WSACleanup): Remove unused variable
+
+2005-04-29  Dick Porter  <dick@ximian.com>
+
+       * handles.c (_wapi_handle_check_share_by_pid): For systems that
+       don't have file descriptor info in /proc check that the original
+       opener of a file is still there, if a share violation would
+       otherwise happen.
+
+2005-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * handles.c:
+       * handles-private.h: added _wapi_handle_forecch that loops through all
+       the handles and call a callback function when a handle of the given
+       type is found.
+
+       * sockets.c: no need to keep open sockets in an array, as we have them 
+       in the handles structure.
+
+       Fixes bug #74755.
+
+2005-04-28  Dick Porter  <dick@ximian.com>
+
+       * processes.c: Cope with handles that are only around for as long
+       as the search is running.  If we're searching for process handles,
+       check to see if the process is still running and signal it if not.
+
+       * handles.c (_wapi_search_handle): Search in the shared space as
+       well.  Fixed bug 74752.
+
+       * mutexes.c:
+       * handles.c (_wapi_handle_new_from_offset):
+       _wapi_handle_new_for_existing_ns () was doing exactly the same as
+       this, so deleted it.
+
+2005-04-26  Dick Porter  <dick@ximian.com>
+
+       * handles.c: Fix stupid thinko where if a new shared handle is
+       created but a collection was needed to free some space, it
+       returned an error anyway.  Should fix the messages shown in bug
+       74659.
+
+2005-04-25  Dick Porter  <dick@ximian.com>
+
+       * handles.c (_wapi_handle_check_share): Only consider mono
+       processes when looking to see if a file is still being held open,
+       while checking share permissions.
+
+2005-04-25  Dick Porter  <dick@ximian.com>
+
+       * sockets.c: 
+       * io.c: 
+       * wapi-private.h (struct _WapiHandleOps): 
+       * handles.c (_wapi_handle_unref): When destroying handles, save
+       the handle data and call the close function only after the array
+       slot has been cleared.  This prevents race conditions with file
+       descriptors, fixing bug 74713.
+
+       * mutexes.c: Delete the handle close functions, they didn't do
+       anything anyway
+
+       * error.c (_wapi_get_win32_file_error): Add a mapping for EINTR so
+       the "Unknown error" g_warning doesn't get displayed.
+
+2005-04-25  Dick Porter  <dick@ximian.com>
+
+       * wapi-private.h: 
+       * threads.c: Make thread handles process-private for now to take
+       some of the space pressure off the shared memory, while I work on
+       a real fix.
+
+2005-04-21  Dick Porter  <dick@ximian.com>
+
+       * handles.c (_wapi_handle_check_share): Make sure there is a "fd"
+       dir in /proc before blowing away handle info.  Fixes bug 74649.
+
+2005-04-21  Dick Porter  <dick@ximian.com>
+
+       * wait.c (WaitForMultipleObjectsEx): Implement special waits
+
+       * handles.c (_wapi_handle_wait_signal_poll_share): Don't return a
+       timeout, just wait briefly for the private signals and let the
+       waiting thread test again.  This prevents us missing shared
+       signals.
+
+2005-04-21  Dick Porter  <dick@ximian.com>
+
+       * collection.h (_WAPI_HANDLE_COLLECTION_EXPIRED_INTERVAL): Reduce
+       the time before a slot is considered too old and deleted.  This is
+       a workaround while I come up with a proper fix.
+
+2005-04-21  Dick Porter  <dick@ximian.com>
+
+       * mutexes.c: 
+       * processes.c: 
+       * threads.c: 
+       * handles.c (_wapi_handle_new): Turn assertions into errors.
+
+       * collection.c (_wapi_handle_collect): Use symbols not magic
+       numbers for timeout values
+
+2005-04-19  Dick Porter  <dick@ximian.com>
+
+       * mutexes.c: 
+       * wait.c: 
+       * handles.c (_wapi_handle_count_signalled_handles)
+       * handles-private.h (_wapi_handle_shared_lock_handle): Use new
+       shared handle locks in critical sections.
+
+       * handles.c (_wapi_handle_new_for_existing_ns): Reuse old handles
+       if there is already one there.
+       
+       * handles.c (_wapi_handle_ref): It was possible for a process to
+       exit before getting around to updating shared handle timestamps,
+       so do it here too.
+
+Tue Apr 19 16:25:47 CEST 2005 Paolo Molaro <lupus@ximian.com>
+
+       * threads.c: fix lookup of the thread id in the has table:
+       always use the id value, not the pointer to the id.
+
+2005-04-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * handles.c: fix handle returned in _wapi_handle_search_handle. Dick
+       pointed it out.
+
+2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io-layer/sockets.c: FIONBIO with a TRUE argument means we want
+       non-blocking IO, not the other way around.
+
+2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * handles.c:
+       * io.c:
+       * handles-private.h: GetFileType wasn't checking if we have memory
+       allocated for the handle before dereferencing it. Fixes a FileStream
+       nunit test.
+
+2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * handles.c:
+       * processes.c:
+       * handles-private.h: we were calling g_renew to expand the handle array,
+       but that might move the memory and we might have pthread conditions or
+       mutexes in the original memory area that are being used. Now instead of
+       expanding an existing array, we just create new ones and keep a list of
+       them. Access to _wapi_private_handles had to be modified accordingly.
+
+2005-04-15  Dick Porter  <dick@ximian.com>
+
+       * collection.c: FreeBSD needs more than PTHREAD_STACK_MIN
+
+2005-04-14  Raja R Harinath  <rharinath@novell.com>
+
+       * wapi-private.h: Remove reference to 'daemon-private.h'.
+
+Wed Apr 13 13:12:33 EDT 2005 Paolo Molaro <lupus@ximian.com>
+
+       * atomic.h: applied patch from mass@akuma.org (David Waite)
+       to fix InterlockedExchangeAdd.
+       Fixed a few other functions, including InterlockedCompareExchange()
+       which was miscompiled by gcc with optimizations enabled.
+
+2005-04-13  Dick Porter  <dick@ximian.com>
+
+       * io.c (share_check): 
+       * handles.c (_wapi_handle_check_share): Refine the file check so
+       that sharing violations within the same process don't cause
+       assertion failures.
+
+2005-04-13  Dick Porter  <dick@ximian.com>
+
+       * io.c (FindFirstFile): Fix bugs introduced with the merge (bug
+       74586)
+
+2005-04-12  Dick Porter  <dick@ximian.com>
+       
+       The daemon-less io-layer.  Extensive lowlevel changes in
+       handles.c, requiring some corresponding changes in other files
+       calling these functions.  Private_foo structures have been
+       eliminated.
+
+       File descriptor handling differences account for most of the
+       changes in io.c and sockets.c.
+
+       Other highlights:
+       
+       * mutexes.c: Named mutexes are now a distinct type.
+       * atomic.h: Fix a PPC uninitialised variable warning.
+       * wait.c: Check conditions before waiting on a condition variable.
+       * processes.c: Handle process fork and wait without a daemon
+       (though this has the limitation of only being able to wait for
+       child processes.)
+
+2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io-private.h:
+       * threads.c:
+       * threads.h:
+       * io.c:
+       * sockets.c:
+       * sockets.h: removed dead code that deals with async IO.
+
+2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
+
+       * atomic.c (InterlockedIncrement): Fix fallback implementation of
+       InterlockedIncrement and InterlockedDecrement. Fixes #74228.
+
+2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * io-layer.h: Add required header files for compiling with VS.NET.
+
+2005-03-17 Miguel de Icaza <miguel@novell.com>
+
+       * io.c: don't fail on NFS when there are no more locks available.
+
+2005-03-09  Dick Porter  <dick@ximian.com>
+
+       * error.c (_wapi_get_win32_file_error): ENFILE and EMFILE should
+       map to ERROR_TOO_MANY_OPEN_FILES, not ERROR_NO_MORE_FILES.  Fixes
+       bug 72671.
+
+2005-03-09  Dick Porter  <dick@ximian.com>
+
+       * daemon.c (process_process_fork): Initialise the handle data
+       before using it in the error case.  This is probably the error
+       we're working around in the previous change.  Spotted by Taru Jain
+       <tjain@novell.com> and Hemanth Yamijala <YHemanth@novell.com>.
+
+2005-03-07  Dick Porter  <dick@ximian.com>
+
+       * daemon.c: It looks like g_shell_parse_argv() can return
+       argv[0]=NULL somehow, yet still not give an error.  Make sure we
+       don't pass NULL to strrchr(), working around a segfault that
+       showed up on ZLM testing.
+
+2005-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * sockets.c: translate EINPROGRESS to EWOULDBLOCK in connect. This is
+       the expected error code showed by the test case in bug #73053.
+
+2005-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c: another leftover.
+
+Fri Feb 18 17:37:29 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * io.c: fixed logic in checking errno in rev 40815.
+
+Fri Feb 18 16:00:29 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * threads.c: we don't depend on the GC checking tls
+       slots anymore.
+       * processes.c: remove unused ref to GC headers.
+
+Thu Feb 17 19:57:11 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * io.c: remove _wapi_thread_cur_apc_pending () checks
+       when the siscall should return immediatly and handle
+       the case when a syscall is interrupted without
+       erroring out, but returning a 0 read/write if possible.
+       Still the cases of read from file need to be handled.
+
+Tue Feb 8 18:28:11 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * threads.c: make people test with 1 MB stack per thread.
+
+2005-01-17  Dick Porter  <dick@ximian.com>
+
+       * timefuncs.h: Make WapiFileTime endian-aware, as it's often
+       cast to and from 64bit ints.  Fixes bug 71213.
+
+2005-01-11  Dick Porter  <dick@ximian.com>
+
+       * error.c (errno_to_WSA): Add EADDRNOTAVAIL error code
+       translation.
+
+Mon Jan 10 16:15:19 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
+
+       * atomic.h: Fix functions on s390.
+
+Mon Jan 10 20:30:19 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * atomic.h: fix some functions on ppc (tests/interlocked.cs).
+
+2005-01-10  Dick Porter  <dick@ximian.com>
+
+       * misc.c (_wapi_calc_timeout): Guard against overflow when
+       calculating timeouts.  This makes waiting with a large
+       (Int32.MaxValue) timeout not return immediately.
+
 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
 
        * io.c (io_ops): make this `const' so it is shareable (well, only