1 2007-04-26 Dick Porter <dick@ximian.com>
3 * shared.c (_wapi_shm_semaphores_init): Need to check
4 MONO_DISABLE_SHM in this entry point, as it's called before
5 _wapi_shm_attach(). Fixes bug 81436.
7 2007-04-24 Dick Porter <dick@ximian.com>
9 * sockets.c (_wapi_recvfrom, socket_close): Force recvfrom() to
10 error if the socket is closed while the receive is blocking.
13 2007-04-13 Dick Porter <dick@ximian.com>
16 * shared.c: Complete the reimplementation of disabling of shared
17 memory, by not allocating sysv semaphores when shm disabling has
18 been requested (either at compile time or run time.)
20 * processes.c (CreateProcess): Don't synchronize locking across
21 processes when forking, when shared memory has been disabled.
23 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
26 * wapi_glob.c: remove reference to sys/cdefs.h, use glib instead.
29 2007-04-05 Dick Porter <dick@ximian.com>
32 * io-portability.c (_wapi_io_scandir): Moved from io.c, and
33 changed to use a cut-down version of glob(3) that has been
34 extended to match with case-insensitivity if needed.
37 * wapi_glob.c: Cut down implementation of glob(3), based on
40 2007-03-22 Dick Porter <dick@ximian.com>
42 * sockets.c (_wapi_connect): Do additional checks when connect(2)
43 fails, because some systems don't let it be restarted. Patch
44 based on one submitted by Robert S Wojciechowski <robertw@ssgx.com>,
47 2007-03-09 Jonathan Chambers <joncham@gmail.com>
49 * io-layer.h: Remove UNICODE and _UNICODE defines as
50 these are done by configure.in now.
52 Code is contributed under MIT/X11 license.
54 Thu Mar 8 19:42:17 CET 2007 Paolo Molaro <lupus@ximian.com>
56 * shared.c: partial support for MONO_DISABLE_SHM env var.
58 2007-03-05 Wade Berrier <wberrier@novell.com>
60 * atomic.h: atomic fixes from Michael Matz for for s390
61 and s390x ( bnc #237611 and bxc #80892 )
63 2007-03-05 Miguel de Icaza <miguel@novell.com>
65 * io.c (CreateFile): Use FILE_ATTRIBUTE_TEMPORARY to mean 0600
66 permissions. For 80688
68 (MoveFile): Use errno_copy here, just to avoid a potential
69 errno-changing code in the future from g_free.
71 Also, ignore EXDEV errors as they are handled immediately after
72 (avoid printing out an error).
76 Mon Feb 12 15:50:24 CET 2007 Paolo Molaro <lupus@ximian.com>
78 * shared.c: exit if semaphores can't be created (bug #80616).
80 2007-02-01 Geoff Norton <gnorton@customerdna.com>
82 * collection.c: NetBSD doesn't define PTHREAD_STACK_MIN.
84 2007-01-26 Dick Porter <dick@ximian.com>
87 * sockets.c (_wapi_getsockopt): Windows seems to not reset
88 SO_ERROR values when they're read, contrary to the documentation.
89 Fixes the new issues raised in bug 79878 (example in C showing
90 winsock behaviour attached to that bug.)
92 2007-01-15 Mark Mason <mason@broadcom.com
94 * atomic.h: add locking primitives for MIPS.
96 2007-01-11 Dick Porter <dick@ximian.com>
98 * sockets.c (_wapi_connect): Don't do the SO_BROADCAST setting
99 here, do it in managed code instead.
100 (_wapi_getsockopt): SO_RCVTIMEO and SO_SNDTIMEO use struct
101 timeval, which has a microsecond field, not milliseconds.
102 (_wapi_setsockopt): ditto.
103 (_wapi_setsockopt): Halve the SO_SNDBUF and SO_RCVBUF values on
104 Linux, as the kernel doubles whatever we set.
105 (_wapi_socket): Save socket domain, type and protocol so it can be
107 (socket_disconnect): Implement socket disconnect (closing the
108 socket, but keeping the file descriptor.)
109 (wapi_disconnectex): A basic implementation of DisconnectEx().
110 (wapi_transmitfile): A very basic implementation of
112 (WSAIoctl): Implement the SIO_GET_EXTENSION_FUNCTION_POINTER
115 * socket-private.h (struct _WapiHandle_socket): Record socket
116 domain, type and protocol info so it can be duplicated later.
118 * sockets.h (WSAID_DISCONNECTEX,WSAID_TRANSMITFILE): Structures
119 and defines needed to look up the DisconnectEx() and
120 TransmitFile() functions by GUID.
122 * error.c (errno_to_WSA): Change ETIMEDOUT mapping to
123 WSAETIMEDOUT; add EDESTADDRREQ.
125 * io-layer.h: Need mswsock.h on windows now.
127 2007-01-04 Miguel de Icaza <miguel@novell.com>
129 * io-portability.c (find_file): Fix a coverity warning (scanning
132 2006-12-31 Miguel de Icaza <miguel@novell.com>
134 * io-portability.c (find_file): Do not abort if an empty filename
135 has been passed. This fixes the case where MONO_IOMAP=all would
136 assert if Directory.Exists ("") was called.
138 Mon Dec 18 14:54:37 CET 2006 Paolo Molaro <lupus@ximian.com>
140 * processes.c: moved a free on the error path.
142 Thu Dec 14 21:42:39 CET 2006 Paolo Molaro <lupus@ximian.com>
144 * processes.c: fixed a few memory leaks when executing
147 Mon Nov 27 13:12:17 GMT 2006 Paolo Molaro <lupus@ximian.com>
149 * atomic.h: fix arm compare and exchange (bug #78500).
151 2006-11-23 Dick Porter <dick@ximian.com>
153 * process-private.h (struct _WapiHandle_process): Add 'waited'
156 * processes.c (process_wait): Check the 'waited' parameter not the
157 signalled state when testing if a process has already been waited
158 for, as the child process itself may set signalled when exiting.
161 * wapi-private.h (_WAPI_HANDLE_VERSION): Bump shared data version
163 * shared.c: Now the shared data version has been incremented we
164 can set the counter semaphore initial value correctly
166 2006-11-22 Dick Porter <dick@ximian.com>
168 * processes.c (process_wait): Cope when the background process
169 reaper gets the process we were waiting for. Special case for
170 waiting for our own process to exit. Fixes bug 77736.
172 2006-11-17 Dick Porter <dick@ximian.com>
174 * processes.c: Fix const correctness and typos that caused memory
177 2006-11-17 Miguel de Icaza <miguel@novell.com>
179 * processes.c (ShellExecuteEx): Check error after CreateProcess,
180 thanks to Dick for pointing this out.
182 2006-11-16 Miguel de Icaza <miguel@novell.com>
184 * processes.c (ShellExecuteEx): If we fail to create a process in
185 ShellExecute, then try to use the xdg-open command, and if that
186 fails, try to use the gnome-open command,
188 Refactor the code so that we do not have to duplicate all this
189 code, but instead use a ucs2-aware version of the code to do
192 2006-11-13 Dick Porter <dick@ximian.com>
194 * io.c (_wapi_stat_to_file_attributes): If the file is a symlink
195 add the FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to
196 follow the specs for the windows symlink support, but will
197 probably have to be reworked when I have test data from a vista
198 machine. Fixes bug 79887.
200 2006-11-11 Miguel de Icaza <miguel@novell.com>
202 * handles.c (CloseHandle): Cope here with the new value
203 INVALID_HANDLE_VALUE set on handles.
205 * processes.c (CreateProcess): Initialize the value of hThread to
206 be INVALID_HANDLE_VALUE on failure, not to be NULL. Improvement
209 2006-11-09 Dick Porter <dick@ximian.com>
211 * sockets.c (_wapi_select): Do some sanity checking on the
212 fd_sets, to avoid file descriptors > FD_SETSIZE.
213 (_wapi_FD_CLR, _wapi_FD_ISSET, _wapi_FD_SET): Avoid file
214 descriptors > FD_SETSIZE.
216 2006-10-27 Dick Porter <dick@ximian.com>
218 * io.c (GetFileAttributes): Force symlinks to directories to be
219 returned as a regular file. Fixes bug 79733.
221 2006-10-18 Miguel de Icaza <miguel@novell.com>
223 * io-portability.c (find_in_dir): First string dup, then closedir.
225 2006-10-12 Dick Porter <dick@ximian.com>
227 * processes.c (_wapi_process_reap): Unref a process handle if we
228 reaped it, found by Zoltan. Fixes bug 79286.
229 (process_wait): Don't wait again if we've already waited for a
232 2006-10-11 Sergey Tikhonov <tsv@solvo.ru>
234 * atomic.h: Fix atomic decrement.
236 * mini/cpu-alpha.md: Use native long shift insts
238 * mono/mono/mini/tramp-alpha.c: Implemented
239 mono_arch_patch_delegate_trampoline method
241 * Started work on using global registers
243 * Use byte/word memory load/store insts if cpu supports it
248 2006-10-09 Zoltan Varga <vargaz@gmail.com>
250 * handles.c (timedwait_signal_poll_cond): Add an alertable parameter, and if it
251 is FALSE, avoid busy waiting.
253 * wait.c: Add an alertable parameter to the wait routines.
255 2006-10-06 Miguel de Icaza <miguel@novell.com>
257 * io-portability.c (find_file): Rename from
258 MONO_IO_PORTABILITY_HELP to MONO_IOMAP.
260 2006-10-03 Dick Porter <dick@ximian.com>
263 * io-portability.c: Optional portability helpers and wrapped
264 system calls to try to cope with windows filenames in
267 * io.c: Use the wrapped system calls
269 2006-09-01 Zoltan Varga <vargaz@gmail.com>
271 * critical-sections.h critical-sections.c: Make Enter/LeaveCriticalSection a macro
272 since they are perf critical.
274 * atomic.h: Applied patch from Jakub Boqusz <qboosh@pld-linux.org>.
275 Add atomic ops implementation for alpha.
277 2006-08-11 Dick Porter <dick@ximian.com>
279 * processes.c (_wapi_process_reap): Avoid a deadlock by setting
280 process termination details in an outer loop, not the
281 _wapi_search_handle() one.
283 2006-08-10 Dick Porter <dick@ximian.com>
285 * threads.c (_wapi_thread_queue_apc)
286 (_wapi_thread_dispatch_apc_queue): Use a process-local mutex here
287 instead of the cross process semaphore. We already check that
288 access to the APC queue is within the owning process so there's no
289 need to protect from other processes. Avoids a global deadlock
290 when a thread is aborted while it holds the handle semaphore
292 (_wapi_thread_apc_pending): Hide an annoying message which can
293 happen if a thread handle has been blown away at process shutdown
294 while it is in an alertable wait.
296 Both problems seen while shutting down monodevelop.
298 2006-07-25 Dick Porter <dick@ximian.com>
300 * shared.c (_wapi_shm_file): Remove '/' characters from the uname
301 results. Fixes bug 78917.
303 2006-07-20 Dick Porter <dick@ximian.com>
305 * threads.c (_wapi_thread_set_termination_details): Improve the
306 test for already-disposed thread handles, and hold the lock around
307 the mutex abandoning.
309 2006-07-17 Dick Porter <dick@ximian.com>
311 * processes.c (CreateProcess): Don't change directory unless a new
312 one has been specified. Fixes bug 78751.
314 2006-07-06 Dick Porter <dick@ximian.com>
316 * io.c (_wapi_stat_to_file_attributes): Do a better job at
317 figuring out the file attributes
318 (_wapi_set_last_path_error_from_errno): New helper function to
319 turn errno into w32 error codes that handles the differences
320 between file and directory errors
321 (file_setendoffile): Try turning off the extra write used to
322 extend files, because we probably don't need it on any modern
323 platform. If it is needed though, we also need to lseek the file
325 (CreateFile): Treat character-special devices as a console handle,
326 because they can't be seeked
327 (CopyFile): If fail_if_exists is set, then the destination needs
328 to be opened with O_EXCL
329 (CopyFile): If fail_if_exists is not set and the destination
330 already exists, then we should set the ERROR_ALREADY_EXISTS error
331 even though we return success
332 (stdhandle_create): STD_INPUT_HANDLES cannot be written to
333 (GetStdHandle): Rework without using mono_once, so console handles
334 can be properly closed and reopened.
335 (mono_io_scandir): Only override errno with EACCES when the
336 directory actually exists
337 (FindFirstFile): Set ERROR_FILE_NOT_FOUND when no files are
339 (FindClose): Cope with NULL handles
340 (CreateDirectory): When the target already exists, just return an
341 error. It's the caller's job to figure out what to do.
342 (SetCurrentDirectory): Cope with a NULL path
343 (RemoveDirectory, GetFileAttributes, GetFileAttributesEx,
344 SetFileAttributes, FindFirstFile, DeleteFile, MoveFile, CopyFile,
345 CreateFile): Set path error correctly
347 * handles.c (CloseHandle): Kludge to try and cope with passing a
350 * error.h: Add NO_ERROR as an alternative to ERROR_SUCCESS
352 * uglify.h: Added some more typedefs
354 2006-07-05 Dick Porter <dick@ximian.com>
356 * io.c (GetFileAttributes, GetFileAttributesEx): Cope with
357 dangling symlinks. Fixes bug 78664.
359 2006-06-23 Dick Porter <dick@ximian.com>
361 * handles.c (handle_cleanup):
362 * threads.c: Clean up threads properly when we're forcibly
363 removing the handle entries from the shared file in
364 handle_cleanup(). Fixes bug 78241, for real this time.
366 2006-06-15 Neale Ferguson <neale@sinenomine.net>
368 * atomic.h: More tinkering with InterlockedExchange/InterlockedCompareExchange
371 2006-06-14 Neale Ferguson <neale@sinenomine.net>
373 * atomic.h: Fix atomic exchange pointer operations for s390x - these
374 were broken as they used 32-bit instructions rather than their 64-bit
377 2006-06-14 Dick Porter <dick@ximian.com>
379 * processes.c: Don't run the atexit handlers when bailing out
382 2006-06-14 Dick Porter <dick@ximian.com>
384 * wait.c: Fix stupid typo shown up by gcc 4.1.1, = not ==
392 * collection.c: Fix a bunch of signed/unsigned warnings from gcc
395 2006-06-09 Neale Ferguson <neale@sinenomine.net>
397 * atomic.h: Fix atomic operations for s390x (not really broken
398 but changed to use full 64-bit opcodes).
400 2006-05-24 Dick Porter <dick@ximian.com>
402 * processes.c (process_set_current): Don't take an extra reference
403 if we have to create our own process handle. Fixes bug 78241
406 * threads.c (_wapi_thread_signal_self): Renamed from
407 _wapi_thread_abandon_mutexes, also sets the thread state to
408 signalled and drops a reference. Called by the runtime when the
409 main thread cleans itself up.
411 * handles.c (handle_cleanup): As a last resort, unref every shared
412 handle as the process is now exiting.
414 2006-05-16 Dick Porter <dick@ximian.com>
416 * processes.c (process_set_termination_details): Unref the handle
417 when we've stored the exit details. Fixes the rest of 78241.
419 2006-05-12 Dick Porter <dick@ximian.com>
421 * threads.c: Implement pseudo handles, making GetCurrentThread()
422 match MS behaviour. Notice when attached threads exit, and unref
423 the handle. Fix usage of GetCurrentThread() in other places.
425 * handles.c (DuplicateHandle): Implement a basic form of
428 * wait.c: Fix usage of GetCurrentThread() throughout, and cope
431 2006-04-26 Miguel de Icaza <miguel@novell.com>
433 * io.c (file_close): Oops, do not use DeleteFile which expects
434 unicode, instead use unlink directly
436 Add support for the new FileOptions bits on .NET 2.0.
438 It might be good if Dick reviews these changes.
440 * io.c (file_close): If DeleteOnClose is set, then delete the file
442 (CreateFile): Do not support encryption per user.
444 If posix_fadvise exists, pass hints on sequential scan and random
445 access. Did not figure out what WRITE_THROUGH maps to.
447 2006-04-26 Dick Porter <dick@ximian.com>
449 * sockets.c (WSAIoctl): Check the output buffer is valid before
452 * handles.c (_wapi_search_handle): Set shared pointer if we find a
453 shared handle that has been already opened.
455 2006-04-21 Dick Porter <dick@ximian.com>
457 * threads.c (GetCurrentThread): Reference the handle if we return
458 an already-known thread.
460 2006-04-07 Dick Porter <dick@ximian.com>
462 * processes.c: Fix build for older glib.
464 2006-04-06 Dick Porter <dick@ximian.com>
466 * processes.c (CreateProcess): Add a reference to the child
467 process' handle, so it won't be destroyed if this process closes
468 its copy of the handle. Fixes bug 77393.
470 * processes.c (process_set_current): Fall through to creating a
471 new one if the handle lookup fails.
473 * processes.c (_wapi_process_signal_self):
474 * handles.c (handle_cleanup): The process is exiting, so set the
475 handle state for this process to signalled. This should let other
476 non-related processes wait for this handle.
478 * handles.c (_wapi_search_handle): Don't search shared handles in
481 * collection.c (collection_thread): No need to do a collection
482 scan straight away, do the waiting first.
484 2006-04-06 Dick Porter <dick@ximian.com>
486 * shared.c: Fix parameters in semctl () call.
488 2006-03-28 Zoltan Varga <vargaz@gmail.com>
490 * atomic.h atomic.c: Applied patch from David S. Miller
491 <davem@davemloft.net>: Reimplement Interlocked* primitives on sparc
492 using CAS/CASx when __GNUC__, else we will fall back to the generic
495 2006-03-27 Dick Porter <dick@ximian.com>
497 * shared.c (_wapi_shm_file_open): Break out of a loop if the
498 shared file is smaller than expected. (We loop a few times in
499 case another process is in the middle of creating the file.)
501 2006-03-22 Dick Porter <dick@ximian.com>
506 * shared.c: Delete the semaphores and shared files when the last
507 process has finished with them
509 2006-03-15 Dick Porter <dick@ximian.com>
517 * threads.c: Explicitly initialise the handle ops struct
519 2006-03-14 Dick Porter <dick@ximian.com>
524 * handles.c: Add a 'prewait' stage to the handle waiting, to give
525 waiting threads a chance to check for bogus states before
528 * mutexes.c (namedmutex_prewait): Use the prewait stage to check
529 for named mutexes that have been abandoned in a locked state (eg
530 if a process exited abnormally while owning the mutex) and
531 override it if needed.
533 2006-03-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
535 * wait.c: speed up WaitFor* when the timeout is 0.
537 2006-03-03 Dick Porter <dick@ximian.com>
539 * processes.c (ShellExecuteEx): Cope when some of the parameters
542 2006-02-27 Dick Porter <dick@ximian.com>
546 * threads.c: Comparing pthread_t with == is not portable, so use
549 Thu Feb 23 18:47:20 GMT 2006 Paolo Molaro <lupus@ximian.com>
551 * *.h, *.h: patch from Dick to make Linuxthreads systems work again.
553 2006-02-22 Dick Porter <dick@ximian.com>
556 * threads.c: There's no need to use the timed-thread support code
557 any more, as we aren't using the timed join. This greatly
558 simplifies thread setup, and fixes a memory leak (bug 77521).
560 Don't bother to store thread IDs in a hash table, use TLS instead.
561 The one case that needs to look up the handle of a different
562 thread (OpenThread()) can do the extra work itself. Fixes bug
565 * handles.c (_wapi_search_handle): Add a reference when returning
566 a private handle (shared handles are already reffed.)
568 2006-02-17 Dick Porter <dick@ximian.com>
571 * handles.c: Check handle values passed to array lookups. Fixes
574 2006-02-09 Dick Porter <dick@ximian.com>
576 * threads.c: Cope with the problems caused by attaching already
577 existing threads - they don't get the infrastructure to clean up
578 after themselves, especially the ID to handle hash. This fixes
581 2006-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
583 * shared.c: use MONO_SHARED_HOSTNAME as a substitute for gethostname()
584 when creating the shared files in the .wapi directory. Fixes bug #77371.
586 2006-02-02 Martin Baulig <martin@ximian.com>
588 * threads.c: Removed the `WITH_INCLUDED_LIBGC' section; it has
589 never been used so far.
591 * timed-thread.h (TimedThread): Removed the `stack_ptr' field; it
592 has only been used by the removed code.
594 2006-01-03 Neale Ferguson <neale@sinenomine.net>
596 * atomic.h: Correct s390x definitions and eliminate compiler warnings.
598 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
600 * io.c: Patch _wapi_stat_to_file_attributes against bug #76966, where
601 sockets could be considered as directory.
603 2005-12-23 Dick Porter <dick@ximian.com>
607 * semaphores.c: Implement OpenSemaphore
610 * mutexes.h: Implement OpenMutex
616 * event-private.h: Implement named events. Implement OpenEvent.
618 2005-12-15 Dick Porter <dick@ximian.com>
620 * processes.c (CreateProcess): The pipe-based cross-process
621 exclusion technique was trying to write NULL buffers when appname
622 was NULL (eg when coming from ShellExecuteEx,) which usually
623 succeeded even though EFAULT was returned - but sometimes it
624 failed. This meant that the child process could block forever on
625 the pipe read. Replace it with the simpler shared handle
626 semaphore protection used everywhere else. This showed up with
627 the test case in bug 76684.
629 Tue Dec 13 11:41:49 GMT 2005 Paolo Molaro <lupus@ximian.com>
631 * shared.c: fallback to private mmap when shared mmap doesn't work
634 2005-12-06 Dick Porter <dick@ximian.com>
638 * semaphore-private.h:
639 * semaphores.c: Implement named semaphores
641 2005-11-24 Dick Porter <dick@ximian.com>
643 * processes.c (GetProcessId): Implement GetProcessId()
645 2005-11-17 Dick Porter <dick@ximian.com>
648 * processes.c: Implement ShellExecuteEx as a wrapper around
651 2005-11-11 Dick Porter <dick@ximian.com>
653 * threads.c: Give mutex abandoning its own exported function, so
654 it can be called when the runtime is cleaning up.
656 * handles.c (_wapi_search_handle_namespace): Do a handle
657 collection befre starting to check namespace strings, so that any
658 stale cruft gets removed.
660 2005-11-11 Dick Porter <dick@ximian.com>
662 * threads.c: Move thread handles back into the shared space.
664 * handles.c (_wapi_handle_unref): Add support for shared handles
665 with close() handlers
667 2005-11-04 Dick Porter <dick@ximian.com>
669 * sockets.c (ioctlsocket): Use select instead of if to avoid a
670 type promotion problem on 64bit freebsd. Based on patch by Lou
671 Kamenov <kamenovl@gmail.com>, fixes bug 76447.
673 2005-11-04 Dick Porter <dick@ximian.com>
675 * io.c (file_write): Only do the file locking if
676 MONO_STRICT_IO_EMULATION is set.
678 2005-10-21 Dick Porter <dick@ximian.com>
681 * handles.c (_wapi_lookup_handle): Cope when the shared part of a
682 handle has been deleted.
683 (_wapi_handle_unref): And when the deleted shared part is pointed
684 to as a handle is deleted
686 2005-10-20 Dick Porter <dick@ximian.com>
688 * processes.c (process_set_current): If the expected process
689 handle slot doesn't contain the correct pid, create a new handle.
691 * handles.c (_wapi_search_handle): When the search doesn't find
692 anything, return failure instead of the last handle we looked at.
693 (_wapi_handle_ref, _wapi_handle_unref): Don't try to ref or unref
694 unused handles (makes tracking refcounting bugs easier.)
696 2005-10-19 Dick Porter <dick@ximian.com>
703 * collection.c (_wapi_handle_collect): Remove the shared handle
704 indirection layer, and use locking instead. Delete other
705 complexity that is no longer needed. Refcount shared handles and
706 delete them when needed, but keep the timestamps so that orphaned
707 handles will be cleaned up eventually.
709 * shared.c (_wapi_shm_file): Add processor, OS and struct size
710 info to the shared file names, to cope with dual-boot and 32/64bit
711 size issues. Fixes bug 75839.
713 * wait.c (WaitForMultipleObjectsEx): No need to distinguish
714 between shared handles and private, as the wait functions cope
715 with both together now.
717 2005-10-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
719 * io.c: removed NO_SIGPIPE macro.
720 * sockets.c: no need for MSG_NOSIGNAL or ignoring SIGPIPE.
722 2005-10-11 Dick Porter <dick@ximian.com>
724 * sockets.c (_wapi_getsockopt): Translate SO_ERROR results into
727 * error.c (errno_to_WSA): Don't return a bogus error if someone
728 asks to translate errno 0.
730 2005-10-11 Dick Porter <dick@ximian.com>
732 * handles.c: Fix several race conditions
734 2005-10-11 Miguel de Icaza <miguel@novell.com>
736 * io.c: no need to block SIGPIPE anymore, as it is ignored.
738 2005-10-05 Dick Porter <dick@ximian.com>
740 * threads.c (_wapi_thread_own_mutex, _wapi_thread_disown_mutex):
741 Keep a reference to mutexes owned by threads, so they won't be
742 destroyed prematurely. Fixes dotmsnclient crash.
744 2005-09-26 Sebastien Pouliot <sebastien@ximian.com>
746 * io.c: Apply patch from #76192 (Can't write files past 2gb on AMD64
747 (x86_64)) for Brion on IRC (Dick approved it).
749 2005-09-23 Dick Porter <dick@ximian.com>
751 * processes.c: Don't wait for processes that have already been
752 signalled; also fix typo.
754 * handles.c: Improve locking inside new handle and handle
757 2005-09-20 Dick Porter <dick@ximian.com>
760 * processes.c: Periodically waitpid for known process IDs. Fixes
763 2005-09-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
766 (CreateFile): if the file is a named pipe, treat the handle as a pipe,
767 not as a file. Fixes bug #76075.
769 2005-08-27 Zoltan Varga <vargaz@gmail.com>
771 * atomic.h: Add support for intel icc.
773 2005-08-25 Zoltan Varga <vargaz@gmail.com>
775 * io-layer.h: Include winbase.h not WinBase.h.
777 2005-08-19 Dick Porter <dick@ximian.com>
779 * threads.c, threads.h, thread-private.h: Use a gsize to store the
780 thread ID, so it can hold a 64 bit value if needed.
782 2005-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
784 * error.c: map ENOENT to WSAECONNREFUSED. It might happen when
785 connecting to unix sockets. Closes bug #75632.
787 2005-07-05 Dick Porter <dick@ximian.com>
789 * io.c: Make sure SIGPIPE is ignored when calling write(2).
790 Prevents the runtime exiting when writing to a closed pipe,
793 2005-06-30 Dick Porter <dick@ximian.com>
795 * shared.c (_wapi_shm_semaphores_init): Add some helpful error
796 messages when semget () fails due to lack of resources.
798 2005-06-21 Dick Porter <dick@ximian.com>
803 * threads.c: Keep a list of owned mutexes in each thread handle,
804 so that it is easier to abandon them when the thread exits.
805 Removes a bottleneck when multiple threads are finishing in
808 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
810 * io.c: (GetLogicalDrives) when a bogus line is read, don't leak memory.
811 When the buffer has not enough space, close the file before returning.
813 2005-06-09 Duncan Mak <duncan@novell.com>
815 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
816 all public headers. Fixes #74919.
818 2005-05-30 Zoltan Varga <vargaz@freemail.hu>
820 * atomic.h: Add IA64 atomic ops.
822 2005-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
824 * processes.c: make ExitCode be valid even if the user didn't call
825 WaitForExit() and is just polling on HasExited.
827 2005-05-17 Dick Porter <dick@ximian.com>
829 * io.c (file_getfilesize): Clear the error value, so that files
830 with sizes with the low bits 0xFFFFFFFF can be distinguished from
833 2005-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
835 * shared.c: forgot to ignore a warning.
837 2005-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
839 * shared.c: don't display warnings after reboots.
841 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
843 * sockets.c: on windows, getsockopt/setsockopt for send/receive timeout
844 use an integer in milliseconds. We were using a struct timeval.
846 2005-05-06 Dick Porter <dick@ximian.com>
855 * collection.h: Use SysV semaphores for managing access to the
856 shared memory - in return for the ludicrous api we get
857 synchronisation primitives that can be cleaned up by the kernel
858 even when a process quits unexpectedly. This removes the
861 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
863 * handles.c: Always use polling in the waits, since
864 mono_cond_timedwait can't be interruped by the thread abort signal.
866 2005-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
868 * events.c: calling Set on AutoResetEvent several times has the same
869 effect as calling it only once if no thread is waiting for it.
871 2005-04-29 Dick Porter <dick@ximian.com>
873 * processes.c (EnumProcesses): Use a GArray instead of a GPtrArray
874 now it's storing pids not handles, also fixes memory leak caused
875 by unclear glib documentation.
877 * sockets.c (WSACleanup): Remove unused variable
879 2005-04-29 Dick Porter <dick@ximian.com>
881 * handles.c (_wapi_handle_check_share_by_pid): For systems that
882 don't have file descriptor info in /proc check that the original
883 opener of a file is still there, if a share violation would
886 2005-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
889 * handles-private.h: added _wapi_handle_forecch that loops through all
890 the handles and call a callback function when a handle of the given
893 * sockets.c: no need to keep open sockets in an array, as we have them
894 in the handles structure.
898 2005-04-28 Dick Porter <dick@ximian.com>
900 * processes.c: Cope with handles that are only around for as long
901 as the search is running. If we're searching for process handles,
902 check to see if the process is still running and signal it if not.
904 * handles.c (_wapi_search_handle): Search in the shared space as
905 well. Fixed bug 74752.
908 * handles.c (_wapi_handle_new_from_offset):
909 _wapi_handle_new_for_existing_ns () was doing exactly the same as
912 2005-04-26 Dick Porter <dick@ximian.com>
914 * handles.c: Fix stupid thinko where if a new shared handle is
915 created but a collection was needed to free some space, it
916 returned an error anyway. Should fix the messages shown in bug
919 2005-04-25 Dick Porter <dick@ximian.com>
921 * handles.c (_wapi_handle_check_share): Only consider mono
922 processes when looking to see if a file is still being held open,
923 while checking share permissions.
925 2005-04-25 Dick Porter <dick@ximian.com>
929 * wapi-private.h (struct _WapiHandleOps):
930 * handles.c (_wapi_handle_unref): When destroying handles, save
931 the handle data and call the close function only after the array
932 slot has been cleared. This prevents race conditions with file
933 descriptors, fixing bug 74713.
935 * mutexes.c: Delete the handle close functions, they didn't do
938 * error.c (_wapi_get_win32_file_error): Add a mapping for EINTR so
939 the "Unknown error" g_warning doesn't get displayed.
941 2005-04-25 Dick Porter <dick@ximian.com>
944 * threads.c: Make thread handles process-private for now to take
945 some of the space pressure off the shared memory, while I work on
948 2005-04-21 Dick Porter <dick@ximian.com>
950 * handles.c (_wapi_handle_check_share): Make sure there is a "fd"
951 dir in /proc before blowing away handle info. Fixes bug 74649.
953 2005-04-21 Dick Porter <dick@ximian.com>
955 * wait.c (WaitForMultipleObjectsEx): Implement special waits
957 * handles.c (_wapi_handle_wait_signal_poll_share): Don't return a
958 timeout, just wait briefly for the private signals and let the
959 waiting thread test again. This prevents us missing shared
962 2005-04-21 Dick Porter <dick@ximian.com>
964 * collection.h (_WAPI_HANDLE_COLLECTION_EXPIRED_INTERVAL): Reduce
965 the time before a slot is considered too old and deleted. This is
966 a workaround while I come up with a proper fix.
968 2005-04-21 Dick Porter <dick@ximian.com>
973 * handles.c (_wapi_handle_new): Turn assertions into errors.
975 * collection.c (_wapi_handle_collect): Use symbols not magic
976 numbers for timeout values
978 2005-04-19 Dick Porter <dick@ximian.com>
982 * handles.c (_wapi_handle_count_signalled_handles)
983 * handles-private.h (_wapi_handle_shared_lock_handle): Use new
984 shared handle locks in critical sections.
986 * handles.c (_wapi_handle_new_for_existing_ns): Reuse old handles
987 if there is already one there.
989 * handles.c (_wapi_handle_ref): It was possible for a process to
990 exit before getting around to updating shared handle timestamps,
993 Tue Apr 19 16:25:47 CEST 2005 Paolo Molaro <lupus@ximian.com>
995 * threads.c: fix lookup of the thread id in the has table:
996 always use the id value, not the pointer to the id.
998 2005-04-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1000 * handles.c: fix handle returned in _wapi_handle_search_handle. Dick
1003 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1005 * io-layer/sockets.c: FIONBIO with a TRUE argument means we want
1006 non-blocking IO, not the other way around.
1008 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1012 * handles-private.h: GetFileType wasn't checking if we have memory
1013 allocated for the handle before dereferencing it. Fixes a FileStream
1016 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1020 * handles-private.h: we were calling g_renew to expand the handle array,
1021 but that might move the memory and we might have pthread conditions or
1022 mutexes in the original memory area that are being used. Now instead of
1023 expanding an existing array, we just create new ones and keep a list of
1024 them. Access to _wapi_private_handles had to be modified accordingly.
1026 2005-04-15 Dick Porter <dick@ximian.com>
1028 * collection.c: FreeBSD needs more than PTHREAD_STACK_MIN
1030 2005-04-14 Raja R Harinath <rharinath@novell.com>
1032 * wapi-private.h: Remove reference to 'daemon-private.h'.
1034 Wed Apr 13 13:12:33 EDT 2005 Paolo Molaro <lupus@ximian.com>
1036 * atomic.h: applied patch from mass@akuma.org (David Waite)
1037 to fix InterlockedExchangeAdd.
1038 Fixed a few other functions, including InterlockedCompareExchange()
1039 which was miscompiled by gcc with optimizations enabled.
1041 2005-04-13 Dick Porter <dick@ximian.com>
1043 * io.c (share_check):
1044 * handles.c (_wapi_handle_check_share): Refine the file check so
1045 that sharing violations within the same process don't cause
1048 2005-04-13 Dick Porter <dick@ximian.com>
1050 * io.c (FindFirstFile): Fix bugs introduced with the merge (bug
1053 2005-04-12 Dick Porter <dick@ximian.com>
1055 The daemon-less io-layer. Extensive lowlevel changes in
1056 handles.c, requiring some corresponding changes in other files
1057 calling these functions. Private_foo structures have been
1060 File descriptor handling differences account for most of the
1061 changes in io.c and sockets.c.
1065 * mutexes.c: Named mutexes are now a distinct type.
1066 * atomic.h: Fix a PPC uninitialised variable warning.
1067 * wait.c: Check conditions before waiting on a condition variable.
1068 * processes.c: Handle process fork and wait without a daemon
1069 (though this has the limitation of only being able to wait for
1072 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1079 * sockets.h: removed dead code that deals with async IO.
1081 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
1083 * atomic.c (InterlockedIncrement): Fix fallback implementation of
1084 InterlockedIncrement and InterlockedDecrement. Fixes #74228.
1086 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
1088 * io-layer.h: Add required header files for compiling with VS.NET.
1090 2005-03-17 Miguel de Icaza <miguel@novell.com>
1092 * io.c: don't fail on NFS when there are no more locks available.
1094 2005-03-09 Dick Porter <dick@ximian.com>
1096 * error.c (_wapi_get_win32_file_error): ENFILE and EMFILE should
1097 map to ERROR_TOO_MANY_OPEN_FILES, not ERROR_NO_MORE_FILES. Fixes
1100 2005-03-09 Dick Porter <dick@ximian.com>
1102 * daemon.c (process_process_fork): Initialise the handle data
1103 before using it in the error case. This is probably the error
1104 we're working around in the previous change. Spotted by Taru Jain
1105 <tjain@novell.com> and Hemanth Yamijala <YHemanth@novell.com>.
1107 2005-03-07 Dick Porter <dick@ximian.com>
1109 * daemon.c: It looks like g_shell_parse_argv() can return
1110 argv[0]=NULL somehow, yet still not give an error. Make sure we
1111 don't pass NULL to strrchr(), working around a segfault that
1112 showed up on ZLM testing.
1114 2005-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1116 * sockets.c: translate EINPROGRESS to EWOULDBLOCK in connect. This is
1117 the expected error code showed by the test case in bug #73053.
1119 2005-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1121 * io.c: another leftover.
1123 Fri Feb 18 17:37:29 CET 2005 Paolo Molaro <lupus@ximian.com>
1125 * io.c: fixed logic in checking errno in rev 40815.
1127 Fri Feb 18 16:00:29 CET 2005 Paolo Molaro <lupus@ximian.com>
1129 * threads.c: we don't depend on the GC checking tls
1131 * processes.c: remove unused ref to GC headers.
1133 Thu Feb 17 19:57:11 CET 2005 Paolo Molaro <lupus@ximian.com>
1135 * io.c: remove _wapi_thread_cur_apc_pending () checks
1136 when the siscall should return immediatly and handle
1137 the case when a syscall is interrupted without
1138 erroring out, but returning a 0 read/write if possible.
1139 Still the cases of read from file need to be handled.
1141 Tue Feb 8 18:28:11 CET 2005 Paolo Molaro <lupus@ximian.com>
1143 * threads.c: make people test with 1 MB stack per thread.
1145 2005-01-17 Dick Porter <dick@ximian.com>
1147 * timefuncs.h: Make WapiFileTime endian-aware, as it's often
1148 cast to and from 64bit ints. Fixes bug 71213.
1150 2005-01-11 Dick Porter <dick@ximian.com>
1152 * error.c (errno_to_WSA): Add EADDRNOTAVAIL error code
1155 Mon Jan 10 16:15:19 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
1157 * atomic.h: Fix functions on s390.
1159 Mon Jan 10 20:30:19 CET 2005 Paolo Molaro <lupus@ximian.com>
1161 * atomic.h: fix some functions on ppc (tests/interlocked.cs).
1163 2005-01-10 Dick Porter <dick@ximian.com>
1165 * misc.c (_wapi_calc_timeout): Guard against overflow when
1166 calculating timeouts. This makes waiting with a large
1167 (Int32.MaxValue) timeout not return immediately.
1169 2004-12-23 Ben Maurer <bmaurer@ximian.com>
1171 * io.c (io_ops): make this `const' so it is shareable (well, only
1172 really shareable if it is statically linked...)
1174 Mon Dec 20 11:58:33 CET 2004 Paolo Molaro <lupus@ximian.com>
1176 * threads.c, threads.h: add accessor to get the pthread_key_t for
1179 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1181 * io.c: check for the existence of 'dest' and set ERROR_ALREADY_EXISTS
1182 if it exists and is not the same as 'src'.
1184 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
1186 * atomic.h : Fix InterlockedCompareExchange for s390/s390x.
1188 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1190 * processes.c: unquote the cmd path, allow for ' or " when quoting and
1191 pass the quoted program name to the daemon, otherwise the call to
1192 g_shell_unquote in the daemon will break things up.
1194 2004-10-14 Dick Porter <dick@ximian.com>
1196 * sockets.c (_wapi_accept): Revert the previous change. We now
1197 set the accepted socket to have the same blocking status as the
1198 listening socket in managed code. This follows MS behaviour.
1200 2004-10-14 Dick Porter <dick@ximian.com>
1202 * sockets.c (_wapi_accept): On Darwin, make sure a newly
1203 accept()ed socket is blocking. Fixes bug 67355, patch by
1204 grompf@sublimeintervention.com.
1206 2004-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1208 * system.c: check the number of online processors instead of the
1209 existing ones. Sanitize return value if it's an error.
1211 2004-10-03 Ben Maurer <bmaurer@ximian.com>
1213 * system.c: Add support for getting the # of cpus.
1215 2004-09-28 Dick Porter <dick@ximian.com>
1217 * io.c (pipe_close_private): Fix one small typo in the last change
1218 that totally hosed process creation with redirected pipes.
1220 2004-09-24 Dick Porter <dick@ximian.com>
1227 * handles-private.h: Cope when a file descriptor is reused while
1228 the handle that thought it owned it is still referenced, instead
1229 of asserting. Probably fixes bug 66479, though we've been unable
1232 2004-09-09 Dick Porter <dick@ximian.com>
1235 * io.c: Set error codes everywhere.
1237 2004-09-06 Dick Porter <dick@ximian.com>
1239 * handles.c (_wapi_handle_unref): Reset the private record's type
1240 (CloseHandle): Check for a fd mapping failure, and return FALSE.
1241 (_wapi_handle_process_fork): Fix long-standing bug in checking
1242 handle return values. Also do the required bookkeeping with the
1243 new process's handles.
1245 * daemon.c: When creating a new process's handles, check whether
1246 the shared space needs to be increased
1248 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
1250 * shared.c (_wapi_shm_file): Fix leaking of filename.
1252 2004-08-19 Dick Porter <dick@ximian.com>
1254 * handles.c (_wapi_handle_count_signalled_handles): Fix thinko
1255 introduced with the fd offset stuff: unlock handles properly when
1256 backing off. Fixes the monologue hang at exit.
1258 2004-08-18 Dick Porter <dick@ximian.com>
1261 * io.c: Check that new fds fit in the table, return error if not
1263 * daemon.c (_wapi_daemon_main):
1264 * handles.c (shared_init): Have all processes agree on a size for
1267 2004-08-17 Dick Porter <dick@ximian.com>
1269 * daemon.c (process_new):
1270 * handles.c (_wapi_handle_new_internal): Cope when the space
1271 reserved for file descriptors is larger than the shared segment
1272 size. Fixes the crash reported when running mono under gdb on
1275 2004-08-16 Dick Porter <dick@ximian.com>
1279 * handles-private.h (_wapi_handle_fd_offset_to_handle): Improve
1280 error checking with passed-in file descriptors.
1282 2004-08-11 Dick Porter <dick@ximian.com>
1285 * io.c: Returned handle values are the file descriptor the handle
1289 * handles-private.h:
1290 * daemon.c: Reserve the range of handles that can have the same
1291 values as file descriptors. These won't be used, but the values
1292 will be used as file, console, pipe or socket handles. The fd to
1293 handle mapping is done internally and is invisible to users.
1296 * wapi-private.h (_WAPI_HANDLE_VERSION): Increment, because we now
1297 reserve a chunk of handle space.
1299 2004-08-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
1301 * atomic.h: add support for 64-bit S/390
1303 2004-07-22 Dick Porter <dick@ximian.com>
1306 * threads.c: Move the destruction of the internal thread data to
1307 after the thread has been joined. Fixes bug 61418.
1309 2004-07-14 Dick Porter <dick@ximian.com>
1311 * wait.c (test_and_own): When not waiting for all handles to
1312 become signalled, only own and return the lowest. All the
1313 documentation suggests that the old way was correct, but
1314 experimentation shows it actually works like this. Patch by
1315 Sébastien Robitaille
1316 (sebastien.robitaille@croesus.com), fixes bug 61511.
1318 2004-07-09 Ben Maurer <bmaurer@ximian.com>
1320 * threads.c: register roots for gc
1322 2004-07-08 Dick Porter <dick@ximian.com>
1324 * io.c (file_seek): If there is a high 32bit offset part, make
1325 sure the low part isn't sign-extended. Set error codes when
1326 returning failure. Fixes bug 61131.
1328 2004-07-06 Dick Porter <dick@ximian.com>
1330 * io.c (file_setfiletime): Check for underflow when converting to
1331 time_t values. Set error codes when returning failure. Fixes bug
1334 2004-07-05 Dick Porter <dick@ximian.com>
1336 * mutexes.c (mutex_ops_init): Make the named mutex mutex sharable.
1338 * daemon.c (unref_handle): Only destroy a handle if all processes
1339 have released it, not just the current one. Fixes bug 60887.
1341 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
1343 * mono-mutex.h atomic.h: Add G_GNUC_UNUSED to static inline functions
1344 to prevent warnings.
1346 2004-06-24 Dick Porter <dick@ximian.com>
1348 * mutexes.c: Indicate when a named mutex was reused
1350 2004-06-24 Dick Porter <dick@ximian.com>
1352 * threads.c (SuspendThread):
1353 * timed-thread.c (_wapi_timed_thread_suspend): Wrap sem_wait in a
1354 while loop. See bug 58161.
1356 Wed Jun 23 23:29:04 CEST 2004 Paolo Molaro <lupus@ximian.com>
1358 * io.c: don't use sharemode for on-disk file permissions: it's used
1359 for shared access to the open file.
1361 2004-06-22 Dick Porter <dick@ximian.com>
1363 * events.c (CreateEvent): When creating an auto-reset event that
1364 is initially owned, make sure the set count starts at 1.
1366 2004-06-18 Dick Porter <dick@ximian.com>
1369 * events.c: Auto-reset events need to release one thread for each
1370 time SetEvent() is called. Fixes bug 41292.
1374 * mutexes.c: Scan for mutexes that are still locked by a thread
1375 when it exits. Fixes the MS demo app linked by bug 41292.
1377 * wait.c (test_and_own): Make sure a handle is signalled before it
1380 2004-06-16 Dick Porter <dick@ximian.com>
1382 * timed-thread.c: Call the thread cleanup exit routine before taking
1383 the join mutex, because this could deadlock if another thread tries
1384 to join in the meantime. This fixes the hang-at-exit problem seen
1387 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
1389 * threads.c: Implemented SleepEx.
1390 * threads.h: Fixed SleepEx signature.
1392 2004-06-03 Miguel de Icaza <miguel@ximian.com>
1394 * threads.c: When running under valgrind, do not allocate too much
1395 stack, as Valgrind default is 1 meg.
1397 2004-05-27 Dick Porter <dick@ximian.com>
1400 * io.c: Implemented LockFile() and UnlockFile()
1402 2004-05-21 Dick Porter <dick@ximian.com>
1404 * io.c (CreateFile): Check for existing share modes when opening
1408 * handles-private.h:
1409 * daemon-messages.h:
1410 * daemon.c: Maintain a hash of file share modes, keying on device
1411 and inode (to cope with symlinks.)
1413 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
1415 * daemon-messages.c: Retry if the communication with the daemon is
1416 interrupted by a signal.
1417 * io.c, sockets.c: Check for EINTR in every syscall that can be interrumped.
1418 Only return an error in this case if there is something in the apc queue
1419 (which means that it is an interruption requested by the "user").
1420 * processes.c: Use WaitForSingleObjectEx. No need to pass "alertable" as
1421 true since the wait is small.
1422 * shared.c: Retry write calls when interrumped by a signal.
1423 * timed-thread.h, timed-thread.c: added _wapi_thread_apc_pending, which
1424 returns TRUE if there are pending asynchronous calls (APC) for the
1425 provided thread. Also added _wapi_thread_dispatch_apc_queue which calls
1426 the enqueued APCs. Defined a new struct ApcInfo that holds information
1427 about an enqueued APC.
1428 * thread-private.h, threads.c: Implemented QueueUserAPC (which does the same
1429 as in win32),_wapi_thread_apc_pending and _wapi_thread_dispatch_apc_queue.
1430 These last two methods call the corresponding apc methods in
1431 thread-private using the provided thread handle.
1432 * threads.h: Added QueueUserAPC.
1433 * uglify.h: Added WapiApcProc (needed by QueueUserAPC).
1434 * wait.c, wait.h: Changed WaitForSingleObject to WaitForSingleObjectEx, and
1435 WaitForMultipleObjects to WaitForMultipleObjectsEx. Implemented support
1436 for APCs in those two methods and also in SleepEx.
1438 2004-05-17 Dick Porter <dick@ximian.com>
1440 * io.c (CopyFile): Speed up. Fixes bug 57859.
1442 2004-05-13 Dick Porter <dick@ximian.com>
1443 * mono-mutex.c (mono_mutex_unlock): Return EPERM when the current
1444 thread doesn't own the mutex, rather than assert()ing.
1446 2004-05-11 Dick Porter <dick@ximian.com>
1448 * shared.c (_wapi_shm_attach): Cope when a previous daemon startup
1449 attempt failed, leaving shared files that look like a daemon is
1452 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1455 (SetFileAttributes): don't the the exec bit if the corresponding read
1458 2004-05-10 Zoltan Varga <vargaz@freemail.hu>
1460 * io.c (FindFirstFile): Fix invalid free.
1462 2004-05-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1464 * io.c: translate from GFileError to errno codes and don't free
1465 variables right after calling mono_io_scandir, as we may overwrite
1468 2004-05-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1470 * io.c: g_dir_open return ENOENT for directories on which we don't have
1471 read/execute permission, while returning EPERM for anything below those.
1472 So, change ENOENT by EPERM if the directory exists.
1474 2004-05-07 Dick Porter <dick@ximian.com>
1476 * io.c (SetFileAttributes): Don't have failed chmod()s cause a
1477 "file not found" error. Fixes bug 54032.
1479 2004-05-07 Dick Porter <dick@ximian.com>
1481 * io.c (FindFirstFile): Comment out a windows-compatibility check
1482 that breaks when directories have metachars in their names.
1483 Workaround for bug 58116.
1485 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1487 * io.c: fixed for FindFirstFile for empty directories. Closes
1490 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1492 * processes.c: set the start time for the current process. Fixes bug
1495 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1497 * io-private.h: 'namelist' is now a gchar ** in _WapiHandlePrivate_find.
1498 * io.c: implemented scandir using glib functions.
1500 2004-05-04 Dick Porter <dick@ximian.com>
1502 * daemon.c (read_message): Return FALSE on error so the GSource
1503 callback itself can return FALSE. Cures the infinite loop poll()
1505 * shared.c: Fix some daemon startup race conditions.
1507 2004-04-29 Miguel de Icaza <miguel@ximian.com>
1509 * io.c (CopyFile): Use 32k buffers to copy the file instead of 2k,
1510 use the stack, do not use dynamic memory.
1512 2004-04-29 Zoltan Varga <vargaz@freemail.hu>
1514 * io.c: Add scandir implementation for platforms which do not have
1517 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1519 * io.[ch]: implemented GetLogicalDriveStrings.
1521 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1524 * sockets.c: use the field name from configure when accessing sigval
1525 pointer field. Makes this work on the Mac.
1527 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
1529 * atomic.c: (InterlockedExchange) fix typo for
1532 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1535 * sockets.c: added check for sys/aio.h.
1537 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1539 * error.[ch]: added _wapi_get_win32_file_error...
1540 * io.c: ... which was _wapi_get_win32_error here.
1541 * sockets.c: rename the function calls here too.
1543 2004-04-28 Dick Porter <dick@ximian.com>
1545 * daemon-messages.c: Avoid a deadlock when a thread is killed while
1546 waiting for the daemon by using a recursive mutex. Helps bug 56699.
1548 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1550 * io.c: fixed leak in async_notifier().
1552 * sockets.[ch]: added AIO support for sockets and fixed WSAIoctl
1555 * threads.c: removed old comment.
1557 2004-04-26 David Waite <mass@akuma.org>
1559 * daemon-messages.h:
1566 * wapi-private.h: remove comma from end of enumeration declarations
1567 * status.h: cast unsigned int types to int for enum assignment
1569 2004-04-26 David Waite <mass@akuma.org>
1572 * timefuncs.c: declare 64-bit constants as long long types (i.e.
1575 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1577 * socket-wrappers.h: _wapi_socket == WSASocket now. Added
1578 WSA_FLAG_OVERLAPPED.
1580 * sockets.c: new unused parameters for _wapi_socket.
1582 2004-04-22 Miguel de Icaza <miguel@ximian.com>
1584 * timed-thread.c: Replace sem_init with MONO_SEM_INIT to handle
1585 the fact that MacOS X is a piece of junk (sem_init is *defined* in
1586 the libc, but they return `not implemented').
1588 2004-04-22 Dick Porter <dick@ximian.com>
1591 * handles-private.h: Reference the handle when it is locked, so
1592 that another thread can't blow it away while we're waiting for it
1593 to become signalled.
1604 * handles-private.h:
1607 * daemon-messages.c:
1608 * critical-sections.c:
1609 * atomic.c: Added pthreads cleanup handlers and error asserts
1612 * handles.c: Fixed the gcc "variable might be used uninitialised"
1613 warnings. They can't happen, but gcc doesn't know that
1614 g_assert()s don't return.
1616 Fixed the declaration of _wapi_handle_process_kill() so that it
1617 expects the correct type for the pid.
1619 * threads.c: Removed the TLS_PTHREAD_MUTEX style locking that
1620 hasn't been used in ages and just made the code more complex.
1622 2004-04-17 Zoltan Varga <vargaz@freemail.hu>
1624 * processes.c: Include <signal.h> for SIGKILL and SIGILL + fix some
1625 warnings. Fixes #57168.
1627 2004-04-16 Dick Porter <dick@ximian.com>
1629 * threads.c (Sleep): Using div(3) with a negative (when signed)
1630 numerator causes the quotient to be 0 and the remainder to be the
1631 numerator. This feeds a small negative value to nanosleep(3),
1632 which will return immediately and cause a busy wait. Fixes bug
1635 2004-04-15 Dick Porter <dick@ximian.com>
1638 * io.c: Rewrite FindFirstFile and FindNextFile using scandir(3)
1639 and fnmatch(3) instead of glob(3). glob() can't cope with being
1640 given filenames containing metachars. This fixes bug 40557.
1642 2004-04-14 Bernie Solomon <bernard@ugsolutions.com>
1644 * security.c: #warning is a GCC-ism
1646 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
1648 * security.c: Removed GetUserName as glib g_get_user_name does a
1649 better (portability) job. Added ImpersonateLoggedOnUser and
1652 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1654 * mono-mutex.h: move pthread_mutex_timedlock declaration to...
1655 * mono-mutex.c: ...here. It was causing a warning that prevented
1656 libgdiplus compilation.
1658 2004-04-04 Miguel de Icaza <miguel@ximian.com>
1660 * security.c (GetUserName): Make it work on MacOS X
1662 2004-04-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1664 * security.c: use getpwuid_r if available. This one is thread-safe.
1666 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
1668 * Makefile.am: Added security.c|h.
1669 * security.c: New file for security related functions. Added function
1670 GetUserName to fix #56144.
1671 * security.h: New. Header file for security.c
1672 * wapi.h: Added include for security.h
1674 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1676 * daemon-messages.h: added kill structs.
1678 * daemon.c: implemented process_process_kill.
1679 * handles-private.h: define process_process_kill.
1680 * handles.c: implemented _wapi_handle_process_kill.
1681 * processes.[ch]: implemented TerminateProcess.
1683 2004-03-25 Bernie Solomon <bernard@ugsolutions.com>
1685 * daemon.c (rem_fd): On solaris you seem to get an
1686 error even after removing the input source so don't
1687 try and rem_fd it twice.
1689 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
1691 * daemon.c: in process_post_mortem, If the child terminated due to the
1692 receipt of a signal, the exit status must be based on WTERMSIG, since
1693 WEXITSTATUS returns 0 in this case.
1695 2004-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1697 * daemon.c: turned a warning into a DEBUG statement. Now we may hit it.
1699 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1701 * daemon.c: only call getdtablesize () once.
1702 * processes.c: wait 500 ms to check if execve failed and throw the same
1703 exception as MS on failure. Fixes bug #32809.
1705 2004-03-17 Bernie Solomon <bernard@ugsolutions.com>
1707 * io.c (async_notifier): use "union sigval" rather
1708 than sigval_t as Solaris doesn't have sigval_t
1709 (which isn't in IEEE 1003.1 either).
1711 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1713 * io.c: added debug stuff and removed a few redundant lines in
1716 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1718 * io-private.h: added new fields for file structure. Declare
1719 _wapi_io_add_callback.
1721 * io.c: added _wapi_get_win32_error, support aio_read/write in
1722 file_read/write. Implemented _wapi_io_add_callback, which is where
1725 * io.h: added new fields for WapiOverlapped and typedef for the
1728 * processes.c: fixed off-by-one bug when handling environment variables
1731 * threads.[ch]: implemented BindIoCompletionCallback.
1733 * uglify.h: added typedef for LPOVERLAPPED_COMPLETION_ROUTINE.
1735 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
1737 * socket-wrappers.h: Remove extra semicolon.
1739 2004-03-03 Dave Camp <dave@ximian.com>
1741 * daemon.c: (add_fd), (fd_activity), (_wapi_daemon_main):
1742 Use a new main context.
1744 2004-03-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1747 (GetFileAttributes): set the error depending on errno instead of
1748 setting ERROR_FILE_NOT_FOUND always. See bug #55160.
1750 2004-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1753 (CopyFile): free the buffer on error.
1755 (WSAIoctl): free the buffer on error.
1757 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1759 * error.c: fixed mapping for EPROTONOSUPPORT and ESOCKTNOSUPPORT.
1761 * sockets.[ch]: retry creating the socket for AF_INET, SOCK_RAW
1762 using IP protocol with IP over IP. Implemented WSAIoctl UNIX-style.
1764 2004-01-27 Bernie Solomon <bernard@ugsolutions.com>
1766 * shared.c (_wapi_shm_file): add hostname
1767 to shared data file names to handle NFS mounted
1770 Mon Jan 26 16:15:03 CET 2004 Paolo Molaro <lupus@ximian.com>
1772 * sockets.h: remove obsolete soklen_t typedef.
1774 Fri Jan 23 21:07:02 CET 2004 Paolo Molaro <lupus@ximian.com>
1776 * socket-wrappers.h, sockets.h, sockets.c, Makefile.am: move socket
1777 wrappers to its own non-installed header file.
1779 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1782 (FindFirstFile): unlock the handle if FindNextFile fails.
1783 (FindNextFile): g_free a couple of pointers before retrying.
1786 (WaitForMultipleObjects): if only one handle provided, use
1787 WaitForSingleObject.
1789 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
1791 * handles-private.h: (_wapi_handle_type) check
1792 for segment in range before using it
1794 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
1796 * thread-private.h: _wapi_thread_ops is now const
1799 Mon Dec 22 18:29:03 CET 2003 Paolo Molaro <lupus@ximian.com>
1801 * threads.c, timed-thread.c, timed-thread.h: use mach
1802 semaphores on Darwin (MacOSX) since the posix ones
1803 are mostly broken there (threads are not created suspended
1804 and they can start executing before they are fully initialized
1805 like in tests/thread-static.cs).
1807 Mon Dec 22 17:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
1809 * atomic.h: ppc fixes.
1811 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
1813 * handles.c: remove my bad use of MONO_ZERO_ARRAY_LENGTH
1816 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
1818 * shared.c: (_wapi_shm_open) make scratch file
1819 not have to immediately regrow to avoid remaps
1820 (HPUX can't cope with these).
1821 (_wapi_shm_attach) use actual size of file
1822 to set scratch data_len for the creating process.
1824 * handles.c: (_wapi_handle_new_internal) make
1825 sure mutex & cond var are initialized even for
1826 non process shared ones.
1827 (_wapi_handle_unref) always call destroy
1828 routines on mutex & cond var
1830 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
1832 * daemon.c: change channel data structure so
1833 input sources are removed from glib event loop
1834 properly. xsp works better on Solaris and
1837 2003-12-12 Bernie Solomon <bernard@ugsolutions.com>
1839 * wapi-private.h: Replace G_GNUC_PRETTY_FUNCTION
1840 definition with file & line number for non-GCC
1843 2003-12-08 Bernie Solomon <bernard@ugsolutions.com>
1845 * Makefile.am: make sure hppa_atomic.s is in distribution
1847 2003-12-01 Dick Porter <dick@ximian.com>
1850 * mutexes.c (CreateMutex):
1851 * mutex-private.h (struct _WapiHandle_mutex):
1852 * handles.c: Look up certain handle types by name, in a shared
1853 namespace. Currently only mutex handles have this implemented.
1856 * semaphores.c (CreateSemaphore):
1857 * events.c (CreateEvent): Fix signature
1859 2003-11-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1861 * io.c: don't call g_free before testing errno as it may modify it.
1862 If the path exists, return an error if it's not a directory. Fixes
1865 2003-11-20 Dick Porter <dick@ximian.com>
1867 * io.c: Missed a little-endian UTF16 conversion. Patch from
1868 Jeroen Zwartepoorte (Jeroen@xs4all.nl), fixes bug 51065.
1870 2003-10-29 Dick Porter <dick@ximian.com>
1872 * io.c (MoveFile): If the move crosses filesystems, try and fall
1873 back to copy and delete. Patch from Jörg Rosenkranz
1874 (JoergR@voelcker.com), fixes bug 50298.
1876 2003-10-28 Dick Porter <dick@ximian.com>
1878 * io.c: Use the new encoding conversion to cope with non-utf8
1879 locales in filenames.
1881 * processes.c: Ditto for process arguments.
1883 Tue Oct 21 12:01:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
1885 * atomic.h: some ppc inline asm fixes (incorrect use of labels,
1886 incorrect register constraints, incorrect clobber lists).
1888 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
1890 * Makefile.am hppa_atomic.s: add HP 64bit
1891 implementation of atomic ops
1893 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
1895 * threads.c (CreateThread): Wrap pthread_attr_setstacksize call in
1896 a conditional for platforms that don't have it.
1898 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
1900 * threads.c: (CreateThread) use stacksize argument
1901 if non-zero - change default for 64 bits to 4Mb
1903 2003-09-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1905 * sockets.c: set last error when socket creation fails. This shed some
1906 light on bug #49015.
1908 2003-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1910 * processes.c: fixed bug #48973: we only change \ by / for the argument
1911 to be used as command.
1912 When getting the program name from the args, don't let the space between
1915 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
1917 * atomic.h atomic.c: fix sparc so lock is
1918 global, increment does so and it compiles under Sun compiler.
1920 2003-09-22 Bernie Solomon <bernard@ugsolutions.com>
1922 * handles.c: include <string.h> directly as may
1923 not be nested in <sys/un.h> like Linux
1925 2003-09-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1928 (DeleteFile): call SetLastError on failure. Fix by
1929 richard.torkar@htu.se (Richard Torkar). Closes bug #48222.
1931 2003-09-15 Lluis Sanchez Gual <lluis@ximian.com>
1933 * daemon.c: In compare_process(), discard handles already signalled.
1935 2003-09-02 Dick Porter <dick@ximian.com>
1937 * io.c: Work around glib brain-dead assumptions about utf8-encoded
1938 filenames. Fixes bug 30781.
1940 2003-08-28 Dick Porter <dick@ximian.com>
1942 * critical-sections.c: Patch from Bernie Solomon
1943 <bernard@ugsolutions.com> to emit a warning if locking a critical
1946 2003-07-23 Dick Porter <dick@ximian.com>
1949 * daemon.c (maybe_exit): Avoid the race condition when the daemon is
1950 closing but another client comes along when the shared data is still
1951 visible. Should fix bugs 33671 and 35213.
1953 2003-07-23 Dick Porter <dick@ximian.com>
1955 * handles.c: Initialise handle mutex and cond. Fix by
1956 Bernie Solomon <bernard@ugsolutions.com>
1958 2003-07-15 Dick Porter <dick@ximian.com>
1960 * timed-thread.c (timed_thread_start_routine): Fix virtual memory
1961 leak when threads quit. Fixes bug 44067.
1963 Wed Jun 18 19:08:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
1965 * io.c: never add write permission for group or others in
1966 SetFileAttributes ().
1968 2003-06-17 Dick Porter <dick@ximian.com>
1970 * io.c (SetFileAttributes): Implement the ReadOnly attribute, and
1971 ignore the unsupported ones ("fixes" bug 44977).
1973 2003-06-17 Lluis Sanchez Gual <lluis@ximian.com>
1975 * misc.c: fix bug in _wapi_calc_timeout. It gave wrong values for
1976 high ms values (there was an overflow).
1978 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
1980 * system.h (struct _WapiSystemInfo ): Fix warnings when using gcc-3.3.
1982 2003-06-11 Dick Porter <dick@ximian.com>
1984 * shared.c: Fix shared directory creation. Patch from
1985 Pablo Baena <pbaena@uol.com.ar>
1987 2003-06-10 Dick Porter <dick@ximian.com>
1989 * atomic.c: Delete the useless compile warning
1991 2003-06-09 Dick Porter <dick@ximian.com>
1993 * daemon.c: Lookup env as a string array. Fixes bug 44289. Also
1994 make setting the process handle value in the environment actually
1997 * processes.c: Pretty up the process name, if it happens to be
1998 "mono" such as when another mono process forks "mono foo.exe"
2000 2003-06-05 Dick Porter <dick@ximian.com>
2002 * processes.c (process_set_current): Don't do an expensive handle
2003 search at application startup, check the environment to see if the
2004 process handle has already been created.
2006 * io.c: Don't do an expensive handle search when creating stdin,
2007 stdout and stderr handles, just create them all the first time one
2014 * handles-private.h:
2015 * daemon-messages.h:
2017 * daemon.c: Support for "unlimited" number of handles and scratch
2020 Speed up application startup by passing process handle in the
2021 environment, rather than let the app scan all handles (which gets
2022 really slow when there are more than a few thousand to check.)
2024 Initialise some structs passed to syscalls, noticed by valgrind.
2027 2003-05-20 Dick Porter <dick@ximian.com>
2029 * io.c (FindFirstFile): Include . files in the glob. Fixes bug
2032 2003-05-19 Dick Porter <dick@ximian.com>
2034 * threads.c: Set the new thread's stack size to 2M. Fix needed
2035 for BSD, reported by Martin Dvorak <md@9ll.cz>
2037 2003-05-16 Dick Porter <dick@ximian.com>
2040 * io.c: Implement GetTempPath()
2042 2003-05-16 Dick Porter <dick@ximian.com>
2044 * processes.c (CreateProcess): Set some error codes
2046 2003-05-12 Dick Porter <dick@ximian.com>
2048 * misc.c (_wapi_calc_timeout): Cope with overflowing tv_nsec.
2049 Patch from Martin Dvorak <mdvorak@ninell.cz>.
2051 2003-05-10 Dick Porter <dick@ximian.com>
2053 * io.c (CopyFile): Copy file mode as well as file data. Based on
2054 suggestion by Giuseppe Greco <giuseppe.greco@agamura.com>, bug
2057 2003-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2059 * handles.c: don't call GC_gcollect when creating new handles.
2061 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2063 * handles.c: added some debugging code. Call GC_gcollect
2064 before creating a new handle. It makes Lupus' test run smoother and
2065 faster (from 62 to 83 request per second). Notice that calling
2066 GC_finalizer_notifier if needed (GC_should_invoke_finalizer ()) does
2067 not improve nor degrade the performance, so i don't do it.
2069 2003-05-02 Dick Porter <dick@ximian.com>
2071 * sockets.c: Rearrange closesocket() and socket_close_private(),
2072 and remember to unref the handle, so we don't leak socket handles.
2073 Fix from Pelle Johnsen <pelle.johnsen@mail.dk>
2075 2003-04-11 Dick Porter <dick@ximian.com>
2077 * atomic.h: ARM atomic operations by Malte Hildingson
2078 <tds00mahi@tellus.thn.htu.se>
2080 Tue Apr 8 11:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
2082 * atomic.h: fix macosx build by "Urs C. Muff" <umuff@quark.com>.
2084 2003-04-03 Martin Baulig <martin@ximian.com>
2086 The following change is conditional to `WITH_INCLUDED_LIBGC'
2087 which is not yet enabled by default.
2089 * threads.c (SuspendThread, ResumeThread): Fully implemented this.
2090 (gc_init): New static function; install a signal handler for
2091 SIGPWR which is used to suspend threads. [FIXME: it SIGPWR
2092 doesn't exist on all Unix systems, we need to find another
2094 (mono_wapi_push_thread_stack): New public function. Tells the
2095 garbage collector about the current stack pointer of a suspended
2098 2003-04-03 Martin Baulig <martin@ximian.com>
2100 * timed-thread.h (TimedThread): Added `suspended_sem',
2101 `suspend_count' and `stack_ptr'.
2103 2003-03-28 Dick Porter <dick@ximian.com>
2105 * atomic.h: PPC support gratiously donated to the public domain
2106 by John Duncan <jddst19@mac.com>
2108 2003-03-20 Dick Porter <dick@ximian.com>
2110 * sockets.c (_wapi_connect): If connect() fails with EACCES, try
2111 setting SO_BROADCAST and connecting again. Fixes bug 39178.
2113 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2115 * processes.c: included Jerome Laban's patch and call SetLastError when
2116 the executable is not found.
2118 2003-03-03 Dick Porter <dick@ximian.com>
2120 * io.c (CreateFile): Try opening directories readonly, so that
2121 timestamps can be adjusted. Patch by Elan Feingold
2122 <efeingold@mn.rr.com>.
2124 2003-02-25 Dick Porter <dick@ximian.com>
2126 * shared.c (_wapi_shm_attach): Return a failure code on system
2127 call errors, rather than exiting.
2129 2003-02-21 Dick Porter <dick@ximian.com>
2131 * processes.c (GetCurrentProcessId): Use the current process
2132 handle to return the process ID, as getpid() is unreliable
2133 (linuxthreads gives each thread a different pid). Fixes bug
2136 2003-02-21 Dick Porter <dick@ximian.com>
2138 * io.c (FindNextFile): Skip over dangling symlinks. Fixes bug
2141 2003-02-11 Dick Porter <dick@ximian.com>
2144 * timefuncs.c: Added GetTickCount()
2146 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2148 * error.c: added WSA_EHOSTUNREACH mapping.
2150 2003-01-26 Miguel de Icaza <miguel@ximian.com>
2152 * io.c (SetFileAttributes): This routine is not currently
2153 implemented for the general case, but I added a special case to
2154 set the executable bit on Linux.
2156 Wed Jan 15 15:55:40 CET 2003 Paolo Molaro <lupus@ximian.com>
2158 * sockets.h, daemon.c, io.c: compilation fixes on MacOSX.
2160 2003-01-08 Dick Porter <dick@ximian.com>
2162 * sockets.c: Fixed setting blocking mode to true (fixes bug 36388)
2164 2002-12-11 Juli Mallett <jmallett@FreeBSD.org>
2166 * daemon.c, handles-private.h, handles.c, wapi-private.h:
2167 Check for an implementation which says it supports
2168 _POSIX_THREAD_PROCESS_SHARED, rather than just one that
2169 defines the symbol. Defined but with a value of -1 still
2170 means that it is unsupported.
2172 2002-12-08 Martin Baulig <martin@ximian.com>
2174 * handles.c (_wapi_handle_new): Create new non-shared handles with
2175 an initial refcount of 1, not 0.
2177 2002-11-22 Dietmar Maurer <dietmar@ximian.com>
2179 * threads.c (TlsGetValue): removed unnecessary mutex
2181 2002-11-20 Dick Porter <dick@ximian.com>
2183 * timed-thread.c (_wapi_timed_thread_attach): Attached threads
2184 need to store their data structure too.
2186 * threads.c: Make sure the threading data is initialised wherever
2189 2002-11-15 Dick Porter <dick@ximian.com>
2191 * timed-thread.c: Removed unneeded parameters in
2192 _wapi_timed_thread_attach().
2194 * threads.c: Renamed AttachThread() to make it not look like
2195 external API. Removed unneeded parameters.
2197 2002-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2199 * error.[ch]: added errno_to_WSA (). It displays a warning and return
2200 WSASYSCALLFAILURE if there is no error mapping for the given errno,
2202 * sockets.c: use errno_to_WSA and fixed display of warning for h_errno.
2204 2002-10-31 Dick Porter <dick@ximian.com>
2207 * io.c: Define and use INVALID_FILE_ATTRIBUTES
2209 2002-10-07 Dick Porter <dick@ximian.com>
2212 * daemon.c: Use a more accurate time source for process start and
2215 2002-10-03 Dick Porter <dick@ximian.com>
2219 * threads.c: Fixes for freebsd. Make sure that mutex and condition
2220 creation and deletion happen in the process that owns them, when
2221 POSIX shared thread objects aren't supported. This breaks on
2222 freebsd, as pthread_t is a pointer to data.
2224 2002-10-02 Dick Porter <dick@ximian.com>
2226 * shared.c: Use mmap() instead of sysv shm for the shared data.
2228 * wapi-private.h (_WAPI_HANDLE_VERSION): Reset back to 0, for the
2232 * daemon.c: mmap()ed regions survive fork, so just pass the
2233 pointer to _wapi_daemon_main instead of mapping it again.
2235 2002-10-01 Dick Porter <dick@ximian.com>
2237 * timed-thread.c: Kludge for CREATE_SUSPENDED thread creation.
2238 Unfortunately libgc uses the same thread suspend technique that I
2239 want to, and the two don't mix: libgc will deadlock when it tries
2240 to stop the world if a thread has already been suspended by
2241 someone else. Just do the simple suspended create rather than the
2242 general purpose thread suspension for now.
2244 * threads.c: Pass create flags to the timed_thread create call, to
2245 implement suspended thread creation. ResumeThread() partially
2246 implemented, to cope with the case where a newly created but
2247 suspended thread is launched.
2249 2002-09-30 Dick Porter <dick@ximian.com>
2251 * sockets.c (ioctlsocket): Set non-blocking mode in a better way,
2254 2002-09-27 Dick Porter <dick@ximian.com>
2256 * semaphores.c: Only include semaphore.h if it's present. Patch
2257 for BSD from jmmv@hispabsd.org (Julio Merino).
2259 2002-09-27 Dick Porter <dick@ximian.com>
2261 * processes.c: Pass environment and working directory to the
2262 daemon when forking. Don't let argv[0] be duplicated when looking
2263 for the program name. Implement EnumProcessModules (simple
2264 version for now, lsof-style later if needed), GetModuleBaseName,
2265 {Get,Set}ProcessWorkingSetSize (just faked, because the vm hints
2266 aren't available on Linux).
2268 * process-private.h: Store the process name, and the working set
2272 * handles-private.h: New functions to store and retrieve an array
2273 of strings in the scratch space
2275 * daemon.c: Don't miss deleting some handles when a client exits
2276 (we used to rely on the client doing the final cleanup, but
2277 obviously if the client is no longer there the daemon has to do
2280 Process forking now sets the environment and the working
2283 * io.c: Don't confuse fd 0 with an unassigned handle struct
2285 * atomic.h: Add a google cache alternative to the msdn URL
2287 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2290 (_wapi_recvfrom): added ECONNRESET to the switch.
2292 2002-09-24 Mark Crichton <crichton@gimp.org>
2294 * atomic.h: Yea. On linux, sparc isn't sparc, it's __sparc__.
2297 2002-09-19 Mark Crichton <crichton@gimp.org>
2299 * daemon.c, shared.c: Added NEED_LINK_UNLINK for systems that
2300 dont have Linux's abstract filesystem for sockets.
2302 2002-09-19 Mark Crichton <crichton@gimp.org>
2304 * atomic.h: Added SPARC atomic asm code.
2305 * daemon.c, handles-private.h, handles.c, wapi-private.h:
2306 undefined _POSIX_THREAD_PROCESS_SHARED. This actually exists on
2307 Solaris 9, however, the code paths don't seem to work. More testing
2308 on the shared case is *really* needed.
2310 2002-09-03 Dick Porter <dick@ximian.com>
2313 * threads.c: Removed PosixKillThread(), because it's not in the
2316 2002-08-20 Dick Porter <dick@ximian.com>
2318 * handles.c (_wapi_handle_scratch_store): Made stored byte lengths
2319 multiples of 4 bytes, to keep header structures aligned. Needed
2320 for sparc, at least. (Patch from crichton@gimp.org)
2322 * handles.c: Removed 'disable_shm' variable (we've defaulted to
2323 building with shm enabled for months now)
2325 2002-08-19 Dick Porter <dick@ximian.com>
2327 * daemon.c: Rewrote the poll() loop to use GIOChannels instead,
2328 for legacy NeXT-based systems.
2330 2002-08-12 Dick Porter <dick@ximian.com>
2332 * atomic.h: Rename some parameters to avoid c++ keywords (Patch
2333 from Joseph Wenninger <kde@jowenn.at>)
2335 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
2337 * threads.c: use fast spinlocks by default
2339 2002-08-02 Dick Porter <dick@ximian.com>
2341 * io.c (GetStdHandle): Add a handle reference when returning a
2342 duplicate console handle. This fixes the unref_handle errors in
2345 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
2347 * threads.c (TLS_PTHREAD_MUTEX): define this because else some
2350 2002-08-01 Dick Porter <dick@ximian.com>
2352 * threads.c: Use atomic spinlocks in TLS functions
2355 * Makefile.am: Added mono-spinlock.h
2357 2002-07-21 Jeffrey Stedfast <fejj@ximian.com>
2359 * daemon-messages.c: #include <sys/types.h> and <sys/sockets.h> -
2360 these are needed for sendmsg() and also for struct msghdr (at
2361 least on Solaris). Solaris still won't build because struct msghdr
2362 doesn't have msg_flags, msg_control, or msg_controllen members.
2363 (CMSG_SPACE): Define for systems that don't have it.
2366 2002-07-20 Dick Porter <dick@ximian.com>
2372 * handles.c: Implemented pipe handles
2375 * daemon.c: Fixed bug in handle closing.
2378 * daemon.c: Forked processes now close all open file descriptors.
2380 Fri Jul 19 19:05:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
2382 * sockets.h, io-layer.h, critical-sections.h: don't include config.h
2385 2002-07-19 Martin Baulig <martin@gnome.org>
2387 * threads.c (ExitThread): Call exit() if no threads has been
2390 2002-07-17 Dick Porter <dick@ximian.com>
2392 * daemon-messages.c: Freebsd fixes from Andreas Kohn
2393 <andreas.kohn@gmx.net>
2395 2002-07-15 Dick Porter <dick@ximian.com>
2397 * io.c: Removed bogus console_flush() method, that was just cut
2398 and pasted from file_flush when I separated the two handle types.
2400 2002-07-12 Dick Porter <dick@ximian.com>
2402 * io.c (convert_from_flags): Fixed misunderstanding wrt fcntl
2403 flags. Fixes bug 27633.
2405 2002-07-12 Dick Porter <dick@ximian.com>
2409 * daemon.c: Use size of sockaddr_un.sun_path from config.h
2411 2002-07-12 Dick Porter <dick@ximian.com>
2413 * processes.c (CreateProcess): Send stdin, stdout and stderr
2414 handles if the startup info doesnt specify new ones
2416 * io.c (GetStdHandle): Return the same handle when the same
2417 standard handle is requested
2419 * handles.c: Pass file descriptors when forking
2421 * daemon.c: Use supplied file descriptors when forking a new
2424 * daemon-messages.h:
2425 * daemon-messages.c: Pass stdin, stdout and stderr file
2426 descriptors to the daemon (used when forking)
2428 2002-07-11 Miguel de Icaza <miguel@ximian.com>
2430 * daemon.c (_wapi_daemon_main): Use sizeof
2431 (main_socket_address.sun_path) instead of hardcoded 108 value.
2433 * handles.c (shared_init): Use sizeof
2434 (shared_socket_address.sun_path) instead of hardcoded 108 value.
2436 2002-07-10 Dennis Haney <davh@davh.dk>
2440 * daemon.c: Lots of documentation, some added error checking, and
2441 code readability improvements.
2443 * daemon-messages.h: Add the Error request type to improve error
2446 * daemon-messages.c: Do a bit more error checking on send() and
2447 recv(), and log errors with a higher severity level.
2449 2002-07-04 Dick Porter <dick@ximian.com>
2451 * daemon.c (process_process_fork): Fix argument handling, due to
2452 buggy understanding of g_strsplit() behaviour.
2454 2002-07-03 Dick Porter <dick@ximian.com>
2457 * threads.c: Implement OpenThread(). Define access-control values
2463 * Makefile.am: Added access.h, to hold shared access-control
2466 2002-07-02 Dick Porter <dick@ximian.com>
2468 * wapi-private.h (_WAPI_HANDLE_VERSION): New protocol version
2470 2002-07-02 Dick Porter <dick@ximian.com>
2472 * handles.c (shared_init): Make a second attempt to contact the
2473 daemon if the shared memory attach succeeds, but the connect()
2474 fails. (This copes with the daemon crashing without cleaning up
2480 * shared.c (_wapi_shm_attach): Don't exec() anything when we fork
2481 the daemon, it's now built into the library.
2483 2002-06-25 Dick Porter <dick@ximian.com>
2486 * handles-private.h:
2487 * daemon-messages.h:
2488 * daemon.c: Process forking and handle data management
2491 * process-private.h:
2492 * processes.c: Process forking and other support functions
2494 2002-06-25 Dick Porter <dick@ximian.com>
2496 * versioninfo.h: PE resource decoding
2498 * unicode.c (_wapi_unicode_to_utf8): g_utf16_to_utf8 doesnt need
2499 to be told the string length
2501 * io.c: Removed the ACTUALLY_DO_UNICODE option. Fixed some leaks.
2502 Moved _wapi_time_t_to_filetime and the WapiFileTime typedef to
2505 2002-06-12 Dick Porter <dick@ximian.com>
2508 * daemon-messages.c: Handle SIGPIPE in a non-stupid way in the
2509 daemon, if MSG_NOSIGNAL isn't available. Thanks to Jaroslaw
2510 Kowalski <jarek@atm.com.pl> for pointing out the bogosity.
2512 2002-06-10 Jaroslaw Kowalski <jarek@atm.com.pl>
2514 * sockets.c, daemon-messages.c: Prevent SIGPIPE from being raised
2515 when writing to a closed socket.
2517 2002-06-08 Jeffrey Stedfast <fejj@ximian.com>
2519 * mono-mutex.c (mono_once): New convenience function for my
2524 * critical-sections.c:
2532 * atomic.c: Use mono_once() rather than pthread_once().
2534 2002-06-06 Jeffrey Stedfast <fejj@ximian.com>
2536 * handles.c (_wapi_handle_new): pthread_once() is not atomic, so
2537 if multiple threads all try to call _wapi_handle_new() before the
2538 shared data has been initialized, it is possible that we could get
2539 into a condition where shared_init() is being executed and later
2540 threads will pass by pthread_once() due to the fact that it has
2541 already been called and so therefor will attempt to use the shared
2542 data before it has been completely initialized. If we instead use
2543 a standard mutex locking mechanism around shared_init(), we can
2544 avoid the situation entirely. By wrapping the mutex locking in a
2545 check to see if we've already initialized the data, we can even
2546 avoid wasting resources by having to lock/unlock the mutex in any
2547 later calls (the only time we'd have to worry about
2548 locking/unlocking is the initial race to call shared_init() at
2551 Sat Jun 1 13:27:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
2553 * atomic.h: inline asm fixes from Dennis Haney (davh@davh.dk).
2555 Fri May 31 16:21:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
2557 * daemon.c, handles.c: rename "sun" local var since it's apparently
2558 a #define on Solaris.
2560 Fri May 31 15:40:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
2562 * daemon-messages.c: work-around MSG_NOSIGNAL missing on some
2565 2002-05-15 Dick Porter <dick@ximian.com>
2567 * wait.c: Fix a deadlock in WaitForMultipleObjects
2569 2002-05-14 Dick Porter <dick@ximian.com>
2571 * io.c: Fix a cut&paste error, found by
2572 Jaroslaw Kowalski <jarek@atm.com.pl>
2574 2002-05-10 Dan Lewis <dihlewis@yahoo.co.uk>
2578 2002-05-09 Dick Porter <dick@ximian.com>
2584 * handles-private.h:
2586 * Makefile.am: Remove now-unused file wait-private.h
2588 2002-05-08 Dick Porter <dick@ximian.com>
2590 * shared.c: Better error messages, and report when daemon
2591 connection fails rather than blocking forever. Do some more
2592 shared memory sanity checking.
2594 * handles.c: Better error messages when connecting to shared
2595 memory and the handle daemon. Fall back to non-shared handles if
2596 an error occurs. Set the default back to 'shared handles'. Fix a
2597 crashing bug in scratch space allocation that mangled the block
2600 2002-05-07 Miguel de Icaza <miguel@ximian.com>
2602 * handles.c (shared_init): Disable SHM for now, people have too
2603 many problems with this, and the diagnostics are not helping.
2605 2002-05-06 Dan Lewis <dihlewis@yahoo.co.uk>
2607 * io.c: CreateFile sets win32 last error.
2609 2002-05-05 Dick Porter <dick@ximian.com>
2612 * handles-private.h:
2618 * process-private.h:
2620 * semaphore-private.h:
2624 * event-private.h: Simplify the WapiHandleOps struct: take out all
2625 the file-specific entries, leaving just the items that operate on
2626 handles themselves. Split the close operation into shared and
2627 private parts: shared close is called by the daemon.
2629 * handles.c: As above, but also pass handle allocation, ref and
2630 unref operations to the daemon. Populate the handle_ops array at
2631 compile time, because the daemon needs to call ops on handles too.
2632 Don't bother to track open handle counts any more, the daemon does
2636 * thread-private.h: As above, but also make the thread data
2639 * shared.c: Fork a handle daemon if the calling process created
2640 the shared memory segment.
2643 * daemon-messages.c:
2644 * daemon-messages.h:
2645 * Makefile.am: Build a daemon to manage handle allocation and
2646 destruction without needing to lock the shared memory
2648 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
2650 * atomic.c: Changed to use a normal mutex rather than a spinlock
2651 since a lot of platforms seem to not have them :\
2653 2002-04-30 Dick Porter <dick@ximian.com>
2655 * Completely rewrote the handle waiting code: removed the helper
2656 thread and its attendant complexity. All handle waiting is now
2657 abstracted into the WaitForSingleObject() and
2658 WaitForMultipleObjects() functions.
2660 * Implemented inter-process sharing of handles using sysv shared
2661 memory. This makes handles even more opaque, with a handle now
2662 just an index into an array.
2664 2002-04-25 Dan Lewis <dihlewis@yahoo.co.uk>
2666 * io.c: unitialized pointer in GetCurrentDirectory.
2668 Sat Apr 20 13:37:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
2670 * threads.c: destroy the mutex at thread destruction
2671 (if/when thread destruction code will be actually called).
2672 When protecting a tls data pointer from the gc, use also the
2673 thread id in the key.
2675 Wed Apr 17 18:36:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
2677 * timed-thread.c: avoid race condition when setting the thread to
2680 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2682 * jit.h: to more #include lines to avoid breaking compilation
2683 under windows when upgrading mingw and w32api to version
2686 2002-04-16 Dick Porter <dick@ximian.com>
2688 * atomic.h: Explanatory comment about lack of 80386 support
2690 2002-04-15 Dick Porter <dick@ximian.com>
2692 * atomic.h: use xaddl for InterlockedIncrement() and
2693 InterlockedDecrement(). Use cmpxchgl in a loop for
2694 InterlockedExchange() and InterlockedExchangePointer().
2696 Mon Apr 15 13:31:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
2698 * unicode.c: fix unicode_len() to not access uninitialized memory
2699 (and updated to conform to mono code style).
2701 Fri Mar 29 17:15:11 CET 2002 Paolo Molaro <lupus@ximian.com>
2703 * io.c: EEXISTS is ignored for directory creation.
2704 * mono-mutex.h: remove silly "pragma }" that emacs users insert
2705 because they use a broken editor:-)
2707 2002-03-28 Dick Porter <dick@ximian.com>
2713 * handles.c: Warning cleanups
2715 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
2717 * unicode.h, unicode.c: changed to gunichar2
2718 * io.h, io.c: changed strings to gunichar2*, added
2719 SetFileAttributes(), GetCurrentDirectory(), SetCurrentDirectory(),
2720 some fixes to FindFirstFile() and friends.
2722 2002-03-26 Dick Porter <dick@ximian.com>
2724 * types.h: Implement the large integer struct
2727 * timefuncs.c: Dummy functions that don't yet implement
2728 QueryPerformanceCounter() and QueryPerformanceFrequency()
2731 * threads.c: Implement SleepEx()
2734 * system.c: Beginnings of GetSystemInfo()
2736 * mono-mutex.c (pthread_mutex_timedlock): Fix a ms/ns conversion
2740 * context.c: Dummy function that doesnt yet implement
2744 * atomic.c: Interlocked functions
2746 Mon Mar 25 13:01:40 CET 2002 Paolo Molaro <lupus@ximian.com>
2748 * threads.c: use a gc-safe hash table to store tls pointers.
2750 2002-03-22 Dick Porter <dick@ximian.com>
2752 * threads.c: Fix a race condition where a thread can start and
2753 exit before the handle has been properly initialised (no reason
2754 why the handle couldn't be initialised beforehand, so do so)
2756 Fix a ms to ns conversion magnitude thinko.
2758 2002-03-21 Dick Porter <dick@ximian.com>
2760 * semaphores.c: Fix a problem when waiting for one or more
2761 semaphores, and another semaphore is Released (all waiting
2762 semaphores assumed they were signalled)
2764 2002-03-29 Dan Lewis <dihlewis@yahoo.co.uk>
2766 * io.h, io.c, uglify.h: added MoveFile, CopyFile, CreateDirectory,
2767 RemoveDirectory, GetFileAttributes, GetFileAttributesEx
2769 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
2771 * threads.c (Sleep): bug fix: 1ms == 1000000ns
2773 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
2775 * io.h, io.c, events.c, mutexes.c, semaphores.c, sockets.c,
2776 threads.c, io.c: added flush method to handles.
2778 * io.c: FlushFileBuffers() and FindFirstFile() functions.
2780 Thu Mar 7 17:21:52 CET 2002 Paolo Molaro <lupus@ximian.com>
2782 * threads.c, timed-thread.c, wait.c: Boehm-GC anable.
2784 2002-02-20 Dick Porter <dick@ximian.com>
2786 * io-layer.h: Always build without cygwin support on windows
2788 Mon Feb 18 15:50:59 CET 2002 Paolo Molaro <lupus@ximian.com>
2790 * sockets.c: #undef DEBUG.
2792 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
2794 * io-layer.h: conditionally include sys/filio.h and sys/sockio.h
2795 for FIONBIO, FIONREAD, and SIOCATMARK.
2797 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
2799 * sockets.c: conditionally include sys/filio.h and sys/sockio.h
2800 for FIONBIO, FIONREAD, and SIOCATMARK.
2802 2002-02-13 Dick Porter <dick@ximian.com>
2804 * sockets.c: Implement shutdown and select
2806 2002-02-13 Jeffrey Stedfast <fejj@ximian.com>
2808 * mono-mutex.[c,h]: New source files that thinly wrap all pthread
2809 functions that take pthread_mutex_t and/or pthread_mutexattr_t
2810 arguments for the sake of portability. Implements recursive
2811 mutexes and pthread_mutex_timedlock.
2813 * critical-sections.c:
2820 * wait.c: Use the mono-mutex wrapper portability functions/macros.
2822 * pthread-compat.[c,h]: Replaced by mono-mutex.[c,h]
2824 2002-01-23 Dick Porter <dick@ximian.com>
2826 * sockets.c: Networking support, mostly wrapping BSD socket APIs
2827 with handle code, and translating errno into w32 error codes.
2829 * macros.h: Some w32 macros used with the socket support
2831 * error.c: Implemented GetLastError() and SetLastError()
2833 * Makefile.am: Added sockets, with kludge to override some symbols
2835 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
2837 * unicode.c (_wapi_unicode_to_utf8): byteswap UTF16 strings before
2838 passing them to iconv
2839 (_wapi_unicode_to_utf8): only swap bytes on LE systems, remove bug
2840 from previous commit.
2842 2001-12-11 Dick Porter <dick@ximian.com>
2844 * io.c: Implement DeleteFile(), GetFileTime(), SetFileTime() and
2845 FileTimeToSystemTime().
2847 * unicode.c (unicode_len): Nasty way of finding length of unicode
2848 string with embedded NULLs (counts until two NULLs together).
2850 * mutexes.c (mutex_close):
2851 * events.c (event_close): Release the internal pthreads resources
2853 2001-11-26 Dick Porter <dick@ximian.com>
2855 * critical-sections.c:
2863 * wait.c: turn off DEBUG messages
2865 2001-11-22 Dick Porter <dick@ximian.com>
2867 * handles.c (SignalObjectAndWait): Implement
2869 * wait.c (WaitForSingleObject): Fix case where timeout == 0
2875 * events.c: Support for SignalObjectAndWait
2877 2001-11-21 Dick Porter <dick@ximian.com>
2884 * wait.c: Reliable method of returning which handle was signalled
2885 on return from WaitForMultipleObjects().
2887 2001-11-21 Dick Porter <dick@ximian.com>
2889 * events.c: Implement events
2891 2001-11-15 Dick Porter <dick@ximian.com>
2893 * mutexes.c: Implement mutexes
2897 * misc.c: Factor out some common code
2899 2001-11-13 Dick Porter <dick@ximian.com>
2901 * threads.c: Implement TLS. Implement GetCurrentThreadId(), and
2902 GetCurrentThread() by maintaining a hash of thread handles.
2904 * threads.h: Define thread and process creation flags
2906 2001-11-12 Dick Porter <dick@ximian.com>
2908 * critical-sections.c: Implement critical sections
2910 2001-11-12 Dick Porter <dick@ximian.com>
2912 * semaphores.c: Implement semaphores
2914 * wait.c (wait_for_item): Maintain a wait count rather than count
2917 * threads.c (thread_wait_multiple): Don't lock the wait item, that
2918 will block other wait threads
2920 2001-11-11 Dick Porter <dick@ximian.com>
2922 * Makefile.am: Rename some automake variables
2923 (from Nick Drochak <ndrochak@gol.com>)
2925 2001-11-10 Dick Porter <dick@ximian.com>
2927 * Makefile.am (libwapiincludedir): Fix include destination
2929 * .cvsignore: Ignore generated files
2931 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
2933 * pthread-compat.c: added some include files to make it compile on
2936 2001-11-08 Dick Porter <dick@ximian.com>
2940 This is a library emulating the win32 threading and IO API.