1 2002-07-02 Dick Porter <dick@ximian.com>
3 * handles.c (shared_init): Make a second attempt to contact the
4 daemon if the shared memory attach succeeds, but the connect()
5 fails. (This copes with the daemon crashing without cleaning up
11 * shared.c (_wapi_shm_attach): Don't exec() anything when we fork
12 the daemon, it's now built into the library.
14 2002-06-25 Dick Porter <dick@ximian.com>
19 * daemon.c: Process forking and handle data management
23 * processes.c: Process forking and other support functions
25 2002-06-25 Dick Porter <dick@ximian.com>
27 * versioninfo.h: PE resource decoding
29 * unicode.c (_wapi_unicode_to_utf8): g_utf16_to_utf8 doesnt need
30 to be told the string length
32 * io.c: Removed the ACTUALLY_DO_UNICODE option. Fixed some leaks.
33 Moved _wapi_time_t_to_filetime and the WapiFileTime typedef to
36 2002-06-12 Dick Porter <dick@ximian.com>
39 * daemon-messages.c: Handle SIGPIPE in a non-stupid way in the
40 daemon, if MSG_NOSIGNAL isn't available. Thanks to Jaroslaw
41 Kowalski <jarek@atm.com.pl> for pointing out the bogosity.
43 2002-06-10 Jaroslaw Kowalski <jarek@atm.com.pl>
45 * sockets.c, daemon-messages.c: Prevent SIGPIPE from being raised
46 when writing to a closed socket.
48 2002-06-08 Jeffrey Stedfast <fejj@ximian.com>
50 * mono-mutex.c (mono_once): New convenience function for my
55 * critical-sections.c:
63 * atomic.c: Use mono_once() rather than pthread_once().
65 2002-06-06 Jeffrey Stedfast <fejj@ximian.com>
67 * handles.c (_wapi_handle_new): pthread_once() is not atomic, so
68 if multiple threads all try to call _wapi_handle_new() before the
69 shared data has been initialized, it is possible that we could get
70 into a condition where shared_init() is being executed and later
71 threads will pass by pthread_once() due to the fact that it has
72 already been called and so therefor will attempt to use the shared
73 data before it has been completely initialized. If we instead use
74 a standard mutex locking mechanism around shared_init(), we can
75 avoid the situation entirely. By wrapping the mutex locking in a
76 check to see if we've already initialized the data, we can even
77 avoid wasting resources by having to lock/unlock the mutex in any
78 later calls (the only time we'd have to worry about
79 locking/unlocking is the initial race to call shared_init() at
82 Sat Jun 1 13:27:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
84 * atomic.h: inline asm fixes from Dennis Haney (davh@davh.dk).
86 Fri May 31 16:21:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
88 * daemon.c, handles.c: rename "sun" local var since it's apparently
91 Fri May 31 15:40:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
93 * daemon-messages.c: work-around MSG_NOSIGNAL missing on some
96 2002-05-15 Dick Porter <dick@ximian.com>
98 * wait.c: Fix a deadlock in WaitForMultipleObjects
100 2002-05-14 Dick Porter <dick@ximian.com>
102 * io.c: Fix a cut&paste error, found by
103 Jaroslaw Kowalski <jarek@atm.com.pl>
105 2002-05-10 Dan Lewis <dihlewis@yahoo.co.uk>
109 2002-05-09 Dick Porter <dick@ximian.com>
117 * Makefile.am: Remove now-unused file wait-private.h
119 2002-05-08 Dick Porter <dick@ximian.com>
121 * shared.c: Better error messages, and report when daemon
122 connection fails rather than blocking forever. Do some more
123 shared memory sanity checking.
125 * handles.c: Better error messages when connecting to shared
126 memory and the handle daemon. Fall back to non-shared handles if
127 an error occurs. Set the default back to 'shared handles'. Fix a
128 crashing bug in scratch space allocation that mangled the block
131 2002-05-07 Miguel de Icaza <miguel@ximian.com>
133 * handles.c (shared_init): Disable SHM for now, people have too
134 many problems with this, and the diagnostics are not helping.
136 2002-05-06 Dan Lewis <dihlewis@yahoo.co.uk>
138 * io.c: CreateFile sets win32 last error.
140 2002-05-05 Dick Porter <dick@ximian.com>
151 * semaphore-private.h:
155 * event-private.h: Simplify the WapiHandleOps struct: take out all
156 the file-specific entries, leaving just the items that operate on
157 handles themselves. Split the close operation into shared and
158 private parts: shared close is called by the daemon.
160 * handles.c: As above, but also pass handle allocation, ref and
161 unref operations to the daemon. Populate the handle_ops array at
162 compile time, because the daemon needs to call ops on handles too.
163 Don't bother to track open handle counts any more, the daemon does
167 * thread-private.h: As above, but also make the thread data
170 * shared.c: Fork a handle daemon if the calling process created
171 the shared memory segment.
176 * Makefile.am: Build a daemon to manage handle allocation and
177 destruction without needing to lock the shared memory
179 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
181 * atomic.c: Changed to use a normal mutex rather than a spinlock
182 since a lot of platforms seem to not have them :\
184 2002-04-30 Dick Porter <dick@ximian.com>
186 * Completely rewrote the handle waiting code: removed the helper
187 thread and its attendant complexity. All handle waiting is now
188 abstracted into the WaitForSingleObject() and
189 WaitForMultipleObjects() functions.
191 * Implemented inter-process sharing of handles using sysv shared
192 memory. This makes handles even more opaque, with a handle now
193 just an index into an array.
195 2002-04-25 Dan Lewis <dihlewis@yahoo.co.uk>
197 * io.c: unitialized pointer in GetCurrentDirectory.
199 Sat Apr 20 13:37:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
201 * threads.c: destroy the mutex at thread destruction
202 (if/when thread destruction code will be actually called).
203 When protecting a tls data pointer from the gc, use also the
204 thread id in the key.
206 Wed Apr 17 18:36:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
208 * timed-thread.c: avoid race condition when setting the thread to
211 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
213 * jit.h: to more #include lines to avoid breaking compilation
214 under windows when upgrading mingw and w32api to version
217 2002-04-16 Dick Porter <dick@ximian.com>
219 * atomic.h: Explanatory comment about lack of 80386 support
221 2002-04-15 Dick Porter <dick@ximian.com>
223 * atomic.h: use xaddl for InterlockedIncrement() and
224 InterlockedDecrement(). Use cmpxchgl in a loop for
225 InterlockedExchange() and InterlockedExchangePointer().
227 Mon Apr 15 13:31:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
229 * unicode.c: fix unicode_len() to not access uninitialized memory
230 (and updated to conform to mono code style).
232 Fri Mar 29 17:15:11 CET 2002 Paolo Molaro <lupus@ximian.com>
234 * io.c: EEXISTS is ignored for directory creation.
235 * mono-mutex.h: remove silly "pragma }" that emacs users insert
236 because they use a broken editor:-)
238 2002-03-28 Dick Porter <dick@ximian.com>
244 * handles.c: Warning cleanups
246 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
248 * unicode.h, unicode.c: changed to gunichar2
249 * io.h, io.c: changed strings to gunichar2*, added
250 SetFileAttributes(), GetCurrentDirectory(), SetCurrentDirectory(),
251 some fixes to FindFirstFile() and friends.
253 2002-03-26 Dick Porter <dick@ximian.com>
255 * types.h: Implement the large integer struct
258 * timefuncs.c: Dummy functions that don't yet implement
259 QueryPerformanceCounter() and QueryPerformanceFrequency()
262 * threads.c: Implement SleepEx()
265 * system.c: Beginnings of GetSystemInfo()
267 * mono-mutex.c (pthread_mutex_timedlock): Fix a ms/ns conversion
271 * context.c: Dummy function that doesnt yet implement
275 * atomic.c: Interlocked functions
277 Mon Mar 25 13:01:40 CET 2002 Paolo Molaro <lupus@ximian.com>
279 * threads.c: use a gc-safe hash table to store tls pointers.
281 2002-03-22 Dick Porter <dick@ximian.com>
283 * threads.c: Fix a race condition where a thread can start and
284 exit before the handle has been properly initialised (no reason
285 why the handle couldn't be initialised beforehand, so do so)
287 Fix a ms to ns conversion magnitude thinko.
289 2002-03-21 Dick Porter <dick@ximian.com>
291 * semaphores.c: Fix a problem when waiting for one or more
292 semaphores, and another semaphore is Released (all waiting
293 semaphores assumed they were signalled)
295 2002-03-29 Dan Lewis <dihlewis@yahoo.co.uk>
297 * io.h, io.c, uglify.h: added MoveFile, CopyFile, CreateDirectory,
298 RemoveDirectory, GetFileAttributes, GetFileAttributesEx
300 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
302 * threads.c (Sleep): bug fix: 1ms == 1000000ns
304 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
306 * io.h, io.c, events.c, mutexes.c, semaphores.c, sockets.c,
307 threads.c, io.c: added flush method to handles.
309 * io.c: FlushFileBuffers() and FindFirstFile() functions.
311 Thu Mar 7 17:21:52 CET 2002 Paolo Molaro <lupus@ximian.com>
313 * threads.c, timed-thread.c, wait.c: Boehm-GC anable.
315 2002-02-20 Dick Porter <dick@ximian.com>
317 * io-layer.h: Always build without cygwin support on windows
319 Mon Feb 18 15:50:59 CET 2002 Paolo Molaro <lupus@ximian.com>
321 * sockets.c: #undef DEBUG.
323 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
325 * io-layer.h: conditionally include sys/filio.h and sys/sockio.h
326 for FIONBIO, FIONREAD, and SIOCATMARK.
328 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
330 * sockets.c: conditionally include sys/filio.h and sys/sockio.h
331 for FIONBIO, FIONREAD, and SIOCATMARK.
333 2002-02-13 Dick Porter <dick@ximian.com>
335 * sockets.c: Implement shutdown and select
337 2002-02-13 Jeffrey Stedfast <fejj@ximian.com>
339 * mono-mutex.[c,h]: New source files that thinly wrap all pthread
340 functions that take pthread_mutex_t and/or pthread_mutexattr_t
341 arguments for the sake of portability. Implements recursive
342 mutexes and pthread_mutex_timedlock.
344 * critical-sections.c:
351 * wait.c: Use the mono-mutex wrapper portability functions/macros.
353 * pthread-compat.[c,h]: Replaced by mono-mutex.[c,h]
355 2002-01-23 Dick Porter <dick@ximian.com>
357 * sockets.c: Networking support, mostly wrapping BSD socket APIs
358 with handle code, and translating errno into w32 error codes.
360 * macros.h: Some w32 macros used with the socket support
362 * error.c: Implemented GetLastError() and SetLastError()
364 * Makefile.am: Added sockets, with kludge to override some symbols
366 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
368 * unicode.c (_wapi_unicode_to_utf8): byteswap UTF16 strings before
369 passing them to iconv
370 (_wapi_unicode_to_utf8): only swap bytes on LE systems, remove bug
371 from previous commit.
373 2001-12-11 Dick Porter <dick@ximian.com>
375 * io.c: Implement DeleteFile(), GetFileTime(), SetFileTime() and
376 FileTimeToSystemTime().
378 * unicode.c (unicode_len): Nasty way of finding length of unicode
379 string with embedded NULLs (counts until two NULLs together).
381 * mutexes.c (mutex_close):
382 * events.c (event_close): Release the internal pthreads resources
384 2001-11-26 Dick Porter <dick@ximian.com>
386 * critical-sections.c:
394 * wait.c: turn off DEBUG messages
396 2001-11-22 Dick Porter <dick@ximian.com>
398 * handles.c (SignalObjectAndWait): Implement
400 * wait.c (WaitForSingleObject): Fix case where timeout == 0
406 * events.c: Support for SignalObjectAndWait
408 2001-11-21 Dick Porter <dick@ximian.com>
415 * wait.c: Reliable method of returning which handle was signalled
416 on return from WaitForMultipleObjects().
418 2001-11-21 Dick Porter <dick@ximian.com>
420 * events.c: Implement events
422 2001-11-15 Dick Porter <dick@ximian.com>
424 * mutexes.c: Implement mutexes
428 * misc.c: Factor out some common code
430 2001-11-13 Dick Porter <dick@ximian.com>
432 * threads.c: Implement TLS. Implement GetCurrentThreadId(), and
433 GetCurrentThread() by maintaining a hash of thread handles.
435 * threads.h: Define thread and process creation flags
437 2001-11-12 Dick Porter <dick@ximian.com>
439 * critical-sections.c: Implement critical sections
441 2001-11-12 Dick Porter <dick@ximian.com>
443 * semaphores.c: Implement semaphores
445 * wait.c (wait_for_item): Maintain a wait count rather than count
448 * threads.c (thread_wait_multiple): Don't lock the wait item, that
449 will block other wait threads
451 2001-11-11 Dick Porter <dick@ximian.com>
453 * Makefile.am: Rename some automake variables
454 (from Nick Drochak <ndrochak@gol.com>)
456 2001-11-10 Dick Porter <dick@ximian.com>
458 * Makefile.am (libwapiincludedir): Fix include destination
460 * .cvsignore: Ignore generated files
462 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
464 * pthread-compat.c: added some include files to make it compile on
467 2001-11-08 Dick Porter <dick@ximian.com>
471 This is a library emulating the win32 threading and IO API.