1 2003-10-29 Dick Porter <dick@ximian.com>
3 * io.c (MoveFile): If the move crosses filesystems, try and fall
4 back to copy and delete. Patch from Jörg Rosenkranz
5 (JoergR@voelcker.com), fixes bug 50298.
7 2003-10-28 Dick Porter <dick@ximian.com>
9 * io.c: Use the new encoding conversion to cope with non-utf8
12 * processes.c: Ditto for process arguments.
14 Tue Oct 21 12:01:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16 * atomic.h: some ppc inline asm fixes (incorrect use of labels,
17 incorrect register constraints, incorrect clobber lists).
19 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
21 * Makefile.am hppa_atomic.s: add HP 64bit
22 implementation of atomic ops
24 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
26 * threads.c (CreateThread): Wrap pthread_attr_setstacksize call in
27 a conditional for platforms that don't have it.
29 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
31 * threads.c: (CreateThread) use stacksize argument
32 if non-zero - change default for 64 bits to 4Mb
34 2003-09-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
36 * sockets.c: set last error when socket creation fails. This shed some
39 2003-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
41 * processes.c: fixed bug #48973: we only change \ by / for the argument
42 to be used as command.
43 When getting the program name from the args, don't let the space between
46 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
48 * atomic.h atomic.c: fix sparc so lock is
49 global, increment does so and it compiles under Sun compiler.
51 2003-09-22 Bernie Solomon <bernard@ugsolutions.com>
53 * handles.c: include <string.h> directly as may
54 not be nested in <sys/un.h> like Linux
56 2003-09-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
59 (DeleteFile): call SetLastError on failure. Fix by
60 richard.torkar@htu.se (Richard Torkar). Closes bug #48222.
62 2003-09-15 Lluis Sanchez Gual <lluis@ximian.com>
64 * daemon.c: In compare_process(), discard handles already signalled.
66 2003-09-02 Dick Porter <dick@ximian.com>
68 * io.c: Work around glib brain-dead assumptions about utf8-encoded
69 filenames. Fixes bug 30781.
71 2003-08-28 Dick Porter <dick@ximian.com>
73 * critical-sections.c: Patch from Bernie Solomon
74 <bernard@ugsolutions.com> to emit a warning if locking a critical
77 2003-07-23 Dick Porter <dick@ximian.com>
80 * daemon.c (maybe_exit): Avoid the race condition when the daemon is
81 closing but another client comes along when the shared data is still
82 visible. Should fix bugs 33671 and 35213.
84 2003-07-23 Dick Porter <dick@ximian.com>
86 * handles.c: Initialise handle mutex and cond. Fix by
87 Bernie Solomon <bernard@ugsolutions.com>
89 2003-07-15 Dick Porter <dick@ximian.com>
91 * timed-thread.c (timed_thread_start_routine): Fix virtual memory
92 leak when threads quit. Fixes bug 44067.
94 Wed Jun 18 19:08:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
96 * io.c: never add write permission for group or others in
99 2003-06-17 Dick Porter <dick@ximian.com>
101 * io.c (SetFileAttributes): Implement the ReadOnly attribute, and
102 ignore the unsupported ones ("fixes" bug 44977).
104 2003-06-17 Lluis Sanchez Gual <lluis@ximian.com>
106 * misc.c: fix bug in _wapi_calc_timeout. It gave wrong values for
107 high ms values (there was an overflow).
109 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
111 * system.h (struct _WapiSystemInfo ): Fix warnings when using gcc-3.3.
113 2003-06-11 Dick Porter <dick@ximian.com>
115 * shared.c: Fix shared directory creation. Patch from
116 Pablo Baena <pbaena@uol.com.ar>
118 2003-06-10 Dick Porter <dick@ximian.com>
120 * atomic.c: Delete the useless compile warning
122 2003-06-09 Dick Porter <dick@ximian.com>
124 * daemon.c: Lookup env as a string array. Fixes bug 44289. Also
125 make setting the process handle value in the environment actually
128 * processes.c: Pretty up the process name, if it happens to be
129 "mono" such as when another mono process forks "mono foo.exe"
131 2003-06-05 Dick Porter <dick@ximian.com>
133 * processes.c (process_set_current): Don't do an expensive handle
134 search at application startup, check the environment to see if the
135 process handle has already been created.
137 * io.c: Don't do an expensive handle search when creating stdin,
138 stdout and stderr handles, just create them all the first time one
148 * daemon.c: Support for "unlimited" number of handles and scratch
151 Speed up application startup by passing process handle in the
152 environment, rather than let the app scan all handles (which gets
153 really slow when there are more than a few thousand to check.)
155 Initialise some structs passed to syscalls, noticed by valgrind.
158 2003-05-20 Dick Porter <dick@ximian.com>
160 * io.c (FindFirstFile): Include . files in the glob. Fixes bug
163 2003-05-19 Dick Porter <dick@ximian.com>
165 * threads.c: Set the new thread's stack size to 2M. Fix needed
166 for BSD, reported by Martin Dvorak <md@9ll.cz>
168 2003-05-16 Dick Porter <dick@ximian.com>
171 * io.c: Implement GetTempPath()
173 2003-05-16 Dick Porter <dick@ximian.com>
175 * processes.c (CreateProcess): Set some error codes
177 2003-05-12 Dick Porter <dick@ximian.com>
179 * misc.c (_wapi_calc_timeout): Cope with overflowing tv_nsec.
180 Patch from Martin Dvorak <mdvorak@ninell.cz>.
182 2003-05-10 Dick Porter <dick@ximian.com>
184 * io.c (CopyFile): Copy file mode as well as file data. Based on
185 suggestion by Giuseppe Greco <giuseppe.greco@agamura.com>, bug
188 2003-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
190 * handles.c: don't call GC_gcollect when creating new handles.
192 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
194 * handles.c: added some debugging code. Call GC_gcollect
195 before creating a new handle. It makes Lupus' test run smoother and
196 faster (from 62 to 83 request per second). Notice that calling
197 GC_finalizer_notifier if needed (GC_should_invoke_finalizer ()) does
198 not improve nor degrade the performance, so i don't do it.
200 2003-05-02 Dick Porter <dick@ximian.com>
202 * sockets.c: Rearrange closesocket() and socket_close_private(),
203 and remember to unref the handle, so we don't leak socket handles.
204 Fix from Pelle Johnsen <pelle.johnsen@mail.dk>
206 2003-04-11 Dick Porter <dick@ximian.com>
208 * atomic.h: ARM atomic operations by Malte Hildingson
209 <tds00mahi@tellus.thn.htu.se>
211 Tue Apr 8 11:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
213 * atomic.h: fix macosx build by "Urs C. Muff" <umuff@quark.com>.
215 2003-04-03 Martin Baulig <martin@ximian.com>
217 The following change is conditional to `WITH_INCLUDED_LIBGC'
218 which is not yet enabled by default.
220 * threads.c (SuspendThread, ResumeThread): Fully implemented this.
221 (gc_init): New static function; install a signal handler for
222 SIGPWR which is used to suspend threads. [FIXME: it SIGPWR
223 doesn't exist on all Unix systems, we need to find another
225 (mono_wapi_push_thread_stack): New public function. Tells the
226 garbage collector about the current stack pointer of a suspended
229 2003-04-03 Martin Baulig <martin@ximian.com>
231 * timed-thread.h (TimedThread): Added `suspended_sem',
232 `suspend_count' and `stack_ptr'.
234 2003-03-28 Dick Porter <dick@ximian.com>
236 * atomic.h: PPC support gratiously donated to the public domain
237 by John Duncan <jddst19@mac.com>
239 2003-03-20 Dick Porter <dick@ximian.com>
241 * sockets.c (_wapi_connect): If connect() fails with EACCES, try
242 setting SO_BROADCAST and connecting again. Fixes bug 39178.
244 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
246 * processes.c: included Jerome Laban's patch and call SetLastError when
247 the executable is not found.
249 2003-03-03 Dick Porter <dick@ximian.com>
251 * io.c (CreateFile): Try opening directories readonly, so that
252 timestamps can be adjusted. Patch by Elan Feingold
253 <efeingold@mn.rr.com>.
255 2003-02-25 Dick Porter <dick@ximian.com>
257 * shared.c (_wapi_shm_attach): Return a failure code on system
258 call errors, rather than exiting.
260 2003-02-21 Dick Porter <dick@ximian.com>
262 * processes.c (GetCurrentProcessId): Use the current process
263 handle to return the process ID, as getpid() is unreliable
264 (linuxthreads gives each thread a different pid). Fixes bug
267 2003-02-21 Dick Porter <dick@ximian.com>
269 * io.c (FindNextFile): Skip over dangling symlinks. Fixes bug
272 2003-02-11 Dick Porter <dick@ximian.com>
275 * timefuncs.c: Added GetTickCount()
277 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
279 * error.c: added WSA_EHOSTUNREACH mapping.
281 2003-01-26 Miguel de Icaza <miguel@ximian.com>
283 * io.c (SetFileAttributes): This routine is not currently
284 implemented for the general case, but I added a special case to
285 set the executable bit on Linux.
287 Wed Jan 15 15:55:40 CET 2003 Paolo Molaro <lupus@ximian.com>
289 * sockets.h, daemon.c, io.c: compilation fixes on MacOSX.
291 2003-01-08 Dick Porter <dick@ximian.com>
293 * sockets.c: Fixed setting blocking mode to true (fixes bug 36388)
295 2002-12-11 Juli Mallett <jmallett@FreeBSD.org>
297 * daemon.c, handles-private.h, handles.c, wapi-private.h:
298 Check for an implementation which says it supports
299 _POSIX_THREAD_PROCESS_SHARED, rather than just one that
300 defines the symbol. Defined but with a value of -1 still
301 means that it is unsupported.
303 2002-12-08 Martin Baulig <martin@ximian.com>
305 * handles.c (_wapi_handle_new): Create new non-shared handles with
306 an initial refcount of 1, not 0.
308 2002-11-22 Dietmar Maurer <dietmar@ximian.com>
310 * threads.c (TlsGetValue): removed unnecessary mutex
312 2002-11-20 Dick Porter <dick@ximian.com>
314 * timed-thread.c (_wapi_timed_thread_attach): Attached threads
315 need to store their data structure too.
317 * threads.c: Make sure the threading data is initialised wherever
320 2002-11-15 Dick Porter <dick@ximian.com>
322 * timed-thread.c: Removed unneeded parameters in
323 _wapi_timed_thread_attach().
325 * threads.c: Renamed AttachThread() to make it not look like
326 external API. Removed unneeded parameters.
328 2002-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
330 * error.[ch]: added errno_to_WSA (). It displays a warning and return
331 WSASYSCALLFAILURE if there is no error mapping for the given errno,
333 * sockets.c: use errno_to_WSA and fixed display of warning for h_errno.
335 2002-10-31 Dick Porter <dick@ximian.com>
338 * io.c: Define and use INVALID_FILE_ATTRIBUTES
340 2002-10-07 Dick Porter <dick@ximian.com>
343 * daemon.c: Use a more accurate time source for process start and
346 2002-10-03 Dick Porter <dick@ximian.com>
350 * threads.c: Fixes for freebsd. Make sure that mutex and condition
351 creation and deletion happen in the process that owns them, when
352 POSIX shared thread objects aren't supported. This breaks on
353 freebsd, as pthread_t is a pointer to data.
355 2002-10-02 Dick Porter <dick@ximian.com>
357 * shared.c: Use mmap() instead of sysv shm for the shared data.
359 * wapi-private.h (_WAPI_HANDLE_VERSION): Reset back to 0, for the
363 * daemon.c: mmap()ed regions survive fork, so just pass the
364 pointer to _wapi_daemon_main instead of mapping it again.
366 2002-10-01 Dick Porter <dick@ximian.com>
368 * timed-thread.c: Kludge for CREATE_SUSPENDED thread creation.
369 Unfortunately libgc uses the same thread suspend technique that I
370 want to, and the two don't mix: libgc will deadlock when it tries
371 to stop the world if a thread has already been suspended by
372 someone else. Just do the simple suspended create rather than the
373 general purpose thread suspension for now.
375 * threads.c: Pass create flags to the timed_thread create call, to
376 implement suspended thread creation. ResumeThread() partially
377 implemented, to cope with the case where a newly created but
378 suspended thread is launched.
380 2002-09-30 Dick Porter <dick@ximian.com>
382 * sockets.c (ioctlsocket): Set non-blocking mode in a better way,
385 2002-09-27 Dick Porter <dick@ximian.com>
387 * semaphores.c: Only include semaphore.h if it's present. Patch
388 for BSD from jmmv@hispabsd.org (Julio Merino).
390 2002-09-27 Dick Porter <dick@ximian.com>
392 * processes.c: Pass environment and working directory to the
393 daemon when forking. Don't let argv[0] be duplicated when looking
394 for the program name. Implement EnumProcessModules (simple
395 version for now, lsof-style later if needed), GetModuleBaseName,
396 {Get,Set}ProcessWorkingSetSize (just faked, because the vm hints
397 aren't available on Linux).
399 * process-private.h: Store the process name, and the working set
403 * handles-private.h: New functions to store and retrieve an array
404 of strings in the scratch space
406 * daemon.c: Don't miss deleting some handles when a client exits
407 (we used to rely on the client doing the final cleanup, but
408 obviously if the client is no longer there the daemon has to do
411 Process forking now sets the environment and the working
414 * io.c: Don't confuse fd 0 with an unassigned handle struct
416 * atomic.h: Add a google cache alternative to the msdn URL
418 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
421 (_wapi_recvfrom): added ECONNRESET to the switch.
423 2002-09-24 Mark Crichton <crichton@gimp.org>
425 * atomic.h: Yea. On linux, sparc isn't sparc, it's __sparc__.
428 2002-09-19 Mark Crichton <crichton@gimp.org>
430 * daemon.c, shared.c: Added NEED_LINK_UNLINK for systems that
431 dont have Linux's abstract filesystem for sockets.
433 2002-09-19 Mark Crichton <crichton@gimp.org>
435 * atomic.h: Added SPARC atomic asm code.
436 * daemon.c, handles-private.h, handles.c, wapi-private.h:
437 undefined _POSIX_THREAD_PROCESS_SHARED. This actually exists on
438 Solaris 9, however, the code paths don't seem to work. More testing
439 on the shared case is *really* needed.
441 2002-09-03 Dick Porter <dick@ximian.com>
444 * threads.c: Removed PosixKillThread(), because it's not in the
447 2002-08-20 Dick Porter <dick@ximian.com>
449 * handles.c (_wapi_handle_scratch_store): Made stored byte lengths
450 multiples of 4 bytes, to keep header structures aligned. Needed
451 for sparc, at least. (Patch from crichton@gimp.org)
453 * handles.c: Removed 'disable_shm' variable (we've defaulted to
454 building with shm enabled for months now)
456 2002-08-19 Dick Porter <dick@ximian.com>
458 * daemon.c: Rewrote the poll() loop to use GIOChannels instead,
459 for legacy NeXT-based systems.
461 2002-08-12 Dick Porter <dick@ximian.com>
463 * atomic.h: Rename some parameters to avoid c++ keywords (Patch
464 from Joseph Wenninger <kde@jowenn.at>)
466 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
468 * threads.c: use fast spinlocks by default
470 2002-08-02 Dick Porter <dick@ximian.com>
472 * io.c (GetStdHandle): Add a handle reference when returning a
473 duplicate console handle. This fixes the unref_handle errors in
476 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
478 * threads.c (TLS_PTHREAD_MUTEX): define this because else some
481 2002-08-01 Dick Porter <dick@ximian.com>
483 * threads.c: Use atomic spinlocks in TLS functions
486 * Makefile.am: Added mono-spinlock.h
488 2002-07-21 Jeffrey Stedfast <fejj@ximian.com>
490 * daemon-messages.c: #include <sys/types.h> and <sys/sockets.h> -
491 these are needed for sendmsg() and also for struct msghdr (at
492 least on Solaris). Solaris still won't build because struct msghdr
493 doesn't have msg_flags, msg_control, or msg_controllen members.
494 (CMSG_SPACE): Define for systems that don't have it.
497 2002-07-20 Dick Porter <dick@ximian.com>
503 * handles.c: Implemented pipe handles
506 * daemon.c: Fixed bug in handle closing.
509 * daemon.c: Forked processes now close all open file descriptors.
511 Fri Jul 19 19:05:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
513 * sockets.h, io-layer.h, critical-sections.h: don't include config.h
516 2002-07-19 Martin Baulig <martin@gnome.org>
518 * threads.c (ExitThread): Call exit() if no threads has been
521 2002-07-17 Dick Porter <dick@ximian.com>
523 * daemon-messages.c: Freebsd fixes from Andreas Kohn
524 <andreas.kohn@gmx.net>
526 2002-07-15 Dick Porter <dick@ximian.com>
528 * io.c: Removed bogus console_flush() method, that was just cut
529 and pasted from file_flush when I separated the two handle types.
531 2002-07-12 Dick Porter <dick@ximian.com>
533 * io.c (convert_from_flags): Fixed misunderstanding wrt fcntl
534 flags. Fixes bug 27633.
536 2002-07-12 Dick Porter <dick@ximian.com>
540 * daemon.c: Use size of sockaddr_un.sun_path from config.h
542 2002-07-12 Dick Porter <dick@ximian.com>
544 * processes.c (CreateProcess): Send stdin, stdout and stderr
545 handles if the startup info doesnt specify new ones
547 * io.c (GetStdHandle): Return the same handle when the same
548 standard handle is requested
550 * handles.c: Pass file descriptors when forking
552 * daemon.c: Use supplied file descriptors when forking a new
556 * daemon-messages.c: Pass stdin, stdout and stderr file
557 descriptors to the daemon (used when forking)
559 2002-07-11 Miguel de Icaza <miguel@ximian.com>
561 * daemon.c (_wapi_daemon_main): Use sizeof
562 (main_socket_address.sun_path) instead of hardcoded 108 value.
564 * handles.c (shared_init): Use sizeof
565 (shared_socket_address.sun_path) instead of hardcoded 108 value.
567 2002-07-10 Dennis Haney <davh@davh.dk>
571 * daemon.c: Lots of documentation, some added error checking, and
572 code readability improvements.
574 * daemon-messages.h: Add the Error request type to improve error
577 * daemon-messages.c: Do a bit more error checking on send() and
578 recv(), and log errors with a higher severity level.
580 2002-07-04 Dick Porter <dick@ximian.com>
582 * daemon.c (process_process_fork): Fix argument handling, due to
583 buggy understanding of g_strsplit() behaviour.
585 2002-07-03 Dick Porter <dick@ximian.com>
588 * threads.c: Implement OpenThread(). Define access-control values
594 * Makefile.am: Added access.h, to hold shared access-control
597 2002-07-02 Dick Porter <dick@ximian.com>
599 * wapi-private.h (_WAPI_HANDLE_VERSION): New protocol version
601 2002-07-02 Dick Porter <dick@ximian.com>
603 * handles.c (shared_init): Make a second attempt to contact the
604 daemon if the shared memory attach succeeds, but the connect()
605 fails. (This copes with the daemon crashing without cleaning up
611 * shared.c (_wapi_shm_attach): Don't exec() anything when we fork
612 the daemon, it's now built into the library.
614 2002-06-25 Dick Porter <dick@ximian.com>
619 * daemon.c: Process forking and handle data management
623 * processes.c: Process forking and other support functions
625 2002-06-25 Dick Porter <dick@ximian.com>
627 * versioninfo.h: PE resource decoding
629 * unicode.c (_wapi_unicode_to_utf8): g_utf16_to_utf8 doesnt need
630 to be told the string length
632 * io.c: Removed the ACTUALLY_DO_UNICODE option. Fixed some leaks.
633 Moved _wapi_time_t_to_filetime and the WapiFileTime typedef to
636 2002-06-12 Dick Porter <dick@ximian.com>
639 * daemon-messages.c: Handle SIGPIPE in a non-stupid way in the
640 daemon, if MSG_NOSIGNAL isn't available. Thanks to Jaroslaw
641 Kowalski <jarek@atm.com.pl> for pointing out the bogosity.
643 2002-06-10 Jaroslaw Kowalski <jarek@atm.com.pl>
645 * sockets.c, daemon-messages.c: Prevent SIGPIPE from being raised
646 when writing to a closed socket.
648 2002-06-08 Jeffrey Stedfast <fejj@ximian.com>
650 * mono-mutex.c (mono_once): New convenience function for my
655 * critical-sections.c:
663 * atomic.c: Use mono_once() rather than pthread_once().
665 2002-06-06 Jeffrey Stedfast <fejj@ximian.com>
667 * handles.c (_wapi_handle_new): pthread_once() is not atomic, so
668 if multiple threads all try to call _wapi_handle_new() before the
669 shared data has been initialized, it is possible that we could get
670 into a condition where shared_init() is being executed and later
671 threads will pass by pthread_once() due to the fact that it has
672 already been called and so therefor will attempt to use the shared
673 data before it has been completely initialized. If we instead use
674 a standard mutex locking mechanism around shared_init(), we can
675 avoid the situation entirely. By wrapping the mutex locking in a
676 check to see if we've already initialized the data, we can even
677 avoid wasting resources by having to lock/unlock the mutex in any
678 later calls (the only time we'd have to worry about
679 locking/unlocking is the initial race to call shared_init() at
682 Sat Jun 1 13:27:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
684 * atomic.h: inline asm fixes from Dennis Haney (davh@davh.dk).
686 Fri May 31 16:21:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
688 * daemon.c, handles.c: rename "sun" local var since it's apparently
689 a #define on Solaris.
691 Fri May 31 15:40:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
693 * daemon-messages.c: work-around MSG_NOSIGNAL missing on some
696 2002-05-15 Dick Porter <dick@ximian.com>
698 * wait.c: Fix a deadlock in WaitForMultipleObjects
700 2002-05-14 Dick Porter <dick@ximian.com>
702 * io.c: Fix a cut&paste error, found by
703 Jaroslaw Kowalski <jarek@atm.com.pl>
705 2002-05-10 Dan Lewis <dihlewis@yahoo.co.uk>
709 2002-05-09 Dick Porter <dick@ximian.com>
717 * Makefile.am: Remove now-unused file wait-private.h
719 2002-05-08 Dick Porter <dick@ximian.com>
721 * shared.c: Better error messages, and report when daemon
722 connection fails rather than blocking forever. Do some more
723 shared memory sanity checking.
725 * handles.c: Better error messages when connecting to shared
726 memory and the handle daemon. Fall back to non-shared handles if
727 an error occurs. Set the default back to 'shared handles'. Fix a
728 crashing bug in scratch space allocation that mangled the block
731 2002-05-07 Miguel de Icaza <miguel@ximian.com>
733 * handles.c (shared_init): Disable SHM for now, people have too
734 many problems with this, and the diagnostics are not helping.
736 2002-05-06 Dan Lewis <dihlewis@yahoo.co.uk>
738 * io.c: CreateFile sets win32 last error.
740 2002-05-05 Dick Porter <dick@ximian.com>
751 * semaphore-private.h:
755 * event-private.h: Simplify the WapiHandleOps struct: take out all
756 the file-specific entries, leaving just the items that operate on
757 handles themselves. Split the close operation into shared and
758 private parts: shared close is called by the daemon.
760 * handles.c: As above, but also pass handle allocation, ref and
761 unref operations to the daemon. Populate the handle_ops array at
762 compile time, because the daemon needs to call ops on handles too.
763 Don't bother to track open handle counts any more, the daemon does
767 * thread-private.h: As above, but also make the thread data
770 * shared.c: Fork a handle daemon if the calling process created
771 the shared memory segment.
776 * Makefile.am: Build a daemon to manage handle allocation and
777 destruction without needing to lock the shared memory
779 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
781 * atomic.c: Changed to use a normal mutex rather than a spinlock
782 since a lot of platforms seem to not have them :\
784 2002-04-30 Dick Porter <dick@ximian.com>
786 * Completely rewrote the handle waiting code: removed the helper
787 thread and its attendant complexity. All handle waiting is now
788 abstracted into the WaitForSingleObject() and
789 WaitForMultipleObjects() functions.
791 * Implemented inter-process sharing of handles using sysv shared
792 memory. This makes handles even more opaque, with a handle now
793 just an index into an array.
795 2002-04-25 Dan Lewis <dihlewis@yahoo.co.uk>
797 * io.c: unitialized pointer in GetCurrentDirectory.
799 Sat Apr 20 13:37:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
801 * threads.c: destroy the mutex at thread destruction
802 (if/when thread destruction code will be actually called).
803 When protecting a tls data pointer from the gc, use also the
804 thread id in the key.
806 Wed Apr 17 18:36:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
808 * timed-thread.c: avoid race condition when setting the thread to
811 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
813 * jit.h: to more #include lines to avoid breaking compilation
814 under windows when upgrading mingw and w32api to version
817 2002-04-16 Dick Porter <dick@ximian.com>
819 * atomic.h: Explanatory comment about lack of 80386 support
821 2002-04-15 Dick Porter <dick@ximian.com>
823 * atomic.h: use xaddl for InterlockedIncrement() and
824 InterlockedDecrement(). Use cmpxchgl in a loop for
825 InterlockedExchange() and InterlockedExchangePointer().
827 Mon Apr 15 13:31:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
829 * unicode.c: fix unicode_len() to not access uninitialized memory
830 (and updated to conform to mono code style).
832 Fri Mar 29 17:15:11 CET 2002 Paolo Molaro <lupus@ximian.com>
834 * io.c: EEXISTS is ignored for directory creation.
835 * mono-mutex.h: remove silly "pragma }" that emacs users insert
836 because they use a broken editor:-)
838 2002-03-28 Dick Porter <dick@ximian.com>
844 * handles.c: Warning cleanups
846 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
848 * unicode.h, unicode.c: changed to gunichar2
849 * io.h, io.c: changed strings to gunichar2*, added
850 SetFileAttributes(), GetCurrentDirectory(), SetCurrentDirectory(),
851 some fixes to FindFirstFile() and friends.
853 2002-03-26 Dick Porter <dick@ximian.com>
855 * types.h: Implement the large integer struct
858 * timefuncs.c: Dummy functions that don't yet implement
859 QueryPerformanceCounter() and QueryPerformanceFrequency()
862 * threads.c: Implement SleepEx()
865 * system.c: Beginnings of GetSystemInfo()
867 * mono-mutex.c (pthread_mutex_timedlock): Fix a ms/ns conversion
871 * context.c: Dummy function that doesnt yet implement
875 * atomic.c: Interlocked functions
877 Mon Mar 25 13:01:40 CET 2002 Paolo Molaro <lupus@ximian.com>
879 * threads.c: use a gc-safe hash table to store tls pointers.
881 2002-03-22 Dick Porter <dick@ximian.com>
883 * threads.c: Fix a race condition where a thread can start and
884 exit before the handle has been properly initialised (no reason
885 why the handle couldn't be initialised beforehand, so do so)
887 Fix a ms to ns conversion magnitude thinko.
889 2002-03-21 Dick Porter <dick@ximian.com>
891 * semaphores.c: Fix a problem when waiting for one or more
892 semaphores, and another semaphore is Released (all waiting
893 semaphores assumed they were signalled)
895 2002-03-29 Dan Lewis <dihlewis@yahoo.co.uk>
897 * io.h, io.c, uglify.h: added MoveFile, CopyFile, CreateDirectory,
898 RemoveDirectory, GetFileAttributes, GetFileAttributesEx
900 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
902 * threads.c (Sleep): bug fix: 1ms == 1000000ns
904 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
906 * io.h, io.c, events.c, mutexes.c, semaphores.c, sockets.c,
907 threads.c, io.c: added flush method to handles.
909 * io.c: FlushFileBuffers() and FindFirstFile() functions.
911 Thu Mar 7 17:21:52 CET 2002 Paolo Molaro <lupus@ximian.com>
913 * threads.c, timed-thread.c, wait.c: Boehm-GC anable.
915 2002-02-20 Dick Porter <dick@ximian.com>
917 * io-layer.h: Always build without cygwin support on windows
919 Mon Feb 18 15:50:59 CET 2002 Paolo Molaro <lupus@ximian.com>
921 * sockets.c: #undef DEBUG.
923 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
925 * io-layer.h: conditionally include sys/filio.h and sys/sockio.h
926 for FIONBIO, FIONREAD, and SIOCATMARK.
928 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
930 * sockets.c: conditionally include sys/filio.h and sys/sockio.h
931 for FIONBIO, FIONREAD, and SIOCATMARK.
933 2002-02-13 Dick Porter <dick@ximian.com>
935 * sockets.c: Implement shutdown and select
937 2002-02-13 Jeffrey Stedfast <fejj@ximian.com>
939 * mono-mutex.[c,h]: New source files that thinly wrap all pthread
940 functions that take pthread_mutex_t and/or pthread_mutexattr_t
941 arguments for the sake of portability. Implements recursive
942 mutexes and pthread_mutex_timedlock.
944 * critical-sections.c:
951 * wait.c: Use the mono-mutex wrapper portability functions/macros.
953 * pthread-compat.[c,h]: Replaced by mono-mutex.[c,h]
955 2002-01-23 Dick Porter <dick@ximian.com>
957 * sockets.c: Networking support, mostly wrapping BSD socket APIs
958 with handle code, and translating errno into w32 error codes.
960 * macros.h: Some w32 macros used with the socket support
962 * error.c: Implemented GetLastError() and SetLastError()
964 * Makefile.am: Added sockets, with kludge to override some symbols
966 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
968 * unicode.c (_wapi_unicode_to_utf8): byteswap UTF16 strings before
969 passing them to iconv
970 (_wapi_unicode_to_utf8): only swap bytes on LE systems, remove bug
971 from previous commit.
973 2001-12-11 Dick Porter <dick@ximian.com>
975 * io.c: Implement DeleteFile(), GetFileTime(), SetFileTime() and
976 FileTimeToSystemTime().
978 * unicode.c (unicode_len): Nasty way of finding length of unicode
979 string with embedded NULLs (counts until two NULLs together).
981 * mutexes.c (mutex_close):
982 * events.c (event_close): Release the internal pthreads resources
984 2001-11-26 Dick Porter <dick@ximian.com>
986 * critical-sections.c:
994 * wait.c: turn off DEBUG messages
996 2001-11-22 Dick Porter <dick@ximian.com>
998 * handles.c (SignalObjectAndWait): Implement
1000 * wait.c (WaitForSingleObject): Fix case where timeout == 0
1006 * events.c: Support for SignalObjectAndWait
1008 2001-11-21 Dick Porter <dick@ximian.com>
1015 * wait.c: Reliable method of returning which handle was signalled
1016 on return from WaitForMultipleObjects().
1018 2001-11-21 Dick Porter <dick@ximian.com>
1020 * events.c: Implement events
1022 2001-11-15 Dick Porter <dick@ximian.com>
1024 * mutexes.c: Implement mutexes
1028 * misc.c: Factor out some common code
1030 2001-11-13 Dick Porter <dick@ximian.com>
1032 * threads.c: Implement TLS. Implement GetCurrentThreadId(), and
1033 GetCurrentThread() by maintaining a hash of thread handles.
1035 * threads.h: Define thread and process creation flags
1037 2001-11-12 Dick Porter <dick@ximian.com>
1039 * critical-sections.c: Implement critical sections
1041 2001-11-12 Dick Porter <dick@ximian.com>
1043 * semaphores.c: Implement semaphores
1045 * wait.c (wait_for_item): Maintain a wait count rather than count
1048 * threads.c (thread_wait_multiple): Don't lock the wait item, that
1049 will block other wait threads
1051 2001-11-11 Dick Porter <dick@ximian.com>
1053 * Makefile.am: Rename some automake variables
1054 (from Nick Drochak <ndrochak@gol.com>)
1056 2001-11-10 Dick Porter <dick@ximian.com>
1058 * Makefile.am (libwapiincludedir): Fix include destination
1060 * .cvsignore: Ignore generated files
1062 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
1064 * pthread-compat.c: added some include files to make it compile on
1067 2001-11-08 Dick Porter <dick@ximian.com>
1071 This is a library emulating the win32 threading and IO API.