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