1 2004-08-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
3 * atomic.h: add support for 64-bit S/390
5 2004-07-22 Dick Porter <dick@ximian.com>
8 * threads.c: Move the destruction of the internal thread data to
9 after the thread has been joined. Fixes bug 61418.
11 2004-07-14 Dick Porter <dick@ximian.com>
13 * wait.c (test_and_own): When not waiting for all handles to
14 become signalled, only own and return the lowest. All the
15 documentation suggests that the old way was correct, but
16 experimentation shows it actually works like this. Patch by
18 (sebastien.robitaille@croesus.com), fixes bug 61511.
20 2004-07-09 Ben Maurer <bmaurer@ximian.com>
22 * threads.c: register roots for gc
24 2004-07-08 Dick Porter <dick@ximian.com>
26 * io.c (file_seek): If there is a high 32bit offset part, make
27 sure the low part isn't sign-extended. Set error codes when
28 returning failure. Fixes bug 61131.
30 2004-07-06 Dick Porter <dick@ximian.com>
32 * io.c (file_setfiletime): Check for underflow when converting to
33 time_t values. Set error codes when returning failure. Fixes bug
36 2004-07-05 Dick Porter <dick@ximian.com>
38 * mutexes.c (mutex_ops_init): Make the named mutex mutex sharable.
40 * daemon.c (unref_handle): Only destroy a handle if all processes
41 have released it, not just the current one. Fixes bug 60887.
43 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
45 * mono-mutex.h atomic.h: Add G_GNUC_UNUSED to static inline functions
48 2004-06-24 Dick Porter <dick@ximian.com>
50 * mutexes.c: Indicate when a named mutex was reused
52 2004-06-24 Dick Porter <dick@ximian.com>
54 * threads.c (SuspendThread):
55 * timed-thread.c (_wapi_timed_thread_suspend): Wrap sem_wait in a
56 while loop. See bug 58161.
58 Wed Jun 23 23:29:04 CEST 2004 Paolo Molaro <lupus@ximian.com>
60 * io.c: don't use sharemode for on-disk file permissions: it's used
61 for shared access to the open file.
63 2004-06-22 Dick Porter <dick@ximian.com>
65 * events.c (CreateEvent): When creating an auto-reset event that
66 is initially owned, make sure the set count starts at 1.
68 2004-06-18 Dick Porter <dick@ximian.com>
71 * events.c: Auto-reset events need to release one thread for each
72 time SetEvent() is called. Fixes bug 41292.
76 * mutexes.c: Scan for mutexes that are still locked by a thread
77 when it exits. Fixes the MS demo app linked by bug 41292.
79 * wait.c (test_and_own): Make sure a handle is signalled before it
82 2004-06-16 Dick Porter <dick@ximian.com>
84 * timed-thread.c: Call the thread cleanup exit routine before taking
85 the join mutex, because this could deadlock if another thread tries
86 to join in the meantime. This fixes the hang-at-exit problem seen
89 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
91 * threads.c: Implemented SleepEx.
92 * threads.h: Fixed SleepEx signature.
94 2004-06-03 Miguel de Icaza <miguel@ximian.com>
96 * threads.c: When running under valgrind, do not allocate too much
97 stack, as Valgrind default is 1 meg.
99 2004-05-27 Dick Porter <dick@ximian.com>
102 * io.c: Implemented LockFile() and UnlockFile()
104 2004-05-21 Dick Porter <dick@ximian.com>
106 * io.c (CreateFile): Check for existing share modes when opening
112 * daemon.c: Maintain a hash of file share modes, keying on device
113 and inode (to cope with symlinks.)
115 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
117 * daemon-messages.c: Retry if the communication with the daemon is
118 interrupted by a signal.
119 * io.c, sockets.c: Check for EINTR in every syscall that can be interrumped.
120 Only return an error in this case if there is something in the apc queue
121 (which means that it is an interruption requested by the "user").
122 * processes.c: Use WaitForSingleObjectEx. No need to pass "alertable" as
123 true since the wait is small.
124 * shared.c: Retry write calls when interrumped by a signal.
125 * timed-thread.h, timed-thread.c: added _wapi_thread_apc_pending, which
126 returns TRUE if there are pending asynchronous calls (APC) for the
127 provided thread. Also added _wapi_thread_dispatch_apc_queue which calls
128 the enqueued APCs. Defined a new struct ApcInfo that holds information
129 about an enqueued APC.
130 * thread-private.h, threads.c: Implemented QueueUserAPC (which does the same
131 as in win32),_wapi_thread_apc_pending and _wapi_thread_dispatch_apc_queue.
132 These last two methods call the corresponding apc methods in
133 thread-private using the provided thread handle.
134 * threads.h: Added QueueUserAPC.
135 * uglify.h: Added WapiApcProc (needed by QueueUserAPC).
136 * wait.c, wait.h: Changed WaitForSingleObject to WaitForSingleObjectEx, and
137 WaitForMultipleObjects to WaitForMultipleObjectsEx. Implemented support
138 for APCs in those two methods and also in SleepEx.
140 2004-05-17 Dick Porter <dick@ximian.com>
142 * io.c (CopyFile): Speed up. Fixes bug 57859.
144 2004-05-13 Dick Porter <dick@ximian.com>
145 * mono-mutex.c (mono_mutex_unlock): Return EPERM when the current
146 thread doesn't own the mutex, rather than assert()ing.
148 2004-05-11 Dick Porter <dick@ximian.com>
150 * shared.c (_wapi_shm_attach): Cope when a previous daemon startup
151 attempt failed, leaving shared files that look like a daemon is
154 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
157 (SetFileAttributes): don't the the exec bit if the corresponding read
160 2004-05-10 Zoltan Varga <vargaz@freemail.hu>
162 * io.c (FindFirstFile): Fix invalid free.
164 2004-05-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
166 * io.c: translate from GFileError to errno codes and don't free
167 variables right after calling mono_io_scandir, as we may overwrite
170 2004-05-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
172 * io.c: g_dir_open return ENOENT for directories on which we don't have
173 read/execute permission, while returning EPERM for anything below those.
174 So, change ENOENT by EPERM if the directory exists.
176 2004-05-07 Dick Porter <dick@ximian.com>
178 * io.c (SetFileAttributes): Don't have failed chmod()s cause a
179 "file not found" error. Fixes bug 54032.
181 2004-05-07 Dick Porter <dick@ximian.com>
183 * io.c (FindFirstFile): Comment out a windows-compatibility check
184 that breaks when directories have metachars in their names.
185 Workaround for bug 58116.
187 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
189 * io.c: fixed for FindFirstFile for empty directories. Closes
192 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
194 * processes.c: set the start time for the current process. Fixes bug
197 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
199 * io-private.h: 'namelist' is now a gchar ** in _WapiHandlePrivate_find.
200 * io.c: implemented scandir using glib functions.
202 2004-05-04 Dick Porter <dick@ximian.com>
204 * daemon.c (read_message): Return FALSE on error so the GSource
205 callback itself can return FALSE. Cures the infinite loop poll()
207 * shared.c: Fix some daemon startup race conditions.
209 2004-04-29 Miguel de Icaza <miguel@ximian.com>
211 * io.c (CopyFile): Use 32k buffers to copy the file instead of 2k,
212 use the stack, do not use dynamic memory.
214 2004-04-29 Zoltan Varga <vargaz@freemail.hu>
216 * io.c: Add scandir implementation for platforms which do not have
219 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
221 * io.[ch]: implemented GetLogicalDriveStrings.
223 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
226 * sockets.c: use the field name from configure when accessing sigval
227 pointer field. Makes this work on the Mac.
229 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
231 * atomic.c: (InterlockedExchange) fix typo for
234 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
237 * sockets.c: added check for sys/aio.h.
239 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
241 * error.[ch]: added _wapi_get_win32_file_error...
242 * io.c: ... which was _wapi_get_win32_error here.
243 * sockets.c: rename the function calls here too.
245 2004-04-28 Dick Porter <dick@ximian.com>
247 * daemon-messages.c: Avoid a deadlock when a thread is killed while
248 waiting for the daemon by using a recursive mutex. Helps bug 56699.
250 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
252 * io.c: fixed leak in async_notifier().
254 * sockets.[ch]: added AIO support for sockets and fixed WSAIoctl
257 * threads.c: removed old comment.
259 2004-04-26 David Waite <mass@akuma.org>
268 * wapi-private.h: remove comma from end of enumeration declarations
269 * status.h: cast unsigned int types to int for enum assignment
271 2004-04-26 David Waite <mass@akuma.org>
274 * timefuncs.c: declare 64-bit constants as long long types (i.e.
277 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
279 * socket-wrappers.h: _wapi_socket == WSASocket now. Added
282 * sockets.c: new unused parameters for _wapi_socket.
284 2004-04-22 Miguel de Icaza <miguel@ximian.com>
286 * timed-thread.c: Replace sem_init with MONO_SEM_INIT to handle
287 the fact that MacOS X is a piece of junk (sem_init is *defined* in
288 the libc, but they return `not implemented').
290 2004-04-22 Dick Porter <dick@ximian.com>
293 * handles-private.h: Reference the handle when it is locked, so
294 that another thread can't blow it away while we're waiting for it
310 * critical-sections.c:
311 * atomic.c: Added pthreads cleanup handlers and error asserts
314 * handles.c: Fixed the gcc "variable might be used uninitialised"
315 warnings. They can't happen, but gcc doesn't know that
316 g_assert()s don't return.
318 Fixed the declaration of _wapi_handle_process_kill() so that it
319 expects the correct type for the pid.
321 * threads.c: Removed the TLS_PTHREAD_MUTEX style locking that
322 hasn't been used in ages and just made the code more complex.
324 2004-04-17 Zoltan Varga <vargaz@freemail.hu>
326 * processes.c: Include <signal.h> for SIGKILL and SIGILL + fix some
327 warnings. Fixes #57168.
329 2004-04-16 Dick Porter <dick@ximian.com>
331 * threads.c (Sleep): Using div(3) with a negative (when signed)
332 numerator causes the quotient to be 0 and the remainder to be the
333 numerator. This feeds a small negative value to nanosleep(3),
334 which will return immediately and cause a busy wait. Fixes bug
337 2004-04-15 Dick Porter <dick@ximian.com>
340 * io.c: Rewrite FindFirstFile and FindNextFile using scandir(3)
341 and fnmatch(3) instead of glob(3). glob() can't cope with being
342 given filenames containing metachars. This fixes bug 40557.
344 2004-04-14 Bernie Solomon <bernard@ugsolutions.com>
346 * security.c: #warning is a GCC-ism
348 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
350 * security.c: Removed GetUserName as glib g_get_user_name does a
351 better (portability) job. Added ImpersonateLoggedOnUser and
354 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
356 * mono-mutex.h: move pthread_mutex_timedlock declaration to...
357 * mono-mutex.c: ...here. It was causing a warning that prevented
358 libgdiplus compilation.
360 2004-04-04 Miguel de Icaza <miguel@ximian.com>
362 * security.c (GetUserName): Make it work on MacOS X
364 2004-04-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
366 * security.c: use getpwuid_r if available. This one is thread-safe.
368 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
370 * Makefile.am: Added security.c|h.
371 * security.c: New file for security related functions. Added function
372 GetUserName to fix #56144.
373 * security.h: New. Header file for security.c
374 * wapi.h: Added include for security.h
376 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
378 * daemon-messages.h: added kill structs.
380 * daemon.c: implemented process_process_kill.
381 * handles-private.h: define process_process_kill.
382 * handles.c: implemented _wapi_handle_process_kill.
383 * processes.[ch]: implemented TerminateProcess.
385 2004-03-25 Bernie Solomon <bernard@ugsolutions.com>
387 * daemon.c (rem_fd): On solaris you seem to get an
388 error even after removing the input source so don't
389 try and rem_fd it twice.
391 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
393 * daemon.c: in process_post_mortem, If the child terminated due to the
394 receipt of a signal, the exit status must be based on WTERMSIG, since
395 WEXITSTATUS returns 0 in this case.
397 2004-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
399 * daemon.c: turned a warning into a DEBUG statement. Now we may hit it.
401 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
403 * daemon.c: only call getdtablesize () once.
404 * processes.c: wait 500 ms to check if execve failed and throw the same
405 exception as MS on failure. Fixes bug #32809.
407 2004-03-17 Bernie Solomon <bernard@ugsolutions.com>
409 * io.c (async_notifier): use "union sigval" rather
410 than sigval_t as Solaris doesn't have sigval_t
411 (which isn't in IEEE 1003.1 either).
413 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
415 * io.c: added debug stuff and removed a few redundant lines in
418 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
420 * io-private.h: added new fields for file structure. Declare
421 _wapi_io_add_callback.
423 * io.c: added _wapi_get_win32_error, support aio_read/write in
424 file_read/write. Implemented _wapi_io_add_callback, which is where
427 * io.h: added new fields for WapiOverlapped and typedef for the
430 * processes.c: fixed off-by-one bug when handling environment variables
433 * threads.[ch]: implemented BindIoCompletionCallback.
435 * uglify.h: added typedef for LPOVERLAPPED_COMPLETION_ROUTINE.
437 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
439 * socket-wrappers.h: Remove extra semicolon.
441 2004-03-03 Dave Camp <dave@ximian.com>
443 * daemon.c: (add_fd), (fd_activity), (_wapi_daemon_main):
444 Use a new main context.
446 2004-03-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
449 (GetFileAttributes): set the error depending on errno instead of
450 setting ERROR_FILE_NOT_FOUND always. See bug #55160.
452 2004-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
455 (CopyFile): free the buffer on error.
457 (WSAIoctl): free the buffer on error.
459 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
461 * error.c: fixed mapping for EPROTONOSUPPORT and ESOCKTNOSUPPORT.
463 * sockets.[ch]: retry creating the socket for AF_INET, SOCK_RAW
464 using IP protocol with IP over IP. Implemented WSAIoctl UNIX-style.
466 2004-01-27 Bernie Solomon <bernard@ugsolutions.com>
468 * shared.c (_wapi_shm_file): add hostname
469 to shared data file names to handle NFS mounted
472 Mon Jan 26 16:15:03 CET 2004 Paolo Molaro <lupus@ximian.com>
474 * sockets.h: remove obsolete soklen_t typedef.
476 Fri Jan 23 21:07:02 CET 2004 Paolo Molaro <lupus@ximian.com>
478 * socket-wrappers.h, sockets.h, sockets.c, Makefile.am: move socket
479 wrappers to its own non-installed header file.
481 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
484 (FindFirstFile): unlock the handle if FindNextFile fails.
485 (FindNextFile): g_free a couple of pointers before retrying.
488 (WaitForMultipleObjects): if only one handle provided, use
491 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
493 * handles-private.h: (_wapi_handle_type) check
494 for segment in range before using it
496 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
498 * thread-private.h: _wapi_thread_ops is now const
501 Mon Dec 22 18:29:03 CET 2003 Paolo Molaro <lupus@ximian.com>
503 * threads.c, timed-thread.c, timed-thread.h: use mach
504 semaphores on Darwin (MacOSX) since the posix ones
505 are mostly broken there (threads are not created suspended
506 and they can start executing before they are fully initialized
507 like in tests/thread-static.cs).
509 Mon Dec 22 17:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
511 * atomic.h: ppc fixes.
513 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
515 * handles.c: remove my bad use of MONO_ZERO_ARRAY_LENGTH
518 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
520 * shared.c: (_wapi_shm_open) make scratch file
521 not have to immediately regrow to avoid remaps
522 (HPUX can't cope with these).
523 (_wapi_shm_attach) use actual size of file
524 to set scratch data_len for the creating process.
526 * handles.c: (_wapi_handle_new_internal) make
527 sure mutex & cond var are initialized even for
528 non process shared ones.
529 (_wapi_handle_unref) always call destroy
530 routines on mutex & cond var
532 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
534 * daemon.c: change channel data structure so
535 input sources are removed from glib event loop
536 properly. xsp works better on Solaris and
539 2003-12-12 Bernie Solomon <bernard@ugsolutions.com>
541 * wapi-private.h: Replace G_GNUC_PRETTY_FUNCTION
542 definition with file & line number for non-GCC
545 2003-12-08 Bernie Solomon <bernard@ugsolutions.com>
547 * Makefile.am: make sure hppa_atomic.s is in distribution
549 2003-12-01 Dick Porter <dick@ximian.com>
552 * mutexes.c (CreateMutex):
553 * mutex-private.h (struct _WapiHandle_mutex):
554 * handles.c: Look up certain handle types by name, in a shared
555 namespace. Currently only mutex handles have this implemented.
558 * semaphores.c (CreateSemaphore):
559 * events.c (CreateEvent): Fix signature
561 2003-11-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
563 * io.c: don't call g_free before testing errno as it may modify it.
564 If the path exists, return an error if it's not a directory. Fixes
567 2003-11-20 Dick Porter <dick@ximian.com>
569 * io.c: Missed a little-endian UTF16 conversion. Patch from
570 Jeroen Zwartepoorte (Jeroen@xs4all.nl), fixes bug 51065.
572 2003-10-29 Dick Porter <dick@ximian.com>
574 * io.c (MoveFile): If the move crosses filesystems, try and fall
575 back to copy and delete. Patch from Jörg Rosenkranz
576 (JoergR@voelcker.com), fixes bug 50298.
578 2003-10-28 Dick Porter <dick@ximian.com>
580 * io.c: Use the new encoding conversion to cope with non-utf8
581 locales in filenames.
583 * processes.c: Ditto for process arguments.
585 Tue Oct 21 12:01:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
587 * atomic.h: some ppc inline asm fixes (incorrect use of labels,
588 incorrect register constraints, incorrect clobber lists).
590 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
592 * Makefile.am hppa_atomic.s: add HP 64bit
593 implementation of atomic ops
595 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
597 * threads.c (CreateThread): Wrap pthread_attr_setstacksize call in
598 a conditional for platforms that don't have it.
600 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
602 * threads.c: (CreateThread) use stacksize argument
603 if non-zero - change default for 64 bits to 4Mb
605 2003-09-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
607 * sockets.c: set last error when socket creation fails. This shed some
610 2003-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
612 * processes.c: fixed bug #48973: we only change \ by / for the argument
613 to be used as command.
614 When getting the program name from the args, don't let the space between
617 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
619 * atomic.h atomic.c: fix sparc so lock is
620 global, increment does so and it compiles under Sun compiler.
622 2003-09-22 Bernie Solomon <bernard@ugsolutions.com>
624 * handles.c: include <string.h> directly as may
625 not be nested in <sys/un.h> like Linux
627 2003-09-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
630 (DeleteFile): call SetLastError on failure. Fix by
631 richard.torkar@htu.se (Richard Torkar). Closes bug #48222.
633 2003-09-15 Lluis Sanchez Gual <lluis@ximian.com>
635 * daemon.c: In compare_process(), discard handles already signalled.
637 2003-09-02 Dick Porter <dick@ximian.com>
639 * io.c: Work around glib brain-dead assumptions about utf8-encoded
640 filenames. Fixes bug 30781.
642 2003-08-28 Dick Porter <dick@ximian.com>
644 * critical-sections.c: Patch from Bernie Solomon
645 <bernard@ugsolutions.com> to emit a warning if locking a critical
648 2003-07-23 Dick Porter <dick@ximian.com>
651 * daemon.c (maybe_exit): Avoid the race condition when the daemon is
652 closing but another client comes along when the shared data is still
653 visible. Should fix bugs 33671 and 35213.
655 2003-07-23 Dick Porter <dick@ximian.com>
657 * handles.c: Initialise handle mutex and cond. Fix by
658 Bernie Solomon <bernard@ugsolutions.com>
660 2003-07-15 Dick Porter <dick@ximian.com>
662 * timed-thread.c (timed_thread_start_routine): Fix virtual memory
663 leak when threads quit. Fixes bug 44067.
665 Wed Jun 18 19:08:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
667 * io.c: never add write permission for group or others in
668 SetFileAttributes ().
670 2003-06-17 Dick Porter <dick@ximian.com>
672 * io.c (SetFileAttributes): Implement the ReadOnly attribute, and
673 ignore the unsupported ones ("fixes" bug 44977).
675 2003-06-17 Lluis Sanchez Gual <lluis@ximian.com>
677 * misc.c: fix bug in _wapi_calc_timeout. It gave wrong values for
678 high ms values (there was an overflow).
680 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
682 * system.h (struct _WapiSystemInfo ): Fix warnings when using gcc-3.3.
684 2003-06-11 Dick Porter <dick@ximian.com>
686 * shared.c: Fix shared directory creation. Patch from
687 Pablo Baena <pbaena@uol.com.ar>
689 2003-06-10 Dick Porter <dick@ximian.com>
691 * atomic.c: Delete the useless compile warning
693 2003-06-09 Dick Porter <dick@ximian.com>
695 * daemon.c: Lookup env as a string array. Fixes bug 44289. Also
696 make setting the process handle value in the environment actually
699 * processes.c: Pretty up the process name, if it happens to be
700 "mono" such as when another mono process forks "mono foo.exe"
702 2003-06-05 Dick Porter <dick@ximian.com>
704 * processes.c (process_set_current): Don't do an expensive handle
705 search at application startup, check the environment to see if the
706 process handle has already been created.
708 * io.c: Don't do an expensive handle search when creating stdin,
709 stdout and stderr handles, just create them all the first time one
719 * daemon.c: Support for "unlimited" number of handles and scratch
722 Speed up application startup by passing process handle in the
723 environment, rather than let the app scan all handles (which gets
724 really slow when there are more than a few thousand to check.)
726 Initialise some structs passed to syscalls, noticed by valgrind.
729 2003-05-20 Dick Porter <dick@ximian.com>
731 * io.c (FindFirstFile): Include . files in the glob. Fixes bug
734 2003-05-19 Dick Porter <dick@ximian.com>
736 * threads.c: Set the new thread's stack size to 2M. Fix needed
737 for BSD, reported by Martin Dvorak <md@9ll.cz>
739 2003-05-16 Dick Porter <dick@ximian.com>
742 * io.c: Implement GetTempPath()
744 2003-05-16 Dick Porter <dick@ximian.com>
746 * processes.c (CreateProcess): Set some error codes
748 2003-05-12 Dick Porter <dick@ximian.com>
750 * misc.c (_wapi_calc_timeout): Cope with overflowing tv_nsec.
751 Patch from Martin Dvorak <mdvorak@ninell.cz>.
753 2003-05-10 Dick Porter <dick@ximian.com>
755 * io.c (CopyFile): Copy file mode as well as file data. Based on
756 suggestion by Giuseppe Greco <giuseppe.greco@agamura.com>, bug
759 2003-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
761 * handles.c: don't call GC_gcollect when creating new handles.
763 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
765 * handles.c: added some debugging code. Call GC_gcollect
766 before creating a new handle. It makes Lupus' test run smoother and
767 faster (from 62 to 83 request per second). Notice that calling
768 GC_finalizer_notifier if needed (GC_should_invoke_finalizer ()) does
769 not improve nor degrade the performance, so i don't do it.
771 2003-05-02 Dick Porter <dick@ximian.com>
773 * sockets.c: Rearrange closesocket() and socket_close_private(),
774 and remember to unref the handle, so we don't leak socket handles.
775 Fix from Pelle Johnsen <pelle.johnsen@mail.dk>
777 2003-04-11 Dick Porter <dick@ximian.com>
779 * atomic.h: ARM atomic operations by Malte Hildingson
780 <tds00mahi@tellus.thn.htu.se>
782 Tue Apr 8 11:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
784 * atomic.h: fix macosx build by "Urs C. Muff" <umuff@quark.com>.
786 2003-04-03 Martin Baulig <martin@ximian.com>
788 The following change is conditional to `WITH_INCLUDED_LIBGC'
789 which is not yet enabled by default.
791 * threads.c (SuspendThread, ResumeThread): Fully implemented this.
792 (gc_init): New static function; install a signal handler for
793 SIGPWR which is used to suspend threads. [FIXME: it SIGPWR
794 doesn't exist on all Unix systems, we need to find another
796 (mono_wapi_push_thread_stack): New public function. Tells the
797 garbage collector about the current stack pointer of a suspended
800 2003-04-03 Martin Baulig <martin@ximian.com>
802 * timed-thread.h (TimedThread): Added `suspended_sem',
803 `suspend_count' and `stack_ptr'.
805 2003-03-28 Dick Porter <dick@ximian.com>
807 * atomic.h: PPC support gratiously donated to the public domain
808 by John Duncan <jddst19@mac.com>
810 2003-03-20 Dick Porter <dick@ximian.com>
812 * sockets.c (_wapi_connect): If connect() fails with EACCES, try
813 setting SO_BROADCAST and connecting again. Fixes bug 39178.
815 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
817 * processes.c: included Jerome Laban's patch and call SetLastError when
818 the executable is not found.
820 2003-03-03 Dick Porter <dick@ximian.com>
822 * io.c (CreateFile): Try opening directories readonly, so that
823 timestamps can be adjusted. Patch by Elan Feingold
824 <efeingold@mn.rr.com>.
826 2003-02-25 Dick Porter <dick@ximian.com>
828 * shared.c (_wapi_shm_attach): Return a failure code on system
829 call errors, rather than exiting.
831 2003-02-21 Dick Porter <dick@ximian.com>
833 * processes.c (GetCurrentProcessId): Use the current process
834 handle to return the process ID, as getpid() is unreliable
835 (linuxthreads gives each thread a different pid). Fixes bug
838 2003-02-21 Dick Porter <dick@ximian.com>
840 * io.c (FindNextFile): Skip over dangling symlinks. Fixes bug
843 2003-02-11 Dick Porter <dick@ximian.com>
846 * timefuncs.c: Added GetTickCount()
848 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
850 * error.c: added WSA_EHOSTUNREACH mapping.
852 2003-01-26 Miguel de Icaza <miguel@ximian.com>
854 * io.c (SetFileAttributes): This routine is not currently
855 implemented for the general case, but I added a special case to
856 set the executable bit on Linux.
858 Wed Jan 15 15:55:40 CET 2003 Paolo Molaro <lupus@ximian.com>
860 * sockets.h, daemon.c, io.c: compilation fixes on MacOSX.
862 2003-01-08 Dick Porter <dick@ximian.com>
864 * sockets.c: Fixed setting blocking mode to true (fixes bug 36388)
866 2002-12-11 Juli Mallett <jmallett@FreeBSD.org>
868 * daemon.c, handles-private.h, handles.c, wapi-private.h:
869 Check for an implementation which says it supports
870 _POSIX_THREAD_PROCESS_SHARED, rather than just one that
871 defines the symbol. Defined but with a value of -1 still
872 means that it is unsupported.
874 2002-12-08 Martin Baulig <martin@ximian.com>
876 * handles.c (_wapi_handle_new): Create new non-shared handles with
877 an initial refcount of 1, not 0.
879 2002-11-22 Dietmar Maurer <dietmar@ximian.com>
881 * threads.c (TlsGetValue): removed unnecessary mutex
883 2002-11-20 Dick Porter <dick@ximian.com>
885 * timed-thread.c (_wapi_timed_thread_attach): Attached threads
886 need to store their data structure too.
888 * threads.c: Make sure the threading data is initialised wherever
891 2002-11-15 Dick Porter <dick@ximian.com>
893 * timed-thread.c: Removed unneeded parameters in
894 _wapi_timed_thread_attach().
896 * threads.c: Renamed AttachThread() to make it not look like
897 external API. Removed unneeded parameters.
899 2002-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
901 * error.[ch]: added errno_to_WSA (). It displays a warning and return
902 WSASYSCALLFAILURE if there is no error mapping for the given errno,
904 * sockets.c: use errno_to_WSA and fixed display of warning for h_errno.
906 2002-10-31 Dick Porter <dick@ximian.com>
909 * io.c: Define and use INVALID_FILE_ATTRIBUTES
911 2002-10-07 Dick Porter <dick@ximian.com>
914 * daemon.c: Use a more accurate time source for process start and
917 2002-10-03 Dick Porter <dick@ximian.com>
921 * threads.c: Fixes for freebsd. Make sure that mutex and condition
922 creation and deletion happen in the process that owns them, when
923 POSIX shared thread objects aren't supported. This breaks on
924 freebsd, as pthread_t is a pointer to data.
926 2002-10-02 Dick Porter <dick@ximian.com>
928 * shared.c: Use mmap() instead of sysv shm for the shared data.
930 * wapi-private.h (_WAPI_HANDLE_VERSION): Reset back to 0, for the
934 * daemon.c: mmap()ed regions survive fork, so just pass the
935 pointer to _wapi_daemon_main instead of mapping it again.
937 2002-10-01 Dick Porter <dick@ximian.com>
939 * timed-thread.c: Kludge for CREATE_SUSPENDED thread creation.
940 Unfortunately libgc uses the same thread suspend technique that I
941 want to, and the two don't mix: libgc will deadlock when it tries
942 to stop the world if a thread has already been suspended by
943 someone else. Just do the simple suspended create rather than the
944 general purpose thread suspension for now.
946 * threads.c: Pass create flags to the timed_thread create call, to
947 implement suspended thread creation. ResumeThread() partially
948 implemented, to cope with the case where a newly created but
949 suspended thread is launched.
951 2002-09-30 Dick Porter <dick@ximian.com>
953 * sockets.c (ioctlsocket): Set non-blocking mode in a better way,
956 2002-09-27 Dick Porter <dick@ximian.com>
958 * semaphores.c: Only include semaphore.h if it's present. Patch
959 for BSD from jmmv@hispabsd.org (Julio Merino).
961 2002-09-27 Dick Porter <dick@ximian.com>
963 * processes.c: Pass environment and working directory to the
964 daemon when forking. Don't let argv[0] be duplicated when looking
965 for the program name. Implement EnumProcessModules (simple
966 version for now, lsof-style later if needed), GetModuleBaseName,
967 {Get,Set}ProcessWorkingSetSize (just faked, because the vm hints
968 aren't available on Linux).
970 * process-private.h: Store the process name, and the working set
974 * handles-private.h: New functions to store and retrieve an array
975 of strings in the scratch space
977 * daemon.c: Don't miss deleting some handles when a client exits
978 (we used to rely on the client doing the final cleanup, but
979 obviously if the client is no longer there the daemon has to do
982 Process forking now sets the environment and the working
985 * io.c: Don't confuse fd 0 with an unassigned handle struct
987 * atomic.h: Add a google cache alternative to the msdn URL
989 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
992 (_wapi_recvfrom): added ECONNRESET to the switch.
994 2002-09-24 Mark Crichton <crichton@gimp.org>
996 * atomic.h: Yea. On linux, sparc isn't sparc, it's __sparc__.
999 2002-09-19 Mark Crichton <crichton@gimp.org>
1001 * daemon.c, shared.c: Added NEED_LINK_UNLINK for systems that
1002 dont have Linux's abstract filesystem for sockets.
1004 2002-09-19 Mark Crichton <crichton@gimp.org>
1006 * atomic.h: Added SPARC atomic asm code.
1007 * daemon.c, handles-private.h, handles.c, wapi-private.h:
1008 undefined _POSIX_THREAD_PROCESS_SHARED. This actually exists on
1009 Solaris 9, however, the code paths don't seem to work. More testing
1010 on the shared case is *really* needed.
1012 2002-09-03 Dick Porter <dick@ximian.com>
1015 * threads.c: Removed PosixKillThread(), because it's not in the
1018 2002-08-20 Dick Porter <dick@ximian.com>
1020 * handles.c (_wapi_handle_scratch_store): Made stored byte lengths
1021 multiples of 4 bytes, to keep header structures aligned. Needed
1022 for sparc, at least. (Patch from crichton@gimp.org)
1024 * handles.c: Removed 'disable_shm' variable (we've defaulted to
1025 building with shm enabled for months now)
1027 2002-08-19 Dick Porter <dick@ximian.com>
1029 * daemon.c: Rewrote the poll() loop to use GIOChannels instead,
1030 for legacy NeXT-based systems.
1032 2002-08-12 Dick Porter <dick@ximian.com>
1034 * atomic.h: Rename some parameters to avoid c++ keywords (Patch
1035 from Joseph Wenninger <kde@jowenn.at>)
1037 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
1039 * threads.c: use fast spinlocks by default
1041 2002-08-02 Dick Porter <dick@ximian.com>
1043 * io.c (GetStdHandle): Add a handle reference when returning a
1044 duplicate console handle. This fixes the unref_handle errors in
1047 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
1049 * threads.c (TLS_PTHREAD_MUTEX): define this because else some
1052 2002-08-01 Dick Porter <dick@ximian.com>
1054 * threads.c: Use atomic spinlocks in TLS functions
1057 * Makefile.am: Added mono-spinlock.h
1059 2002-07-21 Jeffrey Stedfast <fejj@ximian.com>
1061 * daemon-messages.c: #include <sys/types.h> and <sys/sockets.h> -
1062 these are needed for sendmsg() and also for struct msghdr (at
1063 least on Solaris). Solaris still won't build because struct msghdr
1064 doesn't have msg_flags, msg_control, or msg_controllen members.
1065 (CMSG_SPACE): Define for systems that don't have it.
1068 2002-07-20 Dick Porter <dick@ximian.com>
1074 * handles.c: Implemented pipe handles
1077 * daemon.c: Fixed bug in handle closing.
1080 * daemon.c: Forked processes now close all open file descriptors.
1082 Fri Jul 19 19:05:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
1084 * sockets.h, io-layer.h, critical-sections.h: don't include config.h
1087 2002-07-19 Martin Baulig <martin@gnome.org>
1089 * threads.c (ExitThread): Call exit() if no threads has been
1092 2002-07-17 Dick Porter <dick@ximian.com>
1094 * daemon-messages.c: Freebsd fixes from Andreas Kohn
1095 <andreas.kohn@gmx.net>
1097 2002-07-15 Dick Porter <dick@ximian.com>
1099 * io.c: Removed bogus console_flush() method, that was just cut
1100 and pasted from file_flush when I separated the two handle types.
1102 2002-07-12 Dick Porter <dick@ximian.com>
1104 * io.c (convert_from_flags): Fixed misunderstanding wrt fcntl
1105 flags. Fixes bug 27633.
1107 2002-07-12 Dick Porter <dick@ximian.com>
1111 * daemon.c: Use size of sockaddr_un.sun_path from config.h
1113 2002-07-12 Dick Porter <dick@ximian.com>
1115 * processes.c (CreateProcess): Send stdin, stdout and stderr
1116 handles if the startup info doesnt specify new ones
1118 * io.c (GetStdHandle): Return the same handle when the same
1119 standard handle is requested
1121 * handles.c: Pass file descriptors when forking
1123 * daemon.c: Use supplied file descriptors when forking a new
1126 * daemon-messages.h:
1127 * daemon-messages.c: Pass stdin, stdout and stderr file
1128 descriptors to the daemon (used when forking)
1130 2002-07-11 Miguel de Icaza <miguel@ximian.com>
1132 * daemon.c (_wapi_daemon_main): Use sizeof
1133 (main_socket_address.sun_path) instead of hardcoded 108 value.
1135 * handles.c (shared_init): Use sizeof
1136 (shared_socket_address.sun_path) instead of hardcoded 108 value.
1138 2002-07-10 Dennis Haney <davh@davh.dk>
1142 * daemon.c: Lots of documentation, some added error checking, and
1143 code readability improvements.
1145 * daemon-messages.h: Add the Error request type to improve error
1148 * daemon-messages.c: Do a bit more error checking on send() and
1149 recv(), and log errors with a higher severity level.
1151 2002-07-04 Dick Porter <dick@ximian.com>
1153 * daemon.c (process_process_fork): Fix argument handling, due to
1154 buggy understanding of g_strsplit() behaviour.
1156 2002-07-03 Dick Porter <dick@ximian.com>
1159 * threads.c: Implement OpenThread(). Define access-control values
1165 * Makefile.am: Added access.h, to hold shared access-control
1168 2002-07-02 Dick Porter <dick@ximian.com>
1170 * wapi-private.h (_WAPI_HANDLE_VERSION): New protocol version
1172 2002-07-02 Dick Porter <dick@ximian.com>
1174 * handles.c (shared_init): Make a second attempt to contact the
1175 daemon if the shared memory attach succeeds, but the connect()
1176 fails. (This copes with the daemon crashing without cleaning up
1182 * shared.c (_wapi_shm_attach): Don't exec() anything when we fork
1183 the daemon, it's now built into the library.
1185 2002-06-25 Dick Porter <dick@ximian.com>
1188 * handles-private.h:
1189 * daemon-messages.h:
1190 * daemon.c: Process forking and handle data management
1193 * process-private.h:
1194 * processes.c: Process forking and other support functions
1196 2002-06-25 Dick Porter <dick@ximian.com>
1198 * versioninfo.h: PE resource decoding
1200 * unicode.c (_wapi_unicode_to_utf8): g_utf16_to_utf8 doesnt need
1201 to be told the string length
1203 * io.c: Removed the ACTUALLY_DO_UNICODE option. Fixed some leaks.
1204 Moved _wapi_time_t_to_filetime and the WapiFileTime typedef to
1207 2002-06-12 Dick Porter <dick@ximian.com>
1210 * daemon-messages.c: Handle SIGPIPE in a non-stupid way in the
1211 daemon, if MSG_NOSIGNAL isn't available. Thanks to Jaroslaw
1212 Kowalski <jarek@atm.com.pl> for pointing out the bogosity.
1214 2002-06-10 Jaroslaw Kowalski <jarek@atm.com.pl>
1216 * sockets.c, daemon-messages.c: Prevent SIGPIPE from being raised
1217 when writing to a closed socket.
1219 2002-06-08 Jeffrey Stedfast <fejj@ximian.com>
1221 * mono-mutex.c (mono_once): New convenience function for my
1226 * critical-sections.c:
1234 * atomic.c: Use mono_once() rather than pthread_once().
1236 2002-06-06 Jeffrey Stedfast <fejj@ximian.com>
1238 * handles.c (_wapi_handle_new): pthread_once() is not atomic, so
1239 if multiple threads all try to call _wapi_handle_new() before the
1240 shared data has been initialized, it is possible that we could get
1241 into a condition where shared_init() is being executed and later
1242 threads will pass by pthread_once() due to the fact that it has
1243 already been called and so therefor will attempt to use the shared
1244 data before it has been completely initialized. If we instead use
1245 a standard mutex locking mechanism around shared_init(), we can
1246 avoid the situation entirely. By wrapping the mutex locking in a
1247 check to see if we've already initialized the data, we can even
1248 avoid wasting resources by having to lock/unlock the mutex in any
1249 later calls (the only time we'd have to worry about
1250 locking/unlocking is the initial race to call shared_init() at
1253 Sat Jun 1 13:27:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
1255 * atomic.h: inline asm fixes from Dennis Haney (davh@davh.dk).
1257 Fri May 31 16:21:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
1259 * daemon.c, handles.c: rename "sun" local var since it's apparently
1260 a #define on Solaris.
1262 Fri May 31 15:40:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
1264 * daemon-messages.c: work-around MSG_NOSIGNAL missing on some
1267 2002-05-15 Dick Porter <dick@ximian.com>
1269 * wait.c: Fix a deadlock in WaitForMultipleObjects
1271 2002-05-14 Dick Porter <dick@ximian.com>
1273 * io.c: Fix a cut&paste error, found by
1274 Jaroslaw Kowalski <jarek@atm.com.pl>
1276 2002-05-10 Dan Lewis <dihlewis@yahoo.co.uk>
1280 2002-05-09 Dick Porter <dick@ximian.com>
1286 * handles-private.h:
1288 * Makefile.am: Remove now-unused file wait-private.h
1290 2002-05-08 Dick Porter <dick@ximian.com>
1292 * shared.c: Better error messages, and report when daemon
1293 connection fails rather than blocking forever. Do some more
1294 shared memory sanity checking.
1296 * handles.c: Better error messages when connecting to shared
1297 memory and the handle daemon. Fall back to non-shared handles if
1298 an error occurs. Set the default back to 'shared handles'. Fix a
1299 crashing bug in scratch space allocation that mangled the block
1302 2002-05-07 Miguel de Icaza <miguel@ximian.com>
1304 * handles.c (shared_init): Disable SHM for now, people have too
1305 many problems with this, and the diagnostics are not helping.
1307 2002-05-06 Dan Lewis <dihlewis@yahoo.co.uk>
1309 * io.c: CreateFile sets win32 last error.
1311 2002-05-05 Dick Porter <dick@ximian.com>
1314 * handles-private.h:
1320 * process-private.h:
1322 * semaphore-private.h:
1326 * event-private.h: Simplify the WapiHandleOps struct: take out all
1327 the file-specific entries, leaving just the items that operate on
1328 handles themselves. Split the close operation into shared and
1329 private parts: shared close is called by the daemon.
1331 * handles.c: As above, but also pass handle allocation, ref and
1332 unref operations to the daemon. Populate the handle_ops array at
1333 compile time, because the daemon needs to call ops on handles too.
1334 Don't bother to track open handle counts any more, the daemon does
1338 * thread-private.h: As above, but also make the thread data
1341 * shared.c: Fork a handle daemon if the calling process created
1342 the shared memory segment.
1345 * daemon-messages.c:
1346 * daemon-messages.h:
1347 * Makefile.am: Build a daemon to manage handle allocation and
1348 destruction without needing to lock the shared memory
1350 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
1352 * atomic.c: Changed to use a normal mutex rather than a spinlock
1353 since a lot of platforms seem to not have them :\
1355 2002-04-30 Dick Porter <dick@ximian.com>
1357 * Completely rewrote the handle waiting code: removed the helper
1358 thread and its attendant complexity. All handle waiting is now
1359 abstracted into the WaitForSingleObject() and
1360 WaitForMultipleObjects() functions.
1362 * Implemented inter-process sharing of handles using sysv shared
1363 memory. This makes handles even more opaque, with a handle now
1364 just an index into an array.
1366 2002-04-25 Dan Lewis <dihlewis@yahoo.co.uk>
1368 * io.c: unitialized pointer in GetCurrentDirectory.
1370 Sat Apr 20 13:37:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
1372 * threads.c: destroy the mutex at thread destruction
1373 (if/when thread destruction code will be actually called).
1374 When protecting a tls data pointer from the gc, use also the
1375 thread id in the key.
1377 Wed Apr 17 18:36:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
1379 * timed-thread.c: avoid race condition when setting the thread to
1382 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1384 * jit.h: to more #include lines to avoid breaking compilation
1385 under windows when upgrading mingw and w32api to version
1388 2002-04-16 Dick Porter <dick@ximian.com>
1390 * atomic.h: Explanatory comment about lack of 80386 support
1392 2002-04-15 Dick Porter <dick@ximian.com>
1394 * atomic.h: use xaddl for InterlockedIncrement() and
1395 InterlockedDecrement(). Use cmpxchgl in a loop for
1396 InterlockedExchange() and InterlockedExchangePointer().
1398 Mon Apr 15 13:31:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
1400 * unicode.c: fix unicode_len() to not access uninitialized memory
1401 (and updated to conform to mono code style).
1403 Fri Mar 29 17:15:11 CET 2002 Paolo Molaro <lupus@ximian.com>
1405 * io.c: EEXISTS is ignored for directory creation.
1406 * mono-mutex.h: remove silly "pragma }" that emacs users insert
1407 because they use a broken editor:-)
1409 2002-03-28 Dick Porter <dick@ximian.com>
1415 * handles.c: Warning cleanups
1417 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
1419 * unicode.h, unicode.c: changed to gunichar2
1420 * io.h, io.c: changed strings to gunichar2*, added
1421 SetFileAttributes(), GetCurrentDirectory(), SetCurrentDirectory(),
1422 some fixes to FindFirstFile() and friends.
1424 2002-03-26 Dick Porter <dick@ximian.com>
1426 * types.h: Implement the large integer struct
1429 * timefuncs.c: Dummy functions that don't yet implement
1430 QueryPerformanceCounter() and QueryPerformanceFrequency()
1433 * threads.c: Implement SleepEx()
1436 * system.c: Beginnings of GetSystemInfo()
1438 * mono-mutex.c (pthread_mutex_timedlock): Fix a ms/ns conversion
1442 * context.c: Dummy function that doesnt yet implement
1446 * atomic.c: Interlocked functions
1448 Mon Mar 25 13:01:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1450 * threads.c: use a gc-safe hash table to store tls pointers.
1452 2002-03-22 Dick Porter <dick@ximian.com>
1454 * threads.c: Fix a race condition where a thread can start and
1455 exit before the handle has been properly initialised (no reason
1456 why the handle couldn't be initialised beforehand, so do so)
1458 Fix a ms to ns conversion magnitude thinko.
1460 2002-03-21 Dick Porter <dick@ximian.com>
1462 * semaphores.c: Fix a problem when waiting for one or more
1463 semaphores, and another semaphore is Released (all waiting
1464 semaphores assumed they were signalled)
1466 2002-03-29 Dan Lewis <dihlewis@yahoo.co.uk>
1468 * io.h, io.c, uglify.h: added MoveFile, CopyFile, CreateDirectory,
1469 RemoveDirectory, GetFileAttributes, GetFileAttributesEx
1471 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
1473 * threads.c (Sleep): bug fix: 1ms == 1000000ns
1475 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
1477 * io.h, io.c, events.c, mutexes.c, semaphores.c, sockets.c,
1478 threads.c, io.c: added flush method to handles.
1480 * io.c: FlushFileBuffers() and FindFirstFile() functions.
1482 Thu Mar 7 17:21:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1484 * threads.c, timed-thread.c, wait.c: Boehm-GC anable.
1486 2002-02-20 Dick Porter <dick@ximian.com>
1488 * io-layer.h: Always build without cygwin support on windows
1490 Mon Feb 18 15:50:59 CET 2002 Paolo Molaro <lupus@ximian.com>
1492 * sockets.c: #undef DEBUG.
1494 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
1496 * io-layer.h: conditionally include sys/filio.h and sys/sockio.h
1497 for FIONBIO, FIONREAD, and SIOCATMARK.
1499 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
1501 * sockets.c: conditionally include sys/filio.h and sys/sockio.h
1502 for FIONBIO, FIONREAD, and SIOCATMARK.
1504 2002-02-13 Dick Porter <dick@ximian.com>
1506 * sockets.c: Implement shutdown and select
1508 2002-02-13 Jeffrey Stedfast <fejj@ximian.com>
1510 * mono-mutex.[c,h]: New source files that thinly wrap all pthread
1511 functions that take pthread_mutex_t and/or pthread_mutexattr_t
1512 arguments for the sake of portability. Implements recursive
1513 mutexes and pthread_mutex_timedlock.
1515 * critical-sections.c:
1522 * wait.c: Use the mono-mutex wrapper portability functions/macros.
1524 * pthread-compat.[c,h]: Replaced by mono-mutex.[c,h]
1526 2002-01-23 Dick Porter <dick@ximian.com>
1528 * sockets.c: Networking support, mostly wrapping BSD socket APIs
1529 with handle code, and translating errno into w32 error codes.
1531 * macros.h: Some w32 macros used with the socket support
1533 * error.c: Implemented GetLastError() and SetLastError()
1535 * Makefile.am: Added sockets, with kludge to override some symbols
1537 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
1539 * unicode.c (_wapi_unicode_to_utf8): byteswap UTF16 strings before
1540 passing them to iconv
1541 (_wapi_unicode_to_utf8): only swap bytes on LE systems, remove bug
1542 from previous commit.
1544 2001-12-11 Dick Porter <dick@ximian.com>
1546 * io.c: Implement DeleteFile(), GetFileTime(), SetFileTime() and
1547 FileTimeToSystemTime().
1549 * unicode.c (unicode_len): Nasty way of finding length of unicode
1550 string with embedded NULLs (counts until two NULLs together).
1552 * mutexes.c (mutex_close):
1553 * events.c (event_close): Release the internal pthreads resources
1555 2001-11-26 Dick Porter <dick@ximian.com>
1557 * critical-sections.c:
1565 * wait.c: turn off DEBUG messages
1567 2001-11-22 Dick Porter <dick@ximian.com>
1569 * handles.c (SignalObjectAndWait): Implement
1571 * wait.c (WaitForSingleObject): Fix case where timeout == 0
1577 * events.c: Support for SignalObjectAndWait
1579 2001-11-21 Dick Porter <dick@ximian.com>
1586 * wait.c: Reliable method of returning which handle was signalled
1587 on return from WaitForMultipleObjects().
1589 2001-11-21 Dick Porter <dick@ximian.com>
1591 * events.c: Implement events
1593 2001-11-15 Dick Porter <dick@ximian.com>
1595 * mutexes.c: Implement mutexes
1599 * misc.c: Factor out some common code
1601 2001-11-13 Dick Porter <dick@ximian.com>
1603 * threads.c: Implement TLS. Implement GetCurrentThreadId(), and
1604 GetCurrentThread() by maintaining a hash of thread handles.
1606 * threads.h: Define thread and process creation flags
1608 2001-11-12 Dick Porter <dick@ximian.com>
1610 * critical-sections.c: Implement critical sections
1612 2001-11-12 Dick Porter <dick@ximian.com>
1614 * semaphores.c: Implement semaphores
1616 * wait.c (wait_for_item): Maintain a wait count rather than count
1619 * threads.c (thread_wait_multiple): Don't lock the wait item, that
1620 will block other wait threads
1622 2001-11-11 Dick Porter <dick@ximian.com>
1624 * Makefile.am: Rename some automake variables
1625 (from Nick Drochak <ndrochak@gol.com>)
1627 2001-11-10 Dick Porter <dick@ximian.com>
1629 * Makefile.am (libwapiincludedir): Fix include destination
1631 * .cvsignore: Ignore generated files
1633 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
1635 * pthread-compat.c: added some include files to make it compile on
1638 2001-11-08 Dick Porter <dick@ximian.com>
1642 This is a library emulating the win32 threading and IO API.