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