1 2004-09-09 Dick Porter <dick@ximian.com>
4 * io.c: Set error codes everywhere.
6 2004-09-06 Dick Porter <dick@ximian.com>
8 * handles.c (_wapi_handle_unref): Reset the private record's type
9 (CloseHandle): Check for a fd mapping failure, and return FALSE.
10 (_wapi_handle_process_fork): Fix long-standing bug in checking
11 handle return values. Also do the required bookkeeping with the
12 new process's handles.
14 * daemon.c: When creating a new process's handles, check whether
15 the shared space needs to be increased
17 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
19 * shared.c (_wapi_shm_file): Fix leaking of filename.
21 2004-08-19 Dick Porter <dick@ximian.com>
23 * handles.c (_wapi_handle_count_signalled_handles): Fix thinko
24 introduced with the fd offset stuff: unlock handles properly when
25 backing off. Fixes the monologue hang at exit.
27 2004-08-18 Dick Porter <dick@ximian.com>
30 * io.c: Check that new fds fit in the table, return error if not
32 * daemon.c (_wapi_daemon_main):
33 * handles.c (shared_init): Have all processes agree on a size for
36 2004-08-17 Dick Porter <dick@ximian.com>
38 * daemon.c (process_new):
39 * handles.c (_wapi_handle_new_internal): Cope when the space
40 reserved for file descriptors is larger than the shared segment
41 size. Fixes the crash reported when running mono under gdb on
44 2004-08-16 Dick Porter <dick@ximian.com>
48 * handles-private.h (_wapi_handle_fd_offset_to_handle): Improve
49 error checking with passed-in file descriptors.
51 2004-08-11 Dick Porter <dick@ximian.com>
54 * io.c: Returned handle values are the file descriptor the handle
59 * daemon.c: Reserve the range of handles that can have the same
60 values as file descriptors. These won't be used, but the values
61 will be used as file, console, pipe or socket handles. The fd to
62 handle mapping is done internally and is invisible to users.
65 * wapi-private.h (_WAPI_HANDLE_VERSION): Increment, because we now
66 reserve a chunk of handle space.
68 2004-08-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
70 * atomic.h: add support for 64-bit S/390
72 2004-07-22 Dick Porter <dick@ximian.com>
75 * threads.c: Move the destruction of the internal thread data to
76 after the thread has been joined. Fixes bug 61418.
78 2004-07-14 Dick Porter <dick@ximian.com>
80 * wait.c (test_and_own): When not waiting for all handles to
81 become signalled, only own and return the lowest. All the
82 documentation suggests that the old way was correct, but
83 experimentation shows it actually works like this. Patch by
85 (sebastien.robitaille@croesus.com), fixes bug 61511.
87 2004-07-09 Ben Maurer <bmaurer@ximian.com>
89 * threads.c: register roots for gc
91 2004-07-08 Dick Porter <dick@ximian.com>
93 * io.c (file_seek): If there is a high 32bit offset part, make
94 sure the low part isn't sign-extended. Set error codes when
95 returning failure. Fixes bug 61131.
97 2004-07-06 Dick Porter <dick@ximian.com>
99 * io.c (file_setfiletime): Check for underflow when converting to
100 time_t values. Set error codes when returning failure. Fixes bug
103 2004-07-05 Dick Porter <dick@ximian.com>
105 * mutexes.c (mutex_ops_init): Make the named mutex mutex sharable.
107 * daemon.c (unref_handle): Only destroy a handle if all processes
108 have released it, not just the current one. Fixes bug 60887.
110 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
112 * mono-mutex.h atomic.h: Add G_GNUC_UNUSED to static inline functions
115 2004-06-24 Dick Porter <dick@ximian.com>
117 * mutexes.c: Indicate when a named mutex was reused
119 2004-06-24 Dick Porter <dick@ximian.com>
121 * threads.c (SuspendThread):
122 * timed-thread.c (_wapi_timed_thread_suspend): Wrap sem_wait in a
123 while loop. See bug 58161.
125 Wed Jun 23 23:29:04 CEST 2004 Paolo Molaro <lupus@ximian.com>
127 * io.c: don't use sharemode for on-disk file permissions: it's used
128 for shared access to the open file.
130 2004-06-22 Dick Porter <dick@ximian.com>
132 * events.c (CreateEvent): When creating an auto-reset event that
133 is initially owned, make sure the set count starts at 1.
135 2004-06-18 Dick Porter <dick@ximian.com>
138 * events.c: Auto-reset events need to release one thread for each
139 time SetEvent() is called. Fixes bug 41292.
143 * mutexes.c: Scan for mutexes that are still locked by a thread
144 when it exits. Fixes the MS demo app linked by bug 41292.
146 * wait.c (test_and_own): Make sure a handle is signalled before it
149 2004-06-16 Dick Porter <dick@ximian.com>
151 * timed-thread.c: Call the thread cleanup exit routine before taking
152 the join mutex, because this could deadlock if another thread tries
153 to join in the meantime. This fixes the hang-at-exit problem seen
156 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
158 * threads.c: Implemented SleepEx.
159 * threads.h: Fixed SleepEx signature.
161 2004-06-03 Miguel de Icaza <miguel@ximian.com>
163 * threads.c: When running under valgrind, do not allocate too much
164 stack, as Valgrind default is 1 meg.
166 2004-05-27 Dick Porter <dick@ximian.com>
169 * io.c: Implemented LockFile() and UnlockFile()
171 2004-05-21 Dick Porter <dick@ximian.com>
173 * io.c (CreateFile): Check for existing share modes when opening
179 * daemon.c: Maintain a hash of file share modes, keying on device
180 and inode (to cope with symlinks.)
182 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
184 * daemon-messages.c: Retry if the communication with the daemon is
185 interrupted by a signal.
186 * io.c, sockets.c: Check for EINTR in every syscall that can be interrumped.
187 Only return an error in this case if there is something in the apc queue
188 (which means that it is an interruption requested by the "user").
189 * processes.c: Use WaitForSingleObjectEx. No need to pass "alertable" as
190 true since the wait is small.
191 * shared.c: Retry write calls when interrumped by a signal.
192 * timed-thread.h, timed-thread.c: added _wapi_thread_apc_pending, which
193 returns TRUE if there are pending asynchronous calls (APC) for the
194 provided thread. Also added _wapi_thread_dispatch_apc_queue which calls
195 the enqueued APCs. Defined a new struct ApcInfo that holds information
196 about an enqueued APC.
197 * thread-private.h, threads.c: Implemented QueueUserAPC (which does the same
198 as in win32),_wapi_thread_apc_pending and _wapi_thread_dispatch_apc_queue.
199 These last two methods call the corresponding apc methods in
200 thread-private using the provided thread handle.
201 * threads.h: Added QueueUserAPC.
202 * uglify.h: Added WapiApcProc (needed by QueueUserAPC).
203 * wait.c, wait.h: Changed WaitForSingleObject to WaitForSingleObjectEx, and
204 WaitForMultipleObjects to WaitForMultipleObjectsEx. Implemented support
205 for APCs in those two methods and also in SleepEx.
207 2004-05-17 Dick Porter <dick@ximian.com>
209 * io.c (CopyFile): Speed up. Fixes bug 57859.
211 2004-05-13 Dick Porter <dick@ximian.com>
212 * mono-mutex.c (mono_mutex_unlock): Return EPERM when the current
213 thread doesn't own the mutex, rather than assert()ing.
215 2004-05-11 Dick Porter <dick@ximian.com>
217 * shared.c (_wapi_shm_attach): Cope when a previous daemon startup
218 attempt failed, leaving shared files that look like a daemon is
221 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
224 (SetFileAttributes): don't the the exec bit if the corresponding read
227 2004-05-10 Zoltan Varga <vargaz@freemail.hu>
229 * io.c (FindFirstFile): Fix invalid free.
231 2004-05-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
233 * io.c: translate from GFileError to errno codes and don't free
234 variables right after calling mono_io_scandir, as we may overwrite
237 2004-05-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
239 * io.c: g_dir_open return ENOENT for directories on which we don't have
240 read/execute permission, while returning EPERM for anything below those.
241 So, change ENOENT by EPERM if the directory exists.
243 2004-05-07 Dick Porter <dick@ximian.com>
245 * io.c (SetFileAttributes): Don't have failed chmod()s cause a
246 "file not found" error. Fixes bug 54032.
248 2004-05-07 Dick Porter <dick@ximian.com>
250 * io.c (FindFirstFile): Comment out a windows-compatibility check
251 that breaks when directories have metachars in their names.
252 Workaround for bug 58116.
254 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
256 * io.c: fixed for FindFirstFile for empty directories. Closes
259 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
261 * processes.c: set the start time for the current process. Fixes bug
264 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
266 * io-private.h: 'namelist' is now a gchar ** in _WapiHandlePrivate_find.
267 * io.c: implemented scandir using glib functions.
269 2004-05-04 Dick Porter <dick@ximian.com>
271 * daemon.c (read_message): Return FALSE on error so the GSource
272 callback itself can return FALSE. Cures the infinite loop poll()
274 * shared.c: Fix some daemon startup race conditions.
276 2004-04-29 Miguel de Icaza <miguel@ximian.com>
278 * io.c (CopyFile): Use 32k buffers to copy the file instead of 2k,
279 use the stack, do not use dynamic memory.
281 2004-04-29 Zoltan Varga <vargaz@freemail.hu>
283 * io.c: Add scandir implementation for platforms which do not have
286 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
288 * io.[ch]: implemented GetLogicalDriveStrings.
290 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
293 * sockets.c: use the field name from configure when accessing sigval
294 pointer field. Makes this work on the Mac.
296 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
298 * atomic.c: (InterlockedExchange) fix typo for
301 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
304 * sockets.c: added check for sys/aio.h.
306 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
308 * error.[ch]: added _wapi_get_win32_file_error...
309 * io.c: ... which was _wapi_get_win32_error here.
310 * sockets.c: rename the function calls here too.
312 2004-04-28 Dick Porter <dick@ximian.com>
314 * daemon-messages.c: Avoid a deadlock when a thread is killed while
315 waiting for the daemon by using a recursive mutex. Helps bug 56699.
317 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
319 * io.c: fixed leak in async_notifier().
321 * sockets.[ch]: added AIO support for sockets and fixed WSAIoctl
324 * threads.c: removed old comment.
326 2004-04-26 David Waite <mass@akuma.org>
335 * wapi-private.h: remove comma from end of enumeration declarations
336 * status.h: cast unsigned int types to int for enum assignment
338 2004-04-26 David Waite <mass@akuma.org>
341 * timefuncs.c: declare 64-bit constants as long long types (i.e.
344 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
346 * socket-wrappers.h: _wapi_socket == WSASocket now. Added
349 * sockets.c: new unused parameters for _wapi_socket.
351 2004-04-22 Miguel de Icaza <miguel@ximian.com>
353 * timed-thread.c: Replace sem_init with MONO_SEM_INIT to handle
354 the fact that MacOS X is a piece of junk (sem_init is *defined* in
355 the libc, but they return `not implemented').
357 2004-04-22 Dick Porter <dick@ximian.com>
360 * handles-private.h: Reference the handle when it is locked, so
361 that another thread can't blow it away while we're waiting for it
377 * critical-sections.c:
378 * atomic.c: Added pthreads cleanup handlers and error asserts
381 * handles.c: Fixed the gcc "variable might be used uninitialised"
382 warnings. They can't happen, but gcc doesn't know that
383 g_assert()s don't return.
385 Fixed the declaration of _wapi_handle_process_kill() so that it
386 expects the correct type for the pid.
388 * threads.c: Removed the TLS_PTHREAD_MUTEX style locking that
389 hasn't been used in ages and just made the code more complex.
391 2004-04-17 Zoltan Varga <vargaz@freemail.hu>
393 * processes.c: Include <signal.h> for SIGKILL and SIGILL + fix some
394 warnings. Fixes #57168.
396 2004-04-16 Dick Porter <dick@ximian.com>
398 * threads.c (Sleep): Using div(3) with a negative (when signed)
399 numerator causes the quotient to be 0 and the remainder to be the
400 numerator. This feeds a small negative value to nanosleep(3),
401 which will return immediately and cause a busy wait. Fixes bug
404 2004-04-15 Dick Porter <dick@ximian.com>
407 * io.c: Rewrite FindFirstFile and FindNextFile using scandir(3)
408 and fnmatch(3) instead of glob(3). glob() can't cope with being
409 given filenames containing metachars. This fixes bug 40557.
411 2004-04-14 Bernie Solomon <bernard@ugsolutions.com>
413 * security.c: #warning is a GCC-ism
415 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
417 * security.c: Removed GetUserName as glib g_get_user_name does a
418 better (portability) job. Added ImpersonateLoggedOnUser and
421 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
423 * mono-mutex.h: move pthread_mutex_timedlock declaration to...
424 * mono-mutex.c: ...here. It was causing a warning that prevented
425 libgdiplus compilation.
427 2004-04-04 Miguel de Icaza <miguel@ximian.com>
429 * security.c (GetUserName): Make it work on MacOS X
431 2004-04-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
433 * security.c: use getpwuid_r if available. This one is thread-safe.
435 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
437 * Makefile.am: Added security.c|h.
438 * security.c: New file for security related functions. Added function
439 GetUserName to fix #56144.
440 * security.h: New. Header file for security.c
441 * wapi.h: Added include for security.h
443 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
445 * daemon-messages.h: added kill structs.
447 * daemon.c: implemented process_process_kill.
448 * handles-private.h: define process_process_kill.
449 * handles.c: implemented _wapi_handle_process_kill.
450 * processes.[ch]: implemented TerminateProcess.
452 2004-03-25 Bernie Solomon <bernard@ugsolutions.com>
454 * daemon.c (rem_fd): On solaris you seem to get an
455 error even after removing the input source so don't
456 try and rem_fd it twice.
458 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
460 * daemon.c: in process_post_mortem, If the child terminated due to the
461 receipt of a signal, the exit status must be based on WTERMSIG, since
462 WEXITSTATUS returns 0 in this case.
464 2004-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
466 * daemon.c: turned a warning into a DEBUG statement. Now we may hit it.
468 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
470 * daemon.c: only call getdtablesize () once.
471 * processes.c: wait 500 ms to check if execve failed and throw the same
472 exception as MS on failure. Fixes bug #32809.
474 2004-03-17 Bernie Solomon <bernard@ugsolutions.com>
476 * io.c (async_notifier): use "union sigval" rather
477 than sigval_t as Solaris doesn't have sigval_t
478 (which isn't in IEEE 1003.1 either).
480 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
482 * io.c: added debug stuff and removed a few redundant lines in
485 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
487 * io-private.h: added new fields for file structure. Declare
488 _wapi_io_add_callback.
490 * io.c: added _wapi_get_win32_error, support aio_read/write in
491 file_read/write. Implemented _wapi_io_add_callback, which is where
494 * io.h: added new fields for WapiOverlapped and typedef for the
497 * processes.c: fixed off-by-one bug when handling environment variables
500 * threads.[ch]: implemented BindIoCompletionCallback.
502 * uglify.h: added typedef for LPOVERLAPPED_COMPLETION_ROUTINE.
504 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
506 * socket-wrappers.h: Remove extra semicolon.
508 2004-03-03 Dave Camp <dave@ximian.com>
510 * daemon.c: (add_fd), (fd_activity), (_wapi_daemon_main):
511 Use a new main context.
513 2004-03-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
516 (GetFileAttributes): set the error depending on errno instead of
517 setting ERROR_FILE_NOT_FOUND always. See bug #55160.
519 2004-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
522 (CopyFile): free the buffer on error.
524 (WSAIoctl): free the buffer on error.
526 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
528 * error.c: fixed mapping for EPROTONOSUPPORT and ESOCKTNOSUPPORT.
530 * sockets.[ch]: retry creating the socket for AF_INET, SOCK_RAW
531 using IP protocol with IP over IP. Implemented WSAIoctl UNIX-style.
533 2004-01-27 Bernie Solomon <bernard@ugsolutions.com>
535 * shared.c (_wapi_shm_file): add hostname
536 to shared data file names to handle NFS mounted
539 Mon Jan 26 16:15:03 CET 2004 Paolo Molaro <lupus@ximian.com>
541 * sockets.h: remove obsolete soklen_t typedef.
543 Fri Jan 23 21:07:02 CET 2004 Paolo Molaro <lupus@ximian.com>
545 * socket-wrappers.h, sockets.h, sockets.c, Makefile.am: move socket
546 wrappers to its own non-installed header file.
548 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
551 (FindFirstFile): unlock the handle if FindNextFile fails.
552 (FindNextFile): g_free a couple of pointers before retrying.
555 (WaitForMultipleObjects): if only one handle provided, use
558 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
560 * handles-private.h: (_wapi_handle_type) check
561 for segment in range before using it
563 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
565 * thread-private.h: _wapi_thread_ops is now const
568 Mon Dec 22 18:29:03 CET 2003 Paolo Molaro <lupus@ximian.com>
570 * threads.c, timed-thread.c, timed-thread.h: use mach
571 semaphores on Darwin (MacOSX) since the posix ones
572 are mostly broken there (threads are not created suspended
573 and they can start executing before they are fully initialized
574 like in tests/thread-static.cs).
576 Mon Dec 22 17:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
578 * atomic.h: ppc fixes.
580 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
582 * handles.c: remove my bad use of MONO_ZERO_ARRAY_LENGTH
585 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
587 * shared.c: (_wapi_shm_open) make scratch file
588 not have to immediately regrow to avoid remaps
589 (HPUX can't cope with these).
590 (_wapi_shm_attach) use actual size of file
591 to set scratch data_len for the creating process.
593 * handles.c: (_wapi_handle_new_internal) make
594 sure mutex & cond var are initialized even for
595 non process shared ones.
596 (_wapi_handle_unref) always call destroy
597 routines on mutex & cond var
599 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
601 * daemon.c: change channel data structure so
602 input sources are removed from glib event loop
603 properly. xsp works better on Solaris and
606 2003-12-12 Bernie Solomon <bernard@ugsolutions.com>
608 * wapi-private.h: Replace G_GNUC_PRETTY_FUNCTION
609 definition with file & line number for non-GCC
612 2003-12-08 Bernie Solomon <bernard@ugsolutions.com>
614 * Makefile.am: make sure hppa_atomic.s is in distribution
616 2003-12-01 Dick Porter <dick@ximian.com>
619 * mutexes.c (CreateMutex):
620 * mutex-private.h (struct _WapiHandle_mutex):
621 * handles.c: Look up certain handle types by name, in a shared
622 namespace. Currently only mutex handles have this implemented.
625 * semaphores.c (CreateSemaphore):
626 * events.c (CreateEvent): Fix signature
628 2003-11-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
630 * io.c: don't call g_free before testing errno as it may modify it.
631 If the path exists, return an error if it's not a directory. Fixes
634 2003-11-20 Dick Porter <dick@ximian.com>
636 * io.c: Missed a little-endian UTF16 conversion. Patch from
637 Jeroen Zwartepoorte (Jeroen@xs4all.nl), fixes bug 51065.
639 2003-10-29 Dick Porter <dick@ximian.com>
641 * io.c (MoveFile): If the move crosses filesystems, try and fall
642 back to copy and delete. Patch from Jörg Rosenkranz
643 (JoergR@voelcker.com), fixes bug 50298.
645 2003-10-28 Dick Porter <dick@ximian.com>
647 * io.c: Use the new encoding conversion to cope with non-utf8
648 locales in filenames.
650 * processes.c: Ditto for process arguments.
652 Tue Oct 21 12:01:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
654 * atomic.h: some ppc inline asm fixes (incorrect use of labels,
655 incorrect register constraints, incorrect clobber lists).
657 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
659 * Makefile.am hppa_atomic.s: add HP 64bit
660 implementation of atomic ops
662 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
664 * threads.c (CreateThread): Wrap pthread_attr_setstacksize call in
665 a conditional for platforms that don't have it.
667 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
669 * threads.c: (CreateThread) use stacksize argument
670 if non-zero - change default for 64 bits to 4Mb
672 2003-09-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
674 * sockets.c: set last error when socket creation fails. This shed some
677 2003-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
679 * processes.c: fixed bug #48973: we only change \ by / for the argument
680 to be used as command.
681 When getting the program name from the args, don't let the space between
684 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
686 * atomic.h atomic.c: fix sparc so lock is
687 global, increment does so and it compiles under Sun compiler.
689 2003-09-22 Bernie Solomon <bernard@ugsolutions.com>
691 * handles.c: include <string.h> directly as may
692 not be nested in <sys/un.h> like Linux
694 2003-09-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
697 (DeleteFile): call SetLastError on failure. Fix by
698 richard.torkar@htu.se (Richard Torkar). Closes bug #48222.
700 2003-09-15 Lluis Sanchez Gual <lluis@ximian.com>
702 * daemon.c: In compare_process(), discard handles already signalled.
704 2003-09-02 Dick Porter <dick@ximian.com>
706 * io.c: Work around glib brain-dead assumptions about utf8-encoded
707 filenames. Fixes bug 30781.
709 2003-08-28 Dick Porter <dick@ximian.com>
711 * critical-sections.c: Patch from Bernie Solomon
712 <bernard@ugsolutions.com> to emit a warning if locking a critical
715 2003-07-23 Dick Porter <dick@ximian.com>
718 * daemon.c (maybe_exit): Avoid the race condition when the daemon is
719 closing but another client comes along when the shared data is still
720 visible. Should fix bugs 33671 and 35213.
722 2003-07-23 Dick Porter <dick@ximian.com>
724 * handles.c: Initialise handle mutex and cond. Fix by
725 Bernie Solomon <bernard@ugsolutions.com>
727 2003-07-15 Dick Porter <dick@ximian.com>
729 * timed-thread.c (timed_thread_start_routine): Fix virtual memory
730 leak when threads quit. Fixes bug 44067.
732 Wed Jun 18 19:08:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
734 * io.c: never add write permission for group or others in
735 SetFileAttributes ().
737 2003-06-17 Dick Porter <dick@ximian.com>
739 * io.c (SetFileAttributes): Implement the ReadOnly attribute, and
740 ignore the unsupported ones ("fixes" bug 44977).
742 2003-06-17 Lluis Sanchez Gual <lluis@ximian.com>
744 * misc.c: fix bug in _wapi_calc_timeout. It gave wrong values for
745 high ms values (there was an overflow).
747 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
749 * system.h (struct _WapiSystemInfo ): Fix warnings when using gcc-3.3.
751 2003-06-11 Dick Porter <dick@ximian.com>
753 * shared.c: Fix shared directory creation. Patch from
754 Pablo Baena <pbaena@uol.com.ar>
756 2003-06-10 Dick Porter <dick@ximian.com>
758 * atomic.c: Delete the useless compile warning
760 2003-06-09 Dick Porter <dick@ximian.com>
762 * daemon.c: Lookup env as a string array. Fixes bug 44289. Also
763 make setting the process handle value in the environment actually
766 * processes.c: Pretty up the process name, if it happens to be
767 "mono" such as when another mono process forks "mono foo.exe"
769 2003-06-05 Dick Porter <dick@ximian.com>
771 * processes.c (process_set_current): Don't do an expensive handle
772 search at application startup, check the environment to see if the
773 process handle has already been created.
775 * io.c: Don't do an expensive handle search when creating stdin,
776 stdout and stderr handles, just create them all the first time one
786 * daemon.c: Support for "unlimited" number of handles and scratch
789 Speed up application startup by passing process handle in the
790 environment, rather than let the app scan all handles (which gets
791 really slow when there are more than a few thousand to check.)
793 Initialise some structs passed to syscalls, noticed by valgrind.
796 2003-05-20 Dick Porter <dick@ximian.com>
798 * io.c (FindFirstFile): Include . files in the glob. Fixes bug
801 2003-05-19 Dick Porter <dick@ximian.com>
803 * threads.c: Set the new thread's stack size to 2M. Fix needed
804 for BSD, reported by Martin Dvorak <md@9ll.cz>
806 2003-05-16 Dick Porter <dick@ximian.com>
809 * io.c: Implement GetTempPath()
811 2003-05-16 Dick Porter <dick@ximian.com>
813 * processes.c (CreateProcess): Set some error codes
815 2003-05-12 Dick Porter <dick@ximian.com>
817 * misc.c (_wapi_calc_timeout): Cope with overflowing tv_nsec.
818 Patch from Martin Dvorak <mdvorak@ninell.cz>.
820 2003-05-10 Dick Porter <dick@ximian.com>
822 * io.c (CopyFile): Copy file mode as well as file data. Based on
823 suggestion by Giuseppe Greco <giuseppe.greco@agamura.com>, bug
826 2003-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
828 * handles.c: don't call GC_gcollect when creating new handles.
830 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
832 * handles.c: added some debugging code. Call GC_gcollect
833 before creating a new handle. It makes Lupus' test run smoother and
834 faster (from 62 to 83 request per second). Notice that calling
835 GC_finalizer_notifier if needed (GC_should_invoke_finalizer ()) does
836 not improve nor degrade the performance, so i don't do it.
838 2003-05-02 Dick Porter <dick@ximian.com>
840 * sockets.c: Rearrange closesocket() and socket_close_private(),
841 and remember to unref the handle, so we don't leak socket handles.
842 Fix from Pelle Johnsen <pelle.johnsen@mail.dk>
844 2003-04-11 Dick Porter <dick@ximian.com>
846 * atomic.h: ARM atomic operations by Malte Hildingson
847 <tds00mahi@tellus.thn.htu.se>
849 Tue Apr 8 11:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
851 * atomic.h: fix macosx build by "Urs C. Muff" <umuff@quark.com>.
853 2003-04-03 Martin Baulig <martin@ximian.com>
855 The following change is conditional to `WITH_INCLUDED_LIBGC'
856 which is not yet enabled by default.
858 * threads.c (SuspendThread, ResumeThread): Fully implemented this.
859 (gc_init): New static function; install a signal handler for
860 SIGPWR which is used to suspend threads. [FIXME: it SIGPWR
861 doesn't exist on all Unix systems, we need to find another
863 (mono_wapi_push_thread_stack): New public function. Tells the
864 garbage collector about the current stack pointer of a suspended
867 2003-04-03 Martin Baulig <martin@ximian.com>
869 * timed-thread.h (TimedThread): Added `suspended_sem',
870 `suspend_count' and `stack_ptr'.
872 2003-03-28 Dick Porter <dick@ximian.com>
874 * atomic.h: PPC support gratiously donated to the public domain
875 by John Duncan <jddst19@mac.com>
877 2003-03-20 Dick Porter <dick@ximian.com>
879 * sockets.c (_wapi_connect): If connect() fails with EACCES, try
880 setting SO_BROADCAST and connecting again. Fixes bug 39178.
882 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
884 * processes.c: included Jerome Laban's patch and call SetLastError when
885 the executable is not found.
887 2003-03-03 Dick Porter <dick@ximian.com>
889 * io.c (CreateFile): Try opening directories readonly, so that
890 timestamps can be adjusted. Patch by Elan Feingold
891 <efeingold@mn.rr.com>.
893 2003-02-25 Dick Porter <dick@ximian.com>
895 * shared.c (_wapi_shm_attach): Return a failure code on system
896 call errors, rather than exiting.
898 2003-02-21 Dick Porter <dick@ximian.com>
900 * processes.c (GetCurrentProcessId): Use the current process
901 handle to return the process ID, as getpid() is unreliable
902 (linuxthreads gives each thread a different pid). Fixes bug
905 2003-02-21 Dick Porter <dick@ximian.com>
907 * io.c (FindNextFile): Skip over dangling symlinks. Fixes bug
910 2003-02-11 Dick Porter <dick@ximian.com>
913 * timefuncs.c: Added GetTickCount()
915 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
917 * error.c: added WSA_EHOSTUNREACH mapping.
919 2003-01-26 Miguel de Icaza <miguel@ximian.com>
921 * io.c (SetFileAttributes): This routine is not currently
922 implemented for the general case, but I added a special case to
923 set the executable bit on Linux.
925 Wed Jan 15 15:55:40 CET 2003 Paolo Molaro <lupus@ximian.com>
927 * sockets.h, daemon.c, io.c: compilation fixes on MacOSX.
929 2003-01-08 Dick Porter <dick@ximian.com>
931 * sockets.c: Fixed setting blocking mode to true (fixes bug 36388)
933 2002-12-11 Juli Mallett <jmallett@FreeBSD.org>
935 * daemon.c, handles-private.h, handles.c, wapi-private.h:
936 Check for an implementation which says it supports
937 _POSIX_THREAD_PROCESS_SHARED, rather than just one that
938 defines the symbol. Defined but with a value of -1 still
939 means that it is unsupported.
941 2002-12-08 Martin Baulig <martin@ximian.com>
943 * handles.c (_wapi_handle_new): Create new non-shared handles with
944 an initial refcount of 1, not 0.
946 2002-11-22 Dietmar Maurer <dietmar@ximian.com>
948 * threads.c (TlsGetValue): removed unnecessary mutex
950 2002-11-20 Dick Porter <dick@ximian.com>
952 * timed-thread.c (_wapi_timed_thread_attach): Attached threads
953 need to store their data structure too.
955 * threads.c: Make sure the threading data is initialised wherever
958 2002-11-15 Dick Porter <dick@ximian.com>
960 * timed-thread.c: Removed unneeded parameters in
961 _wapi_timed_thread_attach().
963 * threads.c: Renamed AttachThread() to make it not look like
964 external API. Removed unneeded parameters.
966 2002-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
968 * error.[ch]: added errno_to_WSA (). It displays a warning and return
969 WSASYSCALLFAILURE if there is no error mapping for the given errno,
971 * sockets.c: use errno_to_WSA and fixed display of warning for h_errno.
973 2002-10-31 Dick Porter <dick@ximian.com>
976 * io.c: Define and use INVALID_FILE_ATTRIBUTES
978 2002-10-07 Dick Porter <dick@ximian.com>
981 * daemon.c: Use a more accurate time source for process start and
984 2002-10-03 Dick Porter <dick@ximian.com>
988 * threads.c: Fixes for freebsd. Make sure that mutex and condition
989 creation and deletion happen in the process that owns them, when
990 POSIX shared thread objects aren't supported. This breaks on
991 freebsd, as pthread_t is a pointer to data.
993 2002-10-02 Dick Porter <dick@ximian.com>
995 * shared.c: Use mmap() instead of sysv shm for the shared data.
997 * wapi-private.h (_WAPI_HANDLE_VERSION): Reset back to 0, for the
1001 * daemon.c: mmap()ed regions survive fork, so just pass the
1002 pointer to _wapi_daemon_main instead of mapping it again.
1004 2002-10-01 Dick Porter <dick@ximian.com>
1006 * timed-thread.c: Kludge for CREATE_SUSPENDED thread creation.
1007 Unfortunately libgc uses the same thread suspend technique that I
1008 want to, and the two don't mix: libgc will deadlock when it tries
1009 to stop the world if a thread has already been suspended by
1010 someone else. Just do the simple suspended create rather than the
1011 general purpose thread suspension for now.
1013 * threads.c: Pass create flags to the timed_thread create call, to
1014 implement suspended thread creation. ResumeThread() partially
1015 implemented, to cope with the case where a newly created but
1016 suspended thread is launched.
1018 2002-09-30 Dick Porter <dick@ximian.com>
1020 * sockets.c (ioctlsocket): Set non-blocking mode in a better way,
1023 2002-09-27 Dick Porter <dick@ximian.com>
1025 * semaphores.c: Only include semaphore.h if it's present. Patch
1026 for BSD from jmmv@hispabsd.org (Julio Merino).
1028 2002-09-27 Dick Porter <dick@ximian.com>
1030 * processes.c: Pass environment and working directory to the
1031 daemon when forking. Don't let argv[0] be duplicated when looking
1032 for the program name. Implement EnumProcessModules (simple
1033 version for now, lsof-style later if needed), GetModuleBaseName,
1034 {Get,Set}ProcessWorkingSetSize (just faked, because the vm hints
1035 aren't available on Linux).
1037 * process-private.h: Store the process name, and the working set
1041 * handles-private.h: New functions to store and retrieve an array
1042 of strings in the scratch space
1044 * daemon.c: Don't miss deleting some handles when a client exits
1045 (we used to rely on the client doing the final cleanup, but
1046 obviously if the client is no longer there the daemon has to do
1049 Process forking now sets the environment and the working
1052 * io.c: Don't confuse fd 0 with an unassigned handle struct
1054 * atomic.h: Add a google cache alternative to the msdn URL
1056 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1059 (_wapi_recvfrom): added ECONNRESET to the switch.
1061 2002-09-24 Mark Crichton <crichton@gimp.org>
1063 * atomic.h: Yea. On linux, sparc isn't sparc, it's __sparc__.
1066 2002-09-19 Mark Crichton <crichton@gimp.org>
1068 * daemon.c, shared.c: Added NEED_LINK_UNLINK for systems that
1069 dont have Linux's abstract filesystem for sockets.
1071 2002-09-19 Mark Crichton <crichton@gimp.org>
1073 * atomic.h: Added SPARC atomic asm code.
1074 * daemon.c, handles-private.h, handles.c, wapi-private.h:
1075 undefined _POSIX_THREAD_PROCESS_SHARED. This actually exists on
1076 Solaris 9, however, the code paths don't seem to work. More testing
1077 on the shared case is *really* needed.
1079 2002-09-03 Dick Porter <dick@ximian.com>
1082 * threads.c: Removed PosixKillThread(), because it's not in the
1085 2002-08-20 Dick Porter <dick@ximian.com>
1087 * handles.c (_wapi_handle_scratch_store): Made stored byte lengths
1088 multiples of 4 bytes, to keep header structures aligned. Needed
1089 for sparc, at least. (Patch from crichton@gimp.org)
1091 * handles.c: Removed 'disable_shm' variable (we've defaulted to
1092 building with shm enabled for months now)
1094 2002-08-19 Dick Porter <dick@ximian.com>
1096 * daemon.c: Rewrote the poll() loop to use GIOChannels instead,
1097 for legacy NeXT-based systems.
1099 2002-08-12 Dick Porter <dick@ximian.com>
1101 * atomic.h: Rename some parameters to avoid c++ keywords (Patch
1102 from Joseph Wenninger <kde@jowenn.at>)
1104 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
1106 * threads.c: use fast spinlocks by default
1108 2002-08-02 Dick Porter <dick@ximian.com>
1110 * io.c (GetStdHandle): Add a handle reference when returning a
1111 duplicate console handle. This fixes the unref_handle errors in
1114 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
1116 * threads.c (TLS_PTHREAD_MUTEX): define this because else some
1119 2002-08-01 Dick Porter <dick@ximian.com>
1121 * threads.c: Use atomic spinlocks in TLS functions
1124 * Makefile.am: Added mono-spinlock.h
1126 2002-07-21 Jeffrey Stedfast <fejj@ximian.com>
1128 * daemon-messages.c: #include <sys/types.h> and <sys/sockets.h> -
1129 these are needed for sendmsg() and also for struct msghdr (at
1130 least on Solaris). Solaris still won't build because struct msghdr
1131 doesn't have msg_flags, msg_control, or msg_controllen members.
1132 (CMSG_SPACE): Define for systems that don't have it.
1135 2002-07-20 Dick Porter <dick@ximian.com>
1141 * handles.c: Implemented pipe handles
1144 * daemon.c: Fixed bug in handle closing.
1147 * daemon.c: Forked processes now close all open file descriptors.
1149 Fri Jul 19 19:05:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
1151 * sockets.h, io-layer.h, critical-sections.h: don't include config.h
1154 2002-07-19 Martin Baulig <martin@gnome.org>
1156 * threads.c (ExitThread): Call exit() if no threads has been
1159 2002-07-17 Dick Porter <dick@ximian.com>
1161 * daemon-messages.c: Freebsd fixes from Andreas Kohn
1162 <andreas.kohn@gmx.net>
1164 2002-07-15 Dick Porter <dick@ximian.com>
1166 * io.c: Removed bogus console_flush() method, that was just cut
1167 and pasted from file_flush when I separated the two handle types.
1169 2002-07-12 Dick Porter <dick@ximian.com>
1171 * io.c (convert_from_flags): Fixed misunderstanding wrt fcntl
1172 flags. Fixes bug 27633.
1174 2002-07-12 Dick Porter <dick@ximian.com>
1178 * daemon.c: Use size of sockaddr_un.sun_path from config.h
1180 2002-07-12 Dick Porter <dick@ximian.com>
1182 * processes.c (CreateProcess): Send stdin, stdout and stderr
1183 handles if the startup info doesnt specify new ones
1185 * io.c (GetStdHandle): Return the same handle when the same
1186 standard handle is requested
1188 * handles.c: Pass file descriptors when forking
1190 * daemon.c: Use supplied file descriptors when forking a new
1193 * daemon-messages.h:
1194 * daemon-messages.c: Pass stdin, stdout and stderr file
1195 descriptors to the daemon (used when forking)
1197 2002-07-11 Miguel de Icaza <miguel@ximian.com>
1199 * daemon.c (_wapi_daemon_main): Use sizeof
1200 (main_socket_address.sun_path) instead of hardcoded 108 value.
1202 * handles.c (shared_init): Use sizeof
1203 (shared_socket_address.sun_path) instead of hardcoded 108 value.
1205 2002-07-10 Dennis Haney <davh@davh.dk>
1209 * daemon.c: Lots of documentation, some added error checking, and
1210 code readability improvements.
1212 * daemon-messages.h: Add the Error request type to improve error
1215 * daemon-messages.c: Do a bit more error checking on send() and
1216 recv(), and log errors with a higher severity level.
1218 2002-07-04 Dick Porter <dick@ximian.com>
1220 * daemon.c (process_process_fork): Fix argument handling, due to
1221 buggy understanding of g_strsplit() behaviour.
1223 2002-07-03 Dick Porter <dick@ximian.com>
1226 * threads.c: Implement OpenThread(). Define access-control values
1232 * Makefile.am: Added access.h, to hold shared access-control
1235 2002-07-02 Dick Porter <dick@ximian.com>
1237 * wapi-private.h (_WAPI_HANDLE_VERSION): New protocol version
1239 2002-07-02 Dick Porter <dick@ximian.com>
1241 * handles.c (shared_init): Make a second attempt to contact the
1242 daemon if the shared memory attach succeeds, but the connect()
1243 fails. (This copes with the daemon crashing without cleaning up
1249 * shared.c (_wapi_shm_attach): Don't exec() anything when we fork
1250 the daemon, it's now built into the library.
1252 2002-06-25 Dick Porter <dick@ximian.com>
1255 * handles-private.h:
1256 * daemon-messages.h:
1257 * daemon.c: Process forking and handle data management
1260 * process-private.h:
1261 * processes.c: Process forking and other support functions
1263 2002-06-25 Dick Porter <dick@ximian.com>
1265 * versioninfo.h: PE resource decoding
1267 * unicode.c (_wapi_unicode_to_utf8): g_utf16_to_utf8 doesnt need
1268 to be told the string length
1270 * io.c: Removed the ACTUALLY_DO_UNICODE option. Fixed some leaks.
1271 Moved _wapi_time_t_to_filetime and the WapiFileTime typedef to
1274 2002-06-12 Dick Porter <dick@ximian.com>
1277 * daemon-messages.c: Handle SIGPIPE in a non-stupid way in the
1278 daemon, if MSG_NOSIGNAL isn't available. Thanks to Jaroslaw
1279 Kowalski <jarek@atm.com.pl> for pointing out the bogosity.
1281 2002-06-10 Jaroslaw Kowalski <jarek@atm.com.pl>
1283 * sockets.c, daemon-messages.c: Prevent SIGPIPE from being raised
1284 when writing to a closed socket.
1286 2002-06-08 Jeffrey Stedfast <fejj@ximian.com>
1288 * mono-mutex.c (mono_once): New convenience function for my
1293 * critical-sections.c:
1301 * atomic.c: Use mono_once() rather than pthread_once().
1303 2002-06-06 Jeffrey Stedfast <fejj@ximian.com>
1305 * handles.c (_wapi_handle_new): pthread_once() is not atomic, so
1306 if multiple threads all try to call _wapi_handle_new() before the
1307 shared data has been initialized, it is possible that we could get
1308 into a condition where shared_init() is being executed and later
1309 threads will pass by pthread_once() due to the fact that it has
1310 already been called and so therefor will attempt to use the shared
1311 data before it has been completely initialized. If we instead use
1312 a standard mutex locking mechanism around shared_init(), we can
1313 avoid the situation entirely. By wrapping the mutex locking in a
1314 check to see if we've already initialized the data, we can even
1315 avoid wasting resources by having to lock/unlock the mutex in any
1316 later calls (the only time we'd have to worry about
1317 locking/unlocking is the initial race to call shared_init() at
1320 Sat Jun 1 13:27:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
1322 * atomic.h: inline asm fixes from Dennis Haney (davh@davh.dk).
1324 Fri May 31 16:21:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
1326 * daemon.c, handles.c: rename "sun" local var since it's apparently
1327 a #define on Solaris.
1329 Fri May 31 15:40:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
1331 * daemon-messages.c: work-around MSG_NOSIGNAL missing on some
1334 2002-05-15 Dick Porter <dick@ximian.com>
1336 * wait.c: Fix a deadlock in WaitForMultipleObjects
1338 2002-05-14 Dick Porter <dick@ximian.com>
1340 * io.c: Fix a cut&paste error, found by
1341 Jaroslaw Kowalski <jarek@atm.com.pl>
1343 2002-05-10 Dan Lewis <dihlewis@yahoo.co.uk>
1347 2002-05-09 Dick Porter <dick@ximian.com>
1353 * handles-private.h:
1355 * Makefile.am: Remove now-unused file wait-private.h
1357 2002-05-08 Dick Porter <dick@ximian.com>
1359 * shared.c: Better error messages, and report when daemon
1360 connection fails rather than blocking forever. Do some more
1361 shared memory sanity checking.
1363 * handles.c: Better error messages when connecting to shared
1364 memory and the handle daemon. Fall back to non-shared handles if
1365 an error occurs. Set the default back to 'shared handles'. Fix a
1366 crashing bug in scratch space allocation that mangled the block
1369 2002-05-07 Miguel de Icaza <miguel@ximian.com>
1371 * handles.c (shared_init): Disable SHM for now, people have too
1372 many problems with this, and the diagnostics are not helping.
1374 2002-05-06 Dan Lewis <dihlewis@yahoo.co.uk>
1376 * io.c: CreateFile sets win32 last error.
1378 2002-05-05 Dick Porter <dick@ximian.com>
1381 * handles-private.h:
1387 * process-private.h:
1389 * semaphore-private.h:
1393 * event-private.h: Simplify the WapiHandleOps struct: take out all
1394 the file-specific entries, leaving just the items that operate on
1395 handles themselves. Split the close operation into shared and
1396 private parts: shared close is called by the daemon.
1398 * handles.c: As above, but also pass handle allocation, ref and
1399 unref operations to the daemon. Populate the handle_ops array at
1400 compile time, because the daemon needs to call ops on handles too.
1401 Don't bother to track open handle counts any more, the daemon does
1405 * thread-private.h: As above, but also make the thread data
1408 * shared.c: Fork a handle daemon if the calling process created
1409 the shared memory segment.
1412 * daemon-messages.c:
1413 * daemon-messages.h:
1414 * Makefile.am: Build a daemon to manage handle allocation and
1415 destruction without needing to lock the shared memory
1417 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
1419 * atomic.c: Changed to use a normal mutex rather than a spinlock
1420 since a lot of platforms seem to not have them :\
1422 2002-04-30 Dick Porter <dick@ximian.com>
1424 * Completely rewrote the handle waiting code: removed the helper
1425 thread and its attendant complexity. All handle waiting is now
1426 abstracted into the WaitForSingleObject() and
1427 WaitForMultipleObjects() functions.
1429 * Implemented inter-process sharing of handles using sysv shared
1430 memory. This makes handles even more opaque, with a handle now
1431 just an index into an array.
1433 2002-04-25 Dan Lewis <dihlewis@yahoo.co.uk>
1435 * io.c: unitialized pointer in GetCurrentDirectory.
1437 Sat Apr 20 13:37:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
1439 * threads.c: destroy the mutex at thread destruction
1440 (if/when thread destruction code will be actually called).
1441 When protecting a tls data pointer from the gc, use also the
1442 thread id in the key.
1444 Wed Apr 17 18:36:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
1446 * timed-thread.c: avoid race condition when setting the thread to
1449 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1451 * jit.h: to more #include lines to avoid breaking compilation
1452 under windows when upgrading mingw and w32api to version
1455 2002-04-16 Dick Porter <dick@ximian.com>
1457 * atomic.h: Explanatory comment about lack of 80386 support
1459 2002-04-15 Dick Porter <dick@ximian.com>
1461 * atomic.h: use xaddl for InterlockedIncrement() and
1462 InterlockedDecrement(). Use cmpxchgl in a loop for
1463 InterlockedExchange() and InterlockedExchangePointer().
1465 Mon Apr 15 13:31:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
1467 * unicode.c: fix unicode_len() to not access uninitialized memory
1468 (and updated to conform to mono code style).
1470 Fri Mar 29 17:15:11 CET 2002 Paolo Molaro <lupus@ximian.com>
1472 * io.c: EEXISTS is ignored for directory creation.
1473 * mono-mutex.h: remove silly "pragma }" that emacs users insert
1474 because they use a broken editor:-)
1476 2002-03-28 Dick Porter <dick@ximian.com>
1482 * handles.c: Warning cleanups
1484 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
1486 * unicode.h, unicode.c: changed to gunichar2
1487 * io.h, io.c: changed strings to gunichar2*, added
1488 SetFileAttributes(), GetCurrentDirectory(), SetCurrentDirectory(),
1489 some fixes to FindFirstFile() and friends.
1491 2002-03-26 Dick Porter <dick@ximian.com>
1493 * types.h: Implement the large integer struct
1496 * timefuncs.c: Dummy functions that don't yet implement
1497 QueryPerformanceCounter() and QueryPerformanceFrequency()
1500 * threads.c: Implement SleepEx()
1503 * system.c: Beginnings of GetSystemInfo()
1505 * mono-mutex.c (pthread_mutex_timedlock): Fix a ms/ns conversion
1509 * context.c: Dummy function that doesnt yet implement
1513 * atomic.c: Interlocked functions
1515 Mon Mar 25 13:01:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1517 * threads.c: use a gc-safe hash table to store tls pointers.
1519 2002-03-22 Dick Porter <dick@ximian.com>
1521 * threads.c: Fix a race condition where a thread can start and
1522 exit before the handle has been properly initialised (no reason
1523 why the handle couldn't be initialised beforehand, so do so)
1525 Fix a ms to ns conversion magnitude thinko.
1527 2002-03-21 Dick Porter <dick@ximian.com>
1529 * semaphores.c: Fix a problem when waiting for one or more
1530 semaphores, and another semaphore is Released (all waiting
1531 semaphores assumed they were signalled)
1533 2002-03-29 Dan Lewis <dihlewis@yahoo.co.uk>
1535 * io.h, io.c, uglify.h: added MoveFile, CopyFile, CreateDirectory,
1536 RemoveDirectory, GetFileAttributes, GetFileAttributesEx
1538 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
1540 * threads.c (Sleep): bug fix: 1ms == 1000000ns
1542 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
1544 * io.h, io.c, events.c, mutexes.c, semaphores.c, sockets.c,
1545 threads.c, io.c: added flush method to handles.
1547 * io.c: FlushFileBuffers() and FindFirstFile() functions.
1549 Thu Mar 7 17:21:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1551 * threads.c, timed-thread.c, wait.c: Boehm-GC anable.
1553 2002-02-20 Dick Porter <dick@ximian.com>
1555 * io-layer.h: Always build without cygwin support on windows
1557 Mon Feb 18 15:50:59 CET 2002 Paolo Molaro <lupus@ximian.com>
1559 * sockets.c: #undef DEBUG.
1561 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
1563 * io-layer.h: conditionally include sys/filio.h and sys/sockio.h
1564 for FIONBIO, FIONREAD, and SIOCATMARK.
1566 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
1568 * sockets.c: conditionally include sys/filio.h and sys/sockio.h
1569 for FIONBIO, FIONREAD, and SIOCATMARK.
1571 2002-02-13 Dick Porter <dick@ximian.com>
1573 * sockets.c: Implement shutdown and select
1575 2002-02-13 Jeffrey Stedfast <fejj@ximian.com>
1577 * mono-mutex.[c,h]: New source files that thinly wrap all pthread
1578 functions that take pthread_mutex_t and/or pthread_mutexattr_t
1579 arguments for the sake of portability. Implements recursive
1580 mutexes and pthread_mutex_timedlock.
1582 * critical-sections.c:
1589 * wait.c: Use the mono-mutex wrapper portability functions/macros.
1591 * pthread-compat.[c,h]: Replaced by mono-mutex.[c,h]
1593 2002-01-23 Dick Porter <dick@ximian.com>
1595 * sockets.c: Networking support, mostly wrapping BSD socket APIs
1596 with handle code, and translating errno into w32 error codes.
1598 * macros.h: Some w32 macros used with the socket support
1600 * error.c: Implemented GetLastError() and SetLastError()
1602 * Makefile.am: Added sockets, with kludge to override some symbols
1604 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
1606 * unicode.c (_wapi_unicode_to_utf8): byteswap UTF16 strings before
1607 passing them to iconv
1608 (_wapi_unicode_to_utf8): only swap bytes on LE systems, remove bug
1609 from previous commit.
1611 2001-12-11 Dick Porter <dick@ximian.com>
1613 * io.c: Implement DeleteFile(), GetFileTime(), SetFileTime() and
1614 FileTimeToSystemTime().
1616 * unicode.c (unicode_len): Nasty way of finding length of unicode
1617 string with embedded NULLs (counts until two NULLs together).
1619 * mutexes.c (mutex_close):
1620 * events.c (event_close): Release the internal pthreads resources
1622 2001-11-26 Dick Porter <dick@ximian.com>
1624 * critical-sections.c:
1632 * wait.c: turn off DEBUG messages
1634 2001-11-22 Dick Porter <dick@ximian.com>
1636 * handles.c (SignalObjectAndWait): Implement
1638 * wait.c (WaitForSingleObject): Fix case where timeout == 0
1644 * events.c: Support for SignalObjectAndWait
1646 2001-11-21 Dick Porter <dick@ximian.com>
1653 * wait.c: Reliable method of returning which handle was signalled
1654 on return from WaitForMultipleObjects().
1656 2001-11-21 Dick Porter <dick@ximian.com>
1658 * events.c: Implement events
1660 2001-11-15 Dick Porter <dick@ximian.com>
1662 * mutexes.c: Implement mutexes
1666 * misc.c: Factor out some common code
1668 2001-11-13 Dick Porter <dick@ximian.com>
1670 * threads.c: Implement TLS. Implement GetCurrentThreadId(), and
1671 GetCurrentThread() by maintaining a hash of thread handles.
1673 * threads.h: Define thread and process creation flags
1675 2001-11-12 Dick Porter <dick@ximian.com>
1677 * critical-sections.c: Implement critical sections
1679 2001-11-12 Dick Porter <dick@ximian.com>
1681 * semaphores.c: Implement semaphores
1683 * wait.c (wait_for_item): Maintain a wait count rather than count
1686 * threads.c (thread_wait_multiple): Don't lock the wait item, that
1687 will block other wait threads
1689 2001-11-11 Dick Porter <dick@ximian.com>
1691 * Makefile.am: Rename some automake variables
1692 (from Nick Drochak <ndrochak@gol.com>)
1694 2001-11-10 Dick Porter <dick@ximian.com>
1696 * Makefile.am (libwapiincludedir): Fix include destination
1698 * .cvsignore: Ignore generated files
1700 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
1702 * pthread-compat.c: added some include files to make it compile on
1705 2001-11-08 Dick Porter <dick@ximian.com>
1709 This is a library emulating the win32 threading and IO API.