Revert until we track down the RH9 bug
[mono.git] / mono / io-layer / ChangeLog
1
2 Wed Jun 18 19:08:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
3
4         * io.c: never add write permission for group or others in
5         SetFileAttributes ().
6
7 2003-06-17  Dick Porter  <dick@ximian.com>
8
9         * io.c (SetFileAttributes): Implement the ReadOnly attribute, and
10         ignore the unsupported ones ("fixes" bug 44977).
11
12 2003-06-17  Lluis Sanchez Gual  <lluis@ximian.com>
13
14         * misc.c: fix bug in _wapi_calc_timeout. It gave wrong values for
15           high ms values (there was an overflow).
16
17 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18
19         * system.h (struct _WapiSystemInfo ): Fix warnings when using gcc-3.3.
20
21 2003-06-11  Dick Porter  <dick@ximian.com>
22
23         * shared.c: Fix shared directory creation.  Patch from
24         Pablo Baena <pbaena@uol.com.ar>
25
26 2003-06-10  Dick Porter  <dick@ximian.com>
27
28         * atomic.c: Delete the useless compile warning
29
30 2003-06-09  Dick Porter  <dick@ximian.com>
31
32         * daemon.c: Lookup env as a string array.  Fixes bug 44289.  Also
33         make setting the process handle value in the environment actually
34         work.
35
36         * processes.c: Pretty up the process name, if it happens to be
37         "mono" such as when another mono process forks "mono foo.exe"
38
39 2003-06-05  Dick Porter  <dick@ximian.com>
40
41         * processes.c (process_set_current): Don't do an expensive handle
42         search at application startup, check the environment to see if the
43         process handle has already been created.
44
45         * io.c: Don't do an expensive handle search when creating stdin,
46         stdout and stderr handles, just create them all the first time one
47         is requested.
48
49         * wapi-private.h:
50         * shared.c:
51         * shared.h:
52         * handles.c:
53         * handles-private.h:
54         * daemon-messages.h:
55         * daemon-private.h:
56         * daemon.c: Support for "unlimited" number of handles and scratch
57         data.
58
59         Speed up application startup by passing process handle in the
60         environment, rather than let the app scan all handles (which gets
61         really slow when there are more than a few thousand to check.)
62
63         Initialise some structs passed to syscalls, noticed by valgrind.
64         
65
66 2003-05-20  Dick Porter  <dick@ximian.com>
67
68         * io.c (FindFirstFile): Include . files in the glob.  Fixes bug
69         43229.
70
71 2003-05-19  Dick Porter  <dick@ximian.com>
72
73         * threads.c: Set the new thread's stack size to 2M.  Fix needed
74         for BSD, reported by Martin Dvorak <md@9ll.cz>
75
76 2003-05-16  Dick Porter  <dick@ximian.com>
77
78         * io.h:
79         * io.c: Implement GetTempPath()
80
81 2003-05-16  Dick Porter  <dick@ximian.com>
82
83         * processes.c (CreateProcess): Set some error codes
84
85 2003-05-12  Dick Porter  <dick@ximian.com>
86
87         * misc.c (_wapi_calc_timeout): Cope with overflowing tv_nsec.
88         Patch from Martin Dvorak <mdvorak@ninell.cz>.
89
90 2003-05-10  Dick Porter  <dick@ximian.com>
91
92         * io.c (CopyFile): Copy file mode as well as file data.  Based on
93         suggestion by Giuseppe Greco <giuseppe.greco@agamura.com>, bug
94         42706.
95
96 2003-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
97
98         * handles.c: don't call GC_gcollect when creating new handles.
99
100 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
101
102         * handles.c: added some debugging code. Call GC_gcollect
103         before creating a new handle. It makes Lupus' test run smoother and
104         faster (from 62 to 83 request per second). Notice that calling
105         GC_finalizer_notifier if needed (GC_should_invoke_finalizer ()) does
106         not improve nor degrade the performance, so i don't do it.
107
108 2003-05-02  Dick Porter  <dick@ximian.com>
109
110         * sockets.c: Rearrange closesocket() and socket_close_private(),
111         and remember to unref the handle, so we don't leak socket handles.
112         Fix from Pelle Johnsen <pelle.johnsen@mail.dk>
113
114 2003-04-11  Dick Porter  <dick@ximian.com>
115
116         * atomic.h: ARM atomic operations by Malte Hildingson
117         <tds00mahi@tellus.thn.htu.se>
118
119 Tue Apr 8 11:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
120
121         * atomic.h: fix macosx build by "Urs C. Muff" <umuff@quark.com>.
122
123 2003-04-03  Martin Baulig  <martin@ximian.com>
124
125         The following change is conditional to `WITH_INCLUDED_LIBGC'
126         which is not yet enabled by default.
127
128         * threads.c (SuspendThread, ResumeThread): Fully implemented this.
129         (gc_init): New static function; install a signal handler for
130         SIGPWR which is used to suspend threads.  [FIXME: it SIGPWR
131         doesn't exist on all Unix systems, we need to find another
132         signal].
133         (mono_wapi_push_thread_stack): New public function.  Tells the
134         garbage collector about the current stack pointer of a suspended
135         thread.
136
137 2003-04-03  Martin Baulig  <martin@ximian.com>
138
139         * timed-thread.h (TimedThread): Added `suspended_sem',
140         `suspend_count' and `stack_ptr'.
141
142 2003-03-28  Dick Porter  <dick@ximian.com>
143
144         * atomic.h: PPC support gratiously donated to the public domain
145         by John Duncan <jddst19@mac.com>
146
147 2003-03-20  Dick Porter  <dick@ximian.com>
148
149         * sockets.c (_wapi_connect): If connect() fails with EACCES, try
150         setting SO_BROADCAST and connecting again.  Fixes bug 39178.
151
152 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
153
154         * processes.c: included Jerome Laban's patch and call SetLastError when
155         the executable is not found.
156
157 2003-03-03  Dick Porter  <dick@ximian.com>
158
159         * io.c (CreateFile): Try opening directories readonly, so that
160         timestamps can be adjusted.  Patch by Elan Feingold
161         <efeingold@mn.rr.com>.
162
163 2003-02-25  Dick Porter  <dick@ximian.com>
164
165         * shared.c (_wapi_shm_attach): Return a failure code on system
166         call errors, rather than exiting.
167
168 2003-02-21  Dick Porter  <dick@ximian.com>
169
170         * processes.c (GetCurrentProcessId): Use the current process
171         handle to return the process ID, as getpid() is unreliable
172         (linuxthreads gives each thread a different pid).  Fixes bug
173         37550.
174
175 2003-02-21  Dick Porter  <dick@ximian.com>
176
177         * io.c (FindNextFile): Skip over dangling symlinks.  Fixes bug
178         34076.
179
180 2003-02-11  Dick Porter  <dick@ximian.com>
181
182         * timefuncs.h: 
183         * timefuncs.c: Added GetTickCount()
184
185 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
186
187         * error.c: added WSA_EHOSTUNREACH mapping.
188
189 2003-01-26  Miguel de Icaza  <miguel@ximian.com>
190
191         * io.c (SetFileAttributes): This routine is not currently
192         implemented for the general case, but I added a special case to
193         set the executable bit on Linux.
194
195 Wed Jan 15 15:55:40 CET 2003 Paolo Molaro <lupus@ximian.com>
196
197         * sockets.h, daemon.c, io.c: compilation fixes on MacOSX.
198
199 2003-01-08  Dick Porter  <dick@ximian.com>
200
201         * sockets.c: Fixed setting blocking mode to true (fixes bug 36388)
202
203 2002-12-11  Juli Mallett  <jmallett@FreeBSD.org>
204
205         * daemon.c, handles-private.h, handles.c, wapi-private.h:
206         Check for an implementation which says it supports
207         _POSIX_THREAD_PROCESS_SHARED, rather than just one that
208         defines the symbol.  Defined but with a value of -1 still
209         means that it is unsupported.
210
211 2002-12-08  Martin Baulig  <martin@ximian.com>
212
213         * handles.c (_wapi_handle_new): Create new non-shared handles with
214         an initial refcount of 1, not 0.
215
216 2002-11-22  Dietmar Maurer  <dietmar@ximian.com>
217
218         * threads.c (TlsGetValue): removed unnecessary mutex
219
220 2002-11-20  Dick Porter  <dick@ximian.com>
221
222         * timed-thread.c (_wapi_timed_thread_attach): Attached threads
223         need to store their data structure too.
224
225         * threads.c: Make sure the threading data is initialised wherever
226         it is needed
227
228 2002-11-15  Dick Porter  <dick@ximian.com>
229
230         * timed-thread.c: Removed unneeded parameters in
231         _wapi_timed_thread_attach().
232
233         * threads.c: Renamed AttachThread() to make it not look like
234         external API.  Removed unneeded parameters.
235
236 2002-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
237
238         * error.[ch]: added errno_to_WSA (). It displays a warning and return
239         WSASYSCALLFAILURE if there is no error mapping for the given errno,
240
241         * sockets.c: use errno_to_WSA and fixed display of warning for h_errno.
242
243 2002-10-31  Dick Porter  <dick@ximian.com>
244
245         * io.h: 
246         * io.c: Define and use INVALID_FILE_ATTRIBUTES
247
248 2002-10-07  Dick Porter  <dick@ximian.com>
249
250         * timefuncs.c:
251         * daemon.c: Use a more accurate time source for process start and
252         end times.
253
254 2002-10-03  Dick Porter  <dick@ximian.com>
255
256         * daemon.c:
257         * handles.c:
258         * threads.c:  Fixes for freebsd.  Make sure that mutex and condition
259         creation and deletion happen in the process that owns them, when
260         POSIX shared thread objects aren't supported.  This breaks on
261         freebsd, as pthread_t is a pointer to data.
262
263 2002-10-02  Dick Porter  <dick@ximian.com>
264
265         * shared.c: Use mmap() instead of sysv shm for the shared data.
266
267         * wapi-private.h (_WAPI_HANDLE_VERSION): Reset back to 0, for the
268         new system
269
270         * daemon-private.h: 
271         * daemon.c: mmap()ed regions survive fork, so just pass the
272         pointer to _wapi_daemon_main instead of mapping it again.
273
274 2002-10-01  Dick Porter  <dick@ximian.com>
275
276         * timed-thread.c: Kludge for CREATE_SUSPENDED thread creation.
277         Unfortunately libgc uses the same thread suspend technique that I
278         want to, and the two don't mix: libgc will deadlock when it tries
279         to stop the world if a thread has already been suspended by
280         someone else.  Just do the simple suspended create rather than the
281         general purpose thread suspension for now.
282
283         * threads.c: Pass create flags to the timed_thread create call, to
284         implement suspended thread creation.  ResumeThread() partially
285         implemented, to cope with the case where a newly created but
286         suspended thread is launched.
287
288 2002-09-30  Dick Porter  <dick@ximian.com>
289
290         * sockets.c (ioctlsocket): Set non-blocking mode in a better way,
291         with fcntl.
292
293 2002-09-27  Dick Porter  <dick@ximian.com>
294
295         * semaphores.c: Only include semaphore.h if it's present. Patch
296         for BSD from jmmv@hispabsd.org (Julio Merino).
297
298 2002-09-27  Dick Porter  <dick@ximian.com>
299
300         * processes.c: Pass environment and working directory to the
301         daemon when forking.  Don't let argv[0] be duplicated when looking
302         for the program name.  Implement EnumProcessModules (simple
303         version for now, lsof-style later if needed), GetModuleBaseName,
304         {Get,Set}ProcessWorkingSetSize (just faked, because the vm hints
305         aren't available on Linux).
306
307         * process-private.h: Store the process name, and the working set
308         min and max
309
310         * handles.c:
311         * handles-private.h: New functions to store and retrieve an array
312         of strings in the scratch space
313
314         * daemon.c: Don't miss deleting some handles when a client exits
315         (we used to rely on the client doing the final cleanup, but
316         obviously if the client is no longer there the daemon has to do
317         it).
318
319         Process forking now sets the environment and the working
320         directory.
321
322         * io.c: Don't confuse fd 0 with an unassigned handle struct
323
324         * atomic.h: Add a google cache alternative to the msdn URL
325
326 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
327
328         * sockets.c:
329         (_wapi_recvfrom): added ECONNRESET to the switch.
330
331 2002-09-24  Mark Crichton  <crichton@gimp.org>
332
333         * atomic.h: Yea.  On linux, sparc isn't sparc, it's __sparc__.
334         Added to ifdef.
335
336 2002-09-19  Mark Crichton  <crichton@gimp.org>
337
338         * daemon.c, shared.c: Added NEED_LINK_UNLINK for systems that
339         dont have Linux's abstract filesystem for sockets.
340
341 2002-09-19  Mark Crichton  <crichton@gimp.org>
342
343         * atomic.h: Added SPARC atomic asm code.
344         * daemon.c, handles-private.h, handles.c, wapi-private.h:
345         undefined _POSIX_THREAD_PROCESS_SHARED.  This actually exists on
346         Solaris 9, however, the code paths don't seem to work.  More testing
347         on the shared case is *really* needed.
348
349 2002-09-03  Dick Porter  <dick@ximian.com>
350
351         * threads.h: 
352         * threads.c: Removed PosixKillThread(), because it's not in the
353         w32 api
354
355 2002-08-20  Dick Porter  <dick@ximian.com>
356
357         * handles.c (_wapi_handle_scratch_store): Made stored byte lengths
358         multiples of 4 bytes, to keep header structures aligned.  Needed
359         for sparc, at least. (Patch from crichton@gimp.org)
360
361         * handles.c: Removed 'disable_shm' variable (we've defaulted to
362         building with shm enabled for months now)
363
364 2002-08-19  Dick Porter  <dick@ximian.com>
365
366         * daemon.c: Rewrote the poll() loop to use GIOChannels instead,
367         for legacy NeXT-based systems.
368
369 2002-08-12  Dick Porter  <dick@ximian.com>
370
371         * atomic.h: Rename some parameters to avoid c++ keywords (Patch
372         from Joseph Wenninger <kde@jowenn.at>)
373
374 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
375
376         * threads.c: use fast spinlocks by default
377
378 2002-08-02  Dick Porter  <dick@ximian.com>
379
380         * io.c (GetStdHandle): Add a handle reference when returning a
381         duplicate console handle.  This fixes the unref_handle errors in
382         NUnit.
383
384 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
385
386         * threads.c (TLS_PTHREAD_MUTEX): define this because else some
387         tests does not work
388
389 2002-08-01  Dick Porter  <dick@ximian.com>
390
391         * threads.c: Use atomic spinlocks in TLS functions
392
393         * mono-spinlock.h:
394         * Makefile.am: Added mono-spinlock.h
395
396 2002-07-21  Jeffrey Stedfast  <fejj@ximian.com>
397
398         * daemon-messages.c: #include <sys/types.h> and <sys/sockets.h> -
399         these are needed for sendmsg() and also for struct msghdr (at
400         least on Solaris). Solaris still won't build because struct msghdr
401         doesn't have msg_flags, msg_control, or msg_controllen members.
402         (CMSG_SPACE): Define for systems that don't have it.
403         (CMSG_LEN): Same.
404
405 2002-07-20  Dick Porter  <dick@ximian.com>
406
407         * wapi-private.h:
408         * io-private.h:
409         * io.h:
410         * io.c:
411         * handles.c: Implemented pipe handles
412         
413         * handles.c:
414         * daemon.c: Fixed bug in handle closing.
415
416         * shared.c:
417         * daemon.c: Forked processes now close all open file descriptors.
418
419 Fri Jul 19 19:05:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
420
421         * sockets.h, io-layer.h, critical-sections.h: don't include config.h
422         in header files.
423
424 2002-07-19  Martin Baulig  <martin@gnome.org>
425
426         * threads.c (ExitThread): Call exit() if no threads has been
427         created yet.
428
429 2002-07-17  Dick Porter  <dick@ximian.com>
430
431         * daemon-messages.c: Freebsd fixes from Andreas Kohn
432         <andreas.kohn@gmx.net>
433
434 2002-07-15  Dick Porter  <dick@ximian.com>
435
436         * io.c: Removed bogus console_flush() method, that was just cut
437         and pasted from file_flush when I separated the two handle types.
438
439 2002-07-12  Dick Porter  <dick@ximian.com>
440
441         * io.c (convert_from_flags): Fixed misunderstanding wrt fcntl
442         flags.  Fixes bug 27633.
443
444 2002-07-12  Dick Porter  <dick@ximian.com>
445
446         * wapi-private.h:
447         * handles.c:
448         * daemon.c: Use size of sockaddr_un.sun_path from config.h
449
450 2002-07-12  Dick Porter  <dick@ximian.com>
451
452         * processes.c (CreateProcess): Send stdin, stdout and stderr
453         handles if the startup info doesnt specify new ones
454
455         * io.c (GetStdHandle): Return the same handle when the same
456         standard handle is requested
457
458         * handles.c: Pass file descriptors when forking
459
460         * daemon.c: Use supplied file descriptors when forking a new
461         process
462
463         * daemon-messages.h: 
464         * daemon-messages.c: Pass stdin, stdout and stderr file
465         descriptors to the daemon (used when forking)
466
467 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
468
469         * daemon.c (_wapi_daemon_main): Use sizeof
470         (main_socket_address.sun_path) instead of hardcoded 108 value.
471
472         * handles.c (shared_init): Use sizeof
473         (shared_socket_address.sun_path) instead of hardcoded 108 value.
474
475 2002-07-10  Dennis Haney  <davh@davh.dk>
476
477         * shared.c:
478         * handles.c:
479         * daemon.c: Lots of documentation, some added error checking, and
480         code readability improvements.
481
482         * daemon-messages.h: Add the Error request type to improve error
483         checking.
484
485         * daemon-messages.c: Do a bit more error checking on send() and
486         recv(), and log errors with a higher severity level.
487
488 2002-07-04  Dick Porter  <dick@ximian.com>
489
490         * daemon.c (process_process_fork): Fix argument handling, due to
491         buggy understanding of g_strsplit() behaviour.
492
493 2002-07-03  Dick Porter  <dick@ximian.com>
494
495         * threads.h:
496         * threads.c: Implement OpenThread().  Define access-control values
497         for thread handles.
498
499         * wapi.h:
500         * processes.h:
501         * access.h:
502         * Makefile.am: Added access.h, to hold shared access-control
503         definitions
504
505 2002-07-02  Dick Porter  <dick@ximian.com>
506
507         * wapi-private.h (_WAPI_HANDLE_VERSION): New protocol version
508         
509 2002-07-02  Dick Porter  <dick@ximian.com>
510
511         * handles.c (shared_init): Make a second attempt to contact the
512         daemon if the shared memory attach succeeds, but the connect()
513         fails. (This copes with the daemon crashing without cleaning up
514         the shared memory.)
515
516         * Makefile.am: 
517         * daemon-private.h:
518         * daemon.c:
519         * shared.c (_wapi_shm_attach): Don't exec() anything when we fork
520         the daemon, it's now built into the library.
521
522 2002-06-25  Dick Porter  <dick@ximian.com>
523
524         * handles.c:
525         * handles-private.h:
526         * daemon-messages.h:
527         * daemon.c: Process forking and handle data management
528
529         * processes.h:
530         * process-private.h:
531         * processes.c: Process forking and other support functions
532
533 2002-06-25  Dick Porter  <dick@ximian.com>
534
535         * versioninfo.h: PE resource decoding
536
537         * unicode.c (_wapi_unicode_to_utf8): g_utf16_to_utf8 doesnt need
538         to be told the string length
539
540         * io.c: Removed the ACTUALLY_DO_UNICODE option.  Fixed some leaks.
541         Moved _wapi_time_t_to_filetime and the WapiFileTime typedef to
542         timefuncs.c
543
544 2002-06-12  Dick Porter  <dick@ximian.com>
545
546         * daemon.c: 
547         * daemon-messages.c: Handle SIGPIPE in a non-stupid way in the
548         daemon, if MSG_NOSIGNAL isn't available.  Thanks to Jaroslaw
549         Kowalski <jarek@atm.com.pl> for pointing out the bogosity.
550
551 2002-06-10  Jaroslaw Kowalski <jarek@atm.com.pl>
552
553         * sockets.c, daemon-messages.c: Prevent SIGPIPE from being raised
554         when writing to a closed socket.
555
556 2002-06-08  Jeffrey Stedfast  <fejj@ximian.com>
557
558         * mono-mutex.c (mono_once): New convenience function for my
559         previous fix.
560
561         * handles.c:
562         * error.c: 
563         * critical-sections.c: 
564         * threads.c: 
565         * sockets.c: 
566         * semaphores.c: 
567         * processes.c: 
568         * mutexes.c: 
569         * io.c: 
570         * events.c: 
571         * atomic.c: Use mono_once() rather than pthread_once().
572
573 2002-06-06  Jeffrey Stedfast  <fejj@ximian.com>
574
575         * handles.c (_wapi_handle_new): pthread_once() is not atomic, so
576         if multiple threads all try to call _wapi_handle_new() before the
577         shared data has been initialized, it is possible that we could get
578         into a condition where shared_init() is being executed and later
579         threads will pass by pthread_once() due to the fact that it has
580         already been called and so therefor will attempt to use the shared
581         data before it has been completely initialized. If we instead use
582         a standard mutex locking mechanism around shared_init(), we can
583         avoid the situation entirely. By wrapping the mutex locking in a
584         check to see if we've already initialized the data, we can even
585         avoid wasting resources by having to lock/unlock the mutex in any
586         later calls (the only time we'd have to worry about
587         locking/unlocking is the initial race to call shared_init() at
588         startup).
589
590 Sat Jun 1 13:27:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
591
592         * atomic.h: inline asm fixes from Dennis Haney (davh@davh.dk).
593
594 Fri May 31 16:21:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
595
596         * daemon.c, handles.c: rename "sun" local var since it's apparently
597         a #define on Solaris.
598
599 Fri May 31 15:40:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
600
601         * daemon-messages.c: work-around MSG_NOSIGNAL missing on some
602         platforms.
603
604 2002-05-15  Dick Porter  <dick@ximian.com>
605
606         * wait.c: Fix a deadlock in WaitForMultipleObjects
607
608 2002-05-14  Dick Porter  <dick@ximian.com>
609
610         * io.c: Fix a cut&paste error, found by
611         Jaroslaw Kowalski <jarek@atm.com.pl>
612
613 2002-05-10  Dan Lewis  <dihlewis@yahoo.co.uk>
614
615         * io.c: Nasty typo.
616
617 2002-05-09  Dick Porter  <dick@ximian.com>
618
619         * threads.c: 
620         * semaphores.c: 
621         * processes.c: 
622         * mutexes.c: 
623         * handles-private.h: 
624         * events.c: 
625         * Makefile.am: Remove now-unused file wait-private.h
626
627 2002-05-08  Dick Porter  <dick@ximian.com>
628
629         * shared.c: Better error messages, and report when daemon
630         connection fails rather than blocking forever.  Do some more
631         shared memory sanity checking.
632
633         * handles.c: Better error messages when connecting to shared
634         memory and the handle daemon.  Fall back to non-shared handles if
635         an error occurs.  Set the default back to 'shared handles'.  Fix a
636         crashing bug in scratch space allocation that mangled the block
637         headers.
638
639 2002-05-07  Miguel de Icaza  <miguel@ximian.com>
640
641         * handles.c (shared_init): Disable SHM for now, people have too
642         many problems with this, and the diagnostics are not helping.
643
644 2002-05-06  Dan Lewis  <dihlewis@yahoo.co.uk>
645
646         * io.c: CreateFile sets win32 last error.
647
648 2002-05-05  Dick Porter  <dick@ximian.com>
649
650         * wapi-private.h: 
651         * handles-private.h:
652         * io.c: 
653         * io-private.h:
654         * mutexes.c: 
655         * mutex-private.h: 
656         * processes.c: 
657         * process-private.h: 
658         * semaphores.c: 
659         * semaphore-private.h: 
660         * sockets.c: 
661         * socket-private.h: 
662         * events.c: 
663         * event-private.h: Simplify the WapiHandleOps struct: take out all
664         the file-specific entries, leaving just the items that operate on
665         handles themselves.  Split the close operation into shared and
666         private parts: shared close is called by the daemon.
667
668         * handles.c: As above, but also pass handle allocation, ref and
669         unref operations to the daemon.  Populate the handle_ops array at
670         compile time, because the daemon needs to call ops on handles too.
671         Don't bother to track open handle counts any more, the daemon does
672         that.
673         
674         * threads.c: 
675         * thread-private.h: As above, but also make the thread data
676         handle-private.
677
678         * shared.c: Fork a handle daemon if the calling process created
679         the shared memory segment.
680
681         * daemon.c:
682         * daemon-messages.c:
683         * daemon-messages.h:
684         * Makefile.am: Build a daemon to manage handle allocation and
685         destruction without needing to lock the shared memory
686
687 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
688
689         * atomic.c: Changed to use a normal mutex rather than a spinlock
690         since a lot of platforms seem to not have them :\
691
692 2002-04-30  Dick Porter  <dick@ximian.com>
693
694         * Completely rewrote the handle waiting code: removed the helper
695         thread and its attendant complexity.  All handle waiting is now
696         abstracted into the WaitForSingleObject() and
697         WaitForMultipleObjects() functions.
698
699         * Implemented inter-process sharing of handles using sysv shared
700         memory.  This makes handles even more opaque, with a handle now
701         just an index into an array.
702         
703 2002-04-25  Dan Lewis  <dihlewis@yahoo.co.uk>
704
705         * io.c: unitialized pointer in GetCurrentDirectory.
706
707 Sat Apr 20 13:37:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
708
709         * threads.c: destroy the mutex at thread destruction
710         (if/when thread destruction code will be actually called).
711         When protecting a tls data pointer from the gc, use also the 
712         thread id in the key.
713         
714 Wed Apr 17 18:36:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
715
716         * timed-thread.c: avoid race condition when setting the thread to
717         detached.
718
719 2002-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
720
721         * jit.h: to more #include lines to avoid breaking compilation
722         under windows when upgrading mingw and w32api to version
723         1.3 (thanks Dick!).
724
725 2002-04-16  Dick Porter  <dick@ximian.com>
726
727         * atomic.h: Explanatory comment about lack of 80386 support
728
729 2002-04-15  Dick Porter  <dick@ximian.com>
730
731         * atomic.h: use xaddl for InterlockedIncrement() and
732         InterlockedDecrement().  Use cmpxchgl in a loop for
733         InterlockedExchange() and InterlockedExchangePointer().
734
735 Mon Apr 15 13:31:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
736
737         * unicode.c: fix unicode_len() to not access uninitialized memory
738         (and updated to conform to mono code style).
739
740 Fri Mar 29 17:15:11 CET 2002 Paolo Molaro <lupus@ximian.com>
741
742         * io.c: EEXISTS is ignored for directory creation.
743         * mono-mutex.h: remove silly "pragma }" that emacs users insert
744         because they use a broken editor:-)
745
746 2002-03-28  Dick Porter  <dick@ximian.com>
747
748         * sockets.h: 
749         * sockets.c: 
750         * io.c: 
751         * handles.h: 
752         * handles.c: Warning cleanups
753
754 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
755
756         * unicode.h, unicode.c: changed to gunichar2
757         * io.h, io.c: changed strings to gunichar2*, added
758         SetFileAttributes(), GetCurrentDirectory(), SetCurrentDirectory(),
759         some fixes to FindFirstFile() and friends.
760
761 2002-03-26  Dick Porter  <dick@ximian.com>
762
763         * types.h: Implement the large integer struct
764
765         * timefuncs.h:
766         * timefuncs.c: Dummy functions that don't yet implement
767         QueryPerformanceCounter() and QueryPerformanceFrequency()
768
769         * threads.h:
770         * threads.c: Implement SleepEx()
771
772         * system.h:
773         * system.c: Beginnings of GetSystemInfo()
774
775         * mono-mutex.c (pthread_mutex_timedlock): Fix a ms/ns conversion
776         thinko
777
778         * context.h:
779         * context.c: Dummy function that doesnt yet implement
780         GetThreadContext()
781
782         * atomic.h: 
783         * atomic.c: Interlocked functions
784
785 Mon Mar 25 13:01:40 CET 2002 Paolo Molaro <lupus@ximian.com>
786
787         * threads.c: use a gc-safe hash table to store tls pointers.
788
789 2002-03-22  Dick Porter  <dick@ximian.com>
790
791         * threads.c: Fix a race condition where a thread can start and
792         exit before the handle has been properly initialised (no reason
793         why the handle couldn't be initialised beforehand, so do so)
794
795         Fix a ms to ns conversion magnitude thinko.
796
797 2002-03-21  Dick Porter  <dick@ximian.com>
798
799         * semaphores.c: Fix a problem when waiting for one or more
800         semaphores, and another semaphore is Released (all waiting
801         semaphores assumed they were signalled)
802
803 2002-03-29  Dan Lewis <dihlewis@yahoo.co.uk>
804
805         * io.h, io.c, uglify.h: added MoveFile, CopyFile, CreateDirectory,
806         RemoveDirectory, GetFileAttributes, GetFileAttributesEx
807
808 2002-03-19  Dietmar Maurer  <dietmar@ximian.com>
809
810         * threads.c (Sleep): bug fix: 1ms == 1000000ns
811
812 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
813
814         * io.h, io.c, events.c, mutexes.c, semaphores.c, sockets.c,
815         threads.c, io.c: added flush method to handles.
816
817         * io.c: FlushFileBuffers() and FindFirstFile() functions.
818
819 Thu Mar 7 17:21:52 CET 2002 Paolo Molaro <lupus@ximian.com>
820
821         * threads.c, timed-thread.c, wait.c: Boehm-GC anable.
822
823 2002-02-20  Dick Porter  <dick@ximian.com>
824
825         * io-layer.h: Always build without cygwin support on windows
826
827 Mon Feb 18 15:50:59 CET 2002 Paolo Molaro <lupus@ximian.com>
828
829         * sockets.c: #undef DEBUG.
830
831 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
832
833         * io-layer.h: conditionally include sys/filio.h and sys/sockio.h
834         for FIONBIO, FIONREAD, and SIOCATMARK.
835
836 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
837
838         * sockets.c: conditionally include sys/filio.h and sys/sockio.h
839         for FIONBIO, FIONREAD, and SIOCATMARK.
840
841 2002-02-13  Dick Porter  <dick@ximian.com>
842
843         * sockets.c: Implement shutdown and select
844
845 2002-02-13  Jeffrey Stedfast  <fejj@ximian.com>
846
847         * mono-mutex.[c,h]: New source files that thinly wrap all pthread
848         functions that take pthread_mutex_t and/or pthread_mutexattr_t
849         arguments for the sake of portability. Implements recursive
850         mutexes and pthread_mutex_timedlock.
851
852         * critical-sections.c:
853         * events.c:
854         * handles.c:
855         * mutexes.c:
856         * semaphores.c:
857         * threads.c:
858         * timed-thread.c:
859         * wait.c: Use the mono-mutex wrapper portability functions/macros.
860
861         * pthread-compat.[c,h]: Replaced by mono-mutex.[c,h]
862
863 2002-01-23  Dick Porter  <dick@ximian.com>
864
865         * sockets.c: Networking support, mostly wrapping BSD socket APIs
866         with handle code, and translating errno into w32 error codes.
867
868         * macros.h: Some w32 macros used with the socket support
869
870         * error.c: Implemented GetLastError() and SetLastError()
871
872         * Makefile.am: Added sockets, with kludge to override some symbols
873
874 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
875
876         * unicode.c (_wapi_unicode_to_utf8): byteswap UTF16 strings before
877         passing them to iconv
878         (_wapi_unicode_to_utf8): only swap bytes on LE systems, remove bug
879         from previous commit.
880
881 2001-12-11  Dick Porter  <dick@ximian.com>
882
883         * io.c: Implement DeleteFile(), GetFileTime(), SetFileTime() and
884         FileTimeToSystemTime().
885
886         * unicode.c (unicode_len): Nasty way of finding length of unicode
887         string with embedded NULLs (counts until two NULLs together).
888
889         * mutexes.c (mutex_close): 
890         * events.c (event_close): Release the internal pthreads resources
891
892 2001-11-26  Dick Porter  <dick@ximian.com>
893
894         * critical-sections.c:
895         * events.c:
896         * handles.c:
897         * io.c:
898         * mutexes.c:
899         * semaphores.c:
900         * threads.c:
901         * timed-thread.c:
902         * wait.c: turn off DEBUG messages
903
904 2001-11-22  Dick Porter  <dick@ximian.com>
905
906         * handles.c (SignalObjectAndWait): Implement
907
908         * wait.c (WaitForSingleObject): Fix case where timeout == 0
909
910         * threads.c:
911         * semaphores.c:
912         * mutexes.c:
913         * io.c:
914         * events.c: Support for SignalObjectAndWait
915         
916 2001-11-21  Dick Porter  <dick@ximian.com>
917
918         * events.c:
919         * handles.c:
920         * mutexes.c:
921         * semaphores.c:
922         * threads.c:
923         * wait.c: Reliable method of returning which handle was signalled
924         on return from WaitForMultipleObjects().
925
926 2001-11-21  Dick Porter  <dick@ximian.com>
927
928         * events.c: Implement events
929
930 2001-11-15  Dick Porter  <dick@ximian.com>
931
932         * mutexes.c: Implement mutexes
933
934         * threads.c: 
935         * semaphores.c: 
936         * misc.c: Factor out some common code
937
938 2001-11-13  Dick Porter  <dick@ximian.com>
939
940         * threads.c: Implement TLS.  Implement GetCurrentThreadId(), and
941         GetCurrentThread() by maintaining a hash of thread handles.
942
943         * threads.h: Define thread and process creation flags
944
945 2001-11-12  Dick Porter  <dick@ximian.com>
946
947         * critical-sections.c: Implement critical sections
948
949 2001-11-12  Dick Porter  <dick@ximian.com>
950
951         * semaphores.c: Implement semaphores
952
953         * wait.c (wait_for_item): Maintain a wait count rather than count
954         signalled booleans.
955
956         * threads.c (thread_wait_multiple): Don't lock the wait item, that
957         will block other wait threads
958
959 2001-11-11  Dick Porter  <dick@ximian.com>
960
961         * Makefile.am: Rename some automake variables
962         (from Nick Drochak <ndrochak@gol.com>)
963
964 2001-11-10  Dick Porter  <dick@ximian.com>
965
966         * Makefile.am (libwapiincludedir): Fix include destination
967
968         * .cvsignore: Ignore generated files
969
970 2001-11-10  Dietmar Maurer  <dietmar@ximian.com>
971
972         * pthread-compat.c: added some include files to make it compile on
973         linux.
974
975 2001-11-08  Dick Porter  <dick@ximian.com>
976
977         * Initial checkin.
978
979         This is a library emulating the win32 threading and IO API.
980
981