1 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4 (_wapi_recvfrom): added ECONNRESET to the switch.
6 2002-09-24 Mark Crichton <crichton@gimp.org>
8 * atomic.h: Yea. On linux, sparc isn't sparc, it's __sparc__.
11 2002-09-19 Mark Crichton <crichton@gimp.org>
13 * daemon.c, shared.c: Added NEED_LINK_UNLINK for systems that
14 dont have Linux's abstract filesystem for sockets.
16 2002-09-19 Mark Crichton <crichton@gimp.org>
18 * atomic.h: Added SPARC atomic asm code.
19 * daemon.c, handles-private.h, handles.c, wapi-private.h:
20 undefined _POSIX_THREAD_PROCESS_SHARED. This actually exists on
21 Solaris 9, however, the code paths don't seem to work. More testing
22 on the shared case is *really* needed.
24 2002-09-03 Dick Porter <dick@ximian.com>
27 * threads.c: Removed PosixKillThread(), because it's not in the
30 2002-08-20 Dick Porter <dick@ximian.com>
32 * handles.c (_wapi_handle_scratch_store): Made stored byte lengths
33 multiples of 4 bytes, to keep header structures aligned. Needed
34 for sparc, at least. (Patch from crichton@gimp.org)
36 * handles.c: Removed 'disable_shm' variable (we've defaulted to
37 building with shm enabled for months now)
39 2002-08-19 Dick Porter <dick@ximian.com>
41 * daemon.c: Rewrote the poll() loop to use GIOChannels instead,
42 for legacy NeXT-based systems.
44 2002-08-12 Dick Porter <dick@ximian.com>
46 * atomic.h: Rename some parameters to avoid c++ keywords (Patch
47 from Joseph Wenninger <kde@jowenn.at>)
49 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
51 * threads.c: use fast spinlocks by default
53 2002-08-02 Dick Porter <dick@ximian.com>
55 * io.c (GetStdHandle): Add a handle reference when returning a
56 duplicate console handle. This fixes the unref_handle errors in
59 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
61 * threads.c (TLS_PTHREAD_MUTEX): define this because else some
64 2002-08-01 Dick Porter <dick@ximian.com>
66 * threads.c: Use atomic spinlocks in TLS functions
69 * Makefile.am: Added mono-spinlock.h
71 2002-07-21 Jeffrey Stedfast <fejj@ximian.com>
73 * daemon-messages.c: #include <sys/types.h> and <sys/sockets.h> -
74 these are needed for sendmsg() and also for struct msghdr (at
75 least on Solaris). Solaris still won't build because struct msghdr
76 doesn't have msg_flags, msg_control, or msg_controllen members.
77 (CMSG_SPACE): Define for systems that don't have it.
80 2002-07-20 Dick Porter <dick@ximian.com>
86 * handles.c: Implemented pipe handles
89 * daemon.c: Fixed bug in handle closing.
92 * daemon.c: Forked processes now close all open file descriptors.
94 Fri Jul 19 19:05:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
96 * sockets.h, io-layer.h, critical-sections.h: don't include config.h
99 2002-07-19 Martin Baulig <martin@gnome.org>
101 * threads.c (ExitThread): Call exit() if no threads has been
104 2002-07-17 Dick Porter <dick@ximian.com>
106 * daemon-messages.c: Freebsd fixes from Andreas Kohn
107 <andreas.kohn@gmx.net>
109 2002-07-15 Dick Porter <dick@ximian.com>
111 * io.c: Removed bogus console_flush() method, that was just cut
112 and pasted from file_flush when I separated the two handle types.
114 2002-07-12 Dick Porter <dick@ximian.com>
116 * io.c (convert_from_flags): Fixed misunderstanding wrt fcntl
117 flags. Fixes bug 27633.
119 2002-07-12 Dick Porter <dick@ximian.com>
123 * daemon.c: Use size of sockaddr_un.sun_path from config.h
125 2002-07-12 Dick Porter <dick@ximian.com>
127 * processes.c (CreateProcess): Send stdin, stdout and stderr
128 handles if the startup info doesnt specify new ones
130 * io.c (GetStdHandle): Return the same handle when the same
131 standard handle is requested
133 * handles.c: Pass file descriptors when forking
135 * daemon.c: Use supplied file descriptors when forking a new
139 * daemon-messages.c: Pass stdin, stdout and stderr file
140 descriptors to the daemon (used when forking)
142 2002-07-11 Miguel de Icaza <miguel@ximian.com>
144 * daemon.c (_wapi_daemon_main): Use sizeof
145 (main_socket_address.sun_path) instead of hardcoded 108 value.
147 * handles.c (shared_init): Use sizeof
148 (shared_socket_address.sun_path) instead of hardcoded 108 value.
150 2002-07-10 Dennis Haney <davh@davh.dk>
154 * daemon.c: Lots of documentation, some added error checking, and
155 code readability improvements.
157 * daemon-messages.h: Add the Error request type to improve error
160 * daemon-messages.c: Do a bit more error checking on send() and
161 recv(), and log errors with a higher severity level.
163 2002-07-04 Dick Porter <dick@ximian.com>
165 * daemon.c (process_process_fork): Fix argument handling, due to
166 buggy understanding of g_strsplit() behaviour.
168 2002-07-03 Dick Porter <dick@ximian.com>
171 * threads.c: Implement OpenThread(). Define access-control values
177 * Makefile.am: Added access.h, to hold shared access-control
180 2002-07-02 Dick Porter <dick@ximian.com>
182 * wapi-private.h (_WAPI_HANDLE_VERSION): New protocol version
184 2002-07-02 Dick Porter <dick@ximian.com>
186 * handles.c (shared_init): Make a second attempt to contact the
187 daemon if the shared memory attach succeeds, but the connect()
188 fails. (This copes with the daemon crashing without cleaning up
194 * shared.c (_wapi_shm_attach): Don't exec() anything when we fork
195 the daemon, it's now built into the library.
197 2002-06-25 Dick Porter <dick@ximian.com>
202 * daemon.c: Process forking and handle data management
206 * processes.c: Process forking and other support functions
208 2002-06-25 Dick Porter <dick@ximian.com>
210 * versioninfo.h: PE resource decoding
212 * unicode.c (_wapi_unicode_to_utf8): g_utf16_to_utf8 doesnt need
213 to be told the string length
215 * io.c: Removed the ACTUALLY_DO_UNICODE option. Fixed some leaks.
216 Moved _wapi_time_t_to_filetime and the WapiFileTime typedef to
219 2002-06-12 Dick Porter <dick@ximian.com>
222 * daemon-messages.c: Handle SIGPIPE in a non-stupid way in the
223 daemon, if MSG_NOSIGNAL isn't available. Thanks to Jaroslaw
224 Kowalski <jarek@atm.com.pl> for pointing out the bogosity.
226 2002-06-10 Jaroslaw Kowalski <jarek@atm.com.pl>
228 * sockets.c, daemon-messages.c: Prevent SIGPIPE from being raised
229 when writing to a closed socket.
231 2002-06-08 Jeffrey Stedfast <fejj@ximian.com>
233 * mono-mutex.c (mono_once): New convenience function for my
238 * critical-sections.c:
246 * atomic.c: Use mono_once() rather than pthread_once().
248 2002-06-06 Jeffrey Stedfast <fejj@ximian.com>
250 * handles.c (_wapi_handle_new): pthread_once() is not atomic, so
251 if multiple threads all try to call _wapi_handle_new() before the
252 shared data has been initialized, it is possible that we could get
253 into a condition where shared_init() is being executed and later
254 threads will pass by pthread_once() due to the fact that it has
255 already been called and so therefor will attempt to use the shared
256 data before it has been completely initialized. If we instead use
257 a standard mutex locking mechanism around shared_init(), we can
258 avoid the situation entirely. By wrapping the mutex locking in a
259 check to see if we've already initialized the data, we can even
260 avoid wasting resources by having to lock/unlock the mutex in any
261 later calls (the only time we'd have to worry about
262 locking/unlocking is the initial race to call shared_init() at
265 Sat Jun 1 13:27:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
267 * atomic.h: inline asm fixes from Dennis Haney (davh@davh.dk).
269 Fri May 31 16:21:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
271 * daemon.c, handles.c: rename "sun" local var since it's apparently
272 a #define on Solaris.
274 Fri May 31 15:40:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
276 * daemon-messages.c: work-around MSG_NOSIGNAL missing on some
279 2002-05-15 Dick Porter <dick@ximian.com>
281 * wait.c: Fix a deadlock in WaitForMultipleObjects
283 2002-05-14 Dick Porter <dick@ximian.com>
285 * io.c: Fix a cut&paste error, found by
286 Jaroslaw Kowalski <jarek@atm.com.pl>
288 2002-05-10 Dan Lewis <dihlewis@yahoo.co.uk>
292 2002-05-09 Dick Porter <dick@ximian.com>
300 * Makefile.am: Remove now-unused file wait-private.h
302 2002-05-08 Dick Porter <dick@ximian.com>
304 * shared.c: Better error messages, and report when daemon
305 connection fails rather than blocking forever. Do some more
306 shared memory sanity checking.
308 * handles.c: Better error messages when connecting to shared
309 memory and the handle daemon. Fall back to non-shared handles if
310 an error occurs. Set the default back to 'shared handles'. Fix a
311 crashing bug in scratch space allocation that mangled the block
314 2002-05-07 Miguel de Icaza <miguel@ximian.com>
316 * handles.c (shared_init): Disable SHM for now, people have too
317 many problems with this, and the diagnostics are not helping.
319 2002-05-06 Dan Lewis <dihlewis@yahoo.co.uk>
321 * io.c: CreateFile sets win32 last error.
323 2002-05-05 Dick Porter <dick@ximian.com>
334 * semaphore-private.h:
338 * event-private.h: Simplify the WapiHandleOps struct: take out all
339 the file-specific entries, leaving just the items that operate on
340 handles themselves. Split the close operation into shared and
341 private parts: shared close is called by the daemon.
343 * handles.c: As above, but also pass handle allocation, ref and
344 unref operations to the daemon. Populate the handle_ops array at
345 compile time, because the daemon needs to call ops on handles too.
346 Don't bother to track open handle counts any more, the daemon does
350 * thread-private.h: As above, but also make the thread data
353 * shared.c: Fork a handle daemon if the calling process created
354 the shared memory segment.
359 * Makefile.am: Build a daemon to manage handle allocation and
360 destruction without needing to lock the shared memory
362 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
364 * atomic.c: Changed to use a normal mutex rather than a spinlock
365 since a lot of platforms seem to not have them :\
367 2002-04-30 Dick Porter <dick@ximian.com>
369 * Completely rewrote the handle waiting code: removed the helper
370 thread and its attendant complexity. All handle waiting is now
371 abstracted into the WaitForSingleObject() and
372 WaitForMultipleObjects() functions.
374 * Implemented inter-process sharing of handles using sysv shared
375 memory. This makes handles even more opaque, with a handle now
376 just an index into an array.
378 2002-04-25 Dan Lewis <dihlewis@yahoo.co.uk>
380 * io.c: unitialized pointer in GetCurrentDirectory.
382 Sat Apr 20 13:37:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
384 * threads.c: destroy the mutex at thread destruction
385 (if/when thread destruction code will be actually called).
386 When protecting a tls data pointer from the gc, use also the
387 thread id in the key.
389 Wed Apr 17 18:36:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
391 * timed-thread.c: avoid race condition when setting the thread to
394 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
396 * jit.h: to more #include lines to avoid breaking compilation
397 under windows when upgrading mingw and w32api to version
400 2002-04-16 Dick Porter <dick@ximian.com>
402 * atomic.h: Explanatory comment about lack of 80386 support
404 2002-04-15 Dick Porter <dick@ximian.com>
406 * atomic.h: use xaddl for InterlockedIncrement() and
407 InterlockedDecrement(). Use cmpxchgl in a loop for
408 InterlockedExchange() and InterlockedExchangePointer().
410 Mon Apr 15 13:31:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
412 * unicode.c: fix unicode_len() to not access uninitialized memory
413 (and updated to conform to mono code style).
415 Fri Mar 29 17:15:11 CET 2002 Paolo Molaro <lupus@ximian.com>
417 * io.c: EEXISTS is ignored for directory creation.
418 * mono-mutex.h: remove silly "pragma }" that emacs users insert
419 because they use a broken editor:-)
421 2002-03-28 Dick Porter <dick@ximian.com>
427 * handles.c: Warning cleanups
429 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
431 * unicode.h, unicode.c: changed to gunichar2
432 * io.h, io.c: changed strings to gunichar2*, added
433 SetFileAttributes(), GetCurrentDirectory(), SetCurrentDirectory(),
434 some fixes to FindFirstFile() and friends.
436 2002-03-26 Dick Porter <dick@ximian.com>
438 * types.h: Implement the large integer struct
441 * timefuncs.c: Dummy functions that don't yet implement
442 QueryPerformanceCounter() and QueryPerformanceFrequency()
445 * threads.c: Implement SleepEx()
448 * system.c: Beginnings of GetSystemInfo()
450 * mono-mutex.c (pthread_mutex_timedlock): Fix a ms/ns conversion
454 * context.c: Dummy function that doesnt yet implement
458 * atomic.c: Interlocked functions
460 Mon Mar 25 13:01:40 CET 2002 Paolo Molaro <lupus@ximian.com>
462 * threads.c: use a gc-safe hash table to store tls pointers.
464 2002-03-22 Dick Porter <dick@ximian.com>
466 * threads.c: Fix a race condition where a thread can start and
467 exit before the handle has been properly initialised (no reason
468 why the handle couldn't be initialised beforehand, so do so)
470 Fix a ms to ns conversion magnitude thinko.
472 2002-03-21 Dick Porter <dick@ximian.com>
474 * semaphores.c: Fix a problem when waiting for one or more
475 semaphores, and another semaphore is Released (all waiting
476 semaphores assumed they were signalled)
478 2002-03-29 Dan Lewis <dihlewis@yahoo.co.uk>
480 * io.h, io.c, uglify.h: added MoveFile, CopyFile, CreateDirectory,
481 RemoveDirectory, GetFileAttributes, GetFileAttributesEx
483 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
485 * threads.c (Sleep): bug fix: 1ms == 1000000ns
487 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
489 * io.h, io.c, events.c, mutexes.c, semaphores.c, sockets.c,
490 threads.c, io.c: added flush method to handles.
492 * io.c: FlushFileBuffers() and FindFirstFile() functions.
494 Thu Mar 7 17:21:52 CET 2002 Paolo Molaro <lupus@ximian.com>
496 * threads.c, timed-thread.c, wait.c: Boehm-GC anable.
498 2002-02-20 Dick Porter <dick@ximian.com>
500 * io-layer.h: Always build without cygwin support on windows
502 Mon Feb 18 15:50:59 CET 2002 Paolo Molaro <lupus@ximian.com>
504 * sockets.c: #undef DEBUG.
506 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
508 * io-layer.h: conditionally include sys/filio.h and sys/sockio.h
509 for FIONBIO, FIONREAD, and SIOCATMARK.
511 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
513 * sockets.c: conditionally include sys/filio.h and sys/sockio.h
514 for FIONBIO, FIONREAD, and SIOCATMARK.
516 2002-02-13 Dick Porter <dick@ximian.com>
518 * sockets.c: Implement shutdown and select
520 2002-02-13 Jeffrey Stedfast <fejj@ximian.com>
522 * mono-mutex.[c,h]: New source files that thinly wrap all pthread
523 functions that take pthread_mutex_t and/or pthread_mutexattr_t
524 arguments for the sake of portability. Implements recursive
525 mutexes and pthread_mutex_timedlock.
527 * critical-sections.c:
534 * wait.c: Use the mono-mutex wrapper portability functions/macros.
536 * pthread-compat.[c,h]: Replaced by mono-mutex.[c,h]
538 2002-01-23 Dick Porter <dick@ximian.com>
540 * sockets.c: Networking support, mostly wrapping BSD socket APIs
541 with handle code, and translating errno into w32 error codes.
543 * macros.h: Some w32 macros used with the socket support
545 * error.c: Implemented GetLastError() and SetLastError()
547 * Makefile.am: Added sockets, with kludge to override some symbols
549 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
551 * unicode.c (_wapi_unicode_to_utf8): byteswap UTF16 strings before
552 passing them to iconv
553 (_wapi_unicode_to_utf8): only swap bytes on LE systems, remove bug
554 from previous commit.
556 2001-12-11 Dick Porter <dick@ximian.com>
558 * io.c: Implement DeleteFile(), GetFileTime(), SetFileTime() and
559 FileTimeToSystemTime().
561 * unicode.c (unicode_len): Nasty way of finding length of unicode
562 string with embedded NULLs (counts until two NULLs together).
564 * mutexes.c (mutex_close):
565 * events.c (event_close): Release the internal pthreads resources
567 2001-11-26 Dick Porter <dick@ximian.com>
569 * critical-sections.c:
577 * wait.c: turn off DEBUG messages
579 2001-11-22 Dick Porter <dick@ximian.com>
581 * handles.c (SignalObjectAndWait): Implement
583 * wait.c (WaitForSingleObject): Fix case where timeout == 0
589 * events.c: Support for SignalObjectAndWait
591 2001-11-21 Dick Porter <dick@ximian.com>
598 * wait.c: Reliable method of returning which handle was signalled
599 on return from WaitForMultipleObjects().
601 2001-11-21 Dick Porter <dick@ximian.com>
603 * events.c: Implement events
605 2001-11-15 Dick Porter <dick@ximian.com>
607 * mutexes.c: Implement mutexes
611 * misc.c: Factor out some common code
613 2001-11-13 Dick Porter <dick@ximian.com>
615 * threads.c: Implement TLS. Implement GetCurrentThreadId(), and
616 GetCurrentThread() by maintaining a hash of thread handles.
618 * threads.h: Define thread and process creation flags
620 2001-11-12 Dick Porter <dick@ximian.com>
622 * critical-sections.c: Implement critical sections
624 2001-11-12 Dick Porter <dick@ximian.com>
626 * semaphores.c: Implement semaphores
628 * wait.c (wait_for_item): Maintain a wait count rather than count
631 * threads.c (thread_wait_multiple): Don't lock the wait item, that
632 will block other wait threads
634 2001-11-11 Dick Porter <dick@ximian.com>
636 * Makefile.am: Rename some automake variables
637 (from Nick Drochak <ndrochak@gol.com>)
639 2001-11-10 Dick Porter <dick@ximian.com>
641 * Makefile.am (libwapiincludedir): Fix include destination
643 * .cvsignore: Ignore generated files
645 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
647 * pthread-compat.c: added some include files to make it compile on
650 2001-11-08 Dick Porter <dick@ximian.com>
654 This is a library emulating the win32 threading and IO API.