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