1 2002-06-25 Dick Porter <dick@ximian.com>
6 * daemon.c: Process forking and handle data management
10 * processes.c: Process forking and other support functions
12 2002-06-25 Dick Porter <dick@ximian.com>
14 * versioninfo.h: PE resource decoding
16 * unicode.c (_wapi_unicode_to_utf8): g_utf16_to_utf8 doesnt need
17 to be told the string length
19 * io.c: Removed the ACTUALLY_DO_UNICODE option. Fixed some leaks.
20 Moved _wapi_time_t_to_filetime and the WapiFileTime typedef to
23 2002-06-12 Dick Porter <dick@ximian.com>
26 * daemon-messages.c: Handle SIGPIPE in a non-stupid way in the
27 daemon, if MSG_NOSIGNAL isn't available. Thanks to Jaroslaw
28 Kowalski <jarek@atm.com.pl> for pointing out the bogosity.
30 2002-06-10 Jaroslaw Kowalski <jarek@atm.com.pl>
32 * sockets.c, daemon-messages.c: Prevent SIGPIPE from being raised
33 when writing to a closed socket.
35 2002-06-08 Jeffrey Stedfast <fejj@ximian.com>
37 * mono-mutex.c (mono_once): New convenience function for my
42 * critical-sections.c:
50 * atomic.c: Use mono_once() rather than pthread_once().
52 2002-06-06 Jeffrey Stedfast <fejj@ximian.com>
54 * handles.c (_wapi_handle_new): pthread_once() is not atomic, so
55 if multiple threads all try to call _wapi_handle_new() before the
56 shared data has been initialized, it is possible that we could get
57 into a condition where shared_init() is being executed and later
58 threads will pass by pthread_once() due to the fact that it has
59 already been called and so therefor will attempt to use the shared
60 data before it has been completely initialized. If we instead use
61 a standard mutex locking mechanism around shared_init(), we can
62 avoid the situation entirely. By wrapping the mutex locking in a
63 check to see if we've already initialized the data, we can even
64 avoid wasting resources by having to lock/unlock the mutex in any
65 later calls (the only time we'd have to worry about
66 locking/unlocking is the initial race to call shared_init() at
69 Sat Jun 1 13:27:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
71 * atomic.h: inline asm fixes from Dennis Haney (davh@davh.dk).
73 Fri May 31 16:21:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
75 * daemon.c, handles.c: rename "sun" local var since it's apparently
78 Fri May 31 15:40:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
80 * daemon-messages.c: work-around MSG_NOSIGNAL missing on some
83 2002-05-15 Dick Porter <dick@ximian.com>
85 * wait.c: Fix a deadlock in WaitForMultipleObjects
87 2002-05-14 Dick Porter <dick@ximian.com>
89 * io.c: Fix a cut&paste error, found by
90 Jaroslaw Kowalski <jarek@atm.com.pl>
92 2002-05-10 Dan Lewis <dihlewis@yahoo.co.uk>
96 2002-05-09 Dick Porter <dick@ximian.com>
104 * Makefile.am: Remove now-unused file wait-private.h
106 2002-05-08 Dick Porter <dick@ximian.com>
108 * shared.c: Better error messages, and report when daemon
109 connection fails rather than blocking forever. Do some more
110 shared memory sanity checking.
112 * handles.c: Better error messages when connecting to shared
113 memory and the handle daemon. Fall back to non-shared handles if
114 an error occurs. Set the default back to 'shared handles'. Fix a
115 crashing bug in scratch space allocation that mangled the block
118 2002-05-07 Miguel de Icaza <miguel@ximian.com>
120 * handles.c (shared_init): Disable SHM for now, people have too
121 many problems with this, and the diagnostics are not helping.
123 2002-05-06 Dan Lewis <dihlewis@yahoo.co.uk>
125 * io.c: CreateFile sets win32 last error.
127 2002-05-05 Dick Porter <dick@ximian.com>
138 * semaphore-private.h:
142 * event-private.h: Simplify the WapiHandleOps struct: take out all
143 the file-specific entries, leaving just the items that operate on
144 handles themselves. Split the close operation into shared and
145 private parts: shared close is called by the daemon.
147 * handles.c: As above, but also pass handle allocation, ref and
148 unref operations to the daemon. Populate the handle_ops array at
149 compile time, because the daemon needs to call ops on handles too.
150 Don't bother to track open handle counts any more, the daemon does
154 * thread-private.h: As above, but also make the thread data
157 * shared.c: Fork a handle daemon if the calling process created
158 the shared memory segment.
163 * Makefile.am: Build a daemon to manage handle allocation and
164 destruction without needing to lock the shared memory
166 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
168 * atomic.c: Changed to use a normal mutex rather than a spinlock
169 since a lot of platforms seem to not have them :\
171 2002-04-30 Dick Porter <dick@ximian.com>
173 * Completely rewrote the handle waiting code: removed the helper
174 thread and its attendant complexity. All handle waiting is now
175 abstracted into the WaitForSingleObject() and
176 WaitForMultipleObjects() functions.
178 * Implemented inter-process sharing of handles using sysv shared
179 memory. This makes handles even more opaque, with a handle now
180 just an index into an array.
182 2002-04-25 Dan Lewis <dihlewis@yahoo.co.uk>
184 * io.c: unitialized pointer in GetCurrentDirectory.
186 Sat Apr 20 13:37:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
188 * threads.c: destroy the mutex at thread destruction
189 (if/when thread destruction code will be actually called).
190 When protecting a tls data pointer from the gc, use also the
191 thread id in the key.
193 Wed Apr 17 18:36:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
195 * timed-thread.c: avoid race condition when setting the thread to
198 2002-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
200 * jit.h: to more #include lines to avoid breaking compilation
201 under windows when upgrading mingw and w32api to version
204 2002-04-16 Dick Porter <dick@ximian.com>
206 * atomic.h: Explanatory comment about lack of 80386 support
208 2002-04-15 Dick Porter <dick@ximian.com>
210 * atomic.h: use xaddl for InterlockedIncrement() and
211 InterlockedDecrement(). Use cmpxchgl in a loop for
212 InterlockedExchange() and InterlockedExchangePointer().
214 Mon Apr 15 13:31:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
216 * unicode.c: fix unicode_len() to not access uninitialized memory
217 (and updated to conform to mono code style).
219 Fri Mar 29 17:15:11 CET 2002 Paolo Molaro <lupus@ximian.com>
221 * io.c: EEXISTS is ignored for directory creation.
222 * mono-mutex.h: remove silly "pragma }" that emacs users insert
223 because they use a broken editor:-)
225 2002-03-28 Dick Porter <dick@ximian.com>
231 * handles.c: Warning cleanups
233 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
235 * unicode.h, unicode.c: changed to gunichar2
236 * io.h, io.c: changed strings to gunichar2*, added
237 SetFileAttributes(), GetCurrentDirectory(), SetCurrentDirectory(),
238 some fixes to FindFirstFile() and friends.
240 2002-03-26 Dick Porter <dick@ximian.com>
242 * types.h: Implement the large integer struct
245 * timefuncs.c: Dummy functions that don't yet implement
246 QueryPerformanceCounter() and QueryPerformanceFrequency()
249 * threads.c: Implement SleepEx()
252 * system.c: Beginnings of GetSystemInfo()
254 * mono-mutex.c (pthread_mutex_timedlock): Fix a ms/ns conversion
258 * context.c: Dummy function that doesnt yet implement
262 * atomic.c: Interlocked functions
264 Mon Mar 25 13:01:40 CET 2002 Paolo Molaro <lupus@ximian.com>
266 * threads.c: use a gc-safe hash table to store tls pointers.
268 2002-03-22 Dick Porter <dick@ximian.com>
270 * threads.c: Fix a race condition where a thread can start and
271 exit before the handle has been properly initialised (no reason
272 why the handle couldn't be initialised beforehand, so do so)
274 Fix a ms to ns conversion magnitude thinko.
276 2002-03-21 Dick Porter <dick@ximian.com>
278 * semaphores.c: Fix a problem when waiting for one or more
279 semaphores, and another semaphore is Released (all waiting
280 semaphores assumed they were signalled)
282 2002-03-29 Dan Lewis <dihlewis@yahoo.co.uk>
284 * io.h, io.c, uglify.h: added MoveFile, CopyFile, CreateDirectory,
285 RemoveDirectory, GetFileAttributes, GetFileAttributesEx
287 2002-03-19 Dietmar Maurer <dietmar@ximian.com>
289 * threads.c (Sleep): bug fix: 1ms == 1000000ns
291 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
293 * io.h, io.c, events.c, mutexes.c, semaphores.c, sockets.c,
294 threads.c, io.c: added flush method to handles.
296 * io.c: FlushFileBuffers() and FindFirstFile() functions.
298 Thu Mar 7 17:21:52 CET 2002 Paolo Molaro <lupus@ximian.com>
300 * threads.c, timed-thread.c, wait.c: Boehm-GC anable.
302 2002-02-20 Dick Porter <dick@ximian.com>
304 * io-layer.h: Always build without cygwin support on windows
306 Mon Feb 18 15:50:59 CET 2002 Paolo Molaro <lupus@ximian.com>
308 * sockets.c: #undef DEBUG.
310 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
312 * io-layer.h: conditionally include sys/filio.h and sys/sockio.h
313 for FIONBIO, FIONREAD, and SIOCATMARK.
315 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
317 * sockets.c: conditionally include sys/filio.h and sys/sockio.h
318 for FIONBIO, FIONREAD, and SIOCATMARK.
320 2002-02-13 Dick Porter <dick@ximian.com>
322 * sockets.c: Implement shutdown and select
324 2002-02-13 Jeffrey Stedfast <fejj@ximian.com>
326 * mono-mutex.[c,h]: New source files that thinly wrap all pthread
327 functions that take pthread_mutex_t and/or pthread_mutexattr_t
328 arguments for the sake of portability. Implements recursive
329 mutexes and pthread_mutex_timedlock.
331 * critical-sections.c:
338 * wait.c: Use the mono-mutex wrapper portability functions/macros.
340 * pthread-compat.[c,h]: Replaced by mono-mutex.[c,h]
342 2002-01-23 Dick Porter <dick@ximian.com>
344 * sockets.c: Networking support, mostly wrapping BSD socket APIs
345 with handle code, and translating errno into w32 error codes.
347 * macros.h: Some w32 macros used with the socket support
349 * error.c: Implemented GetLastError() and SetLastError()
351 * Makefile.am: Added sockets, with kludge to override some symbols
353 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
355 * unicode.c (_wapi_unicode_to_utf8): byteswap UTF16 strings before
356 passing them to iconv
357 (_wapi_unicode_to_utf8): only swap bytes on LE systems, remove bug
358 from previous commit.
360 2001-12-11 Dick Porter <dick@ximian.com>
362 * io.c: Implement DeleteFile(), GetFileTime(), SetFileTime() and
363 FileTimeToSystemTime().
365 * unicode.c (unicode_len): Nasty way of finding length of unicode
366 string with embedded NULLs (counts until two NULLs together).
368 * mutexes.c (mutex_close):
369 * events.c (event_close): Release the internal pthreads resources
371 2001-11-26 Dick Porter <dick@ximian.com>
373 * critical-sections.c:
381 * wait.c: turn off DEBUG messages
383 2001-11-22 Dick Porter <dick@ximian.com>
385 * handles.c (SignalObjectAndWait): Implement
387 * wait.c (WaitForSingleObject): Fix case where timeout == 0
393 * events.c: Support for SignalObjectAndWait
395 2001-11-21 Dick Porter <dick@ximian.com>
402 * wait.c: Reliable method of returning which handle was signalled
403 on return from WaitForMultipleObjects().
405 2001-11-21 Dick Porter <dick@ximian.com>
407 * events.c: Implement events
409 2001-11-15 Dick Porter <dick@ximian.com>
411 * mutexes.c: Implement mutexes
415 * misc.c: Factor out some common code
417 2001-11-13 Dick Porter <dick@ximian.com>
419 * threads.c: Implement TLS. Implement GetCurrentThreadId(), and
420 GetCurrentThread() by maintaining a hash of thread handles.
422 * threads.h: Define thread and process creation flags
424 2001-11-12 Dick Porter <dick@ximian.com>
426 * critical-sections.c: Implement critical sections
428 2001-11-12 Dick Porter <dick@ximian.com>
430 * semaphores.c: Implement semaphores
432 * wait.c (wait_for_item): Maintain a wait count rather than count
435 * threads.c (thread_wait_multiple): Don't lock the wait item, that
436 will block other wait threads
438 2001-11-11 Dick Porter <dick@ximian.com>
440 * Makefile.am: Rename some automake variables
441 (from Nick Drochak <ndrochak@gol.com>)
443 2001-11-10 Dick Porter <dick@ximian.com>
445 * Makefile.am (libwapiincludedir): Fix include destination
447 * .cvsignore: Ignore generated files
449 2001-11-10 Dietmar Maurer <dietmar@ximian.com>
451 * pthread-compat.c: added some include files to make it compile on
454 2001-11-08 Dick Porter <dick@ximian.com>
458 This is a library emulating the win32 threading and IO API.