2004-05-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mono / io-layer / ChangeLog
1 2004-05-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2
3         * io.c: translate from GFileError to errno codes and don't free
4         variables right after calling mono_io_scandir, as we may overwrite
5         errno value.
6
7 2004-05-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8
9         * io.c: g_dir_open return ENOENT for directories on which we don't have
10         read/execute permission, while returning EPERM for anything below those.
11         So, change ENOENT by EPERM if the directory exists.
12
13 2004-05-07  Dick Porter  <dick@ximian.com>
14
15         * io.c (SetFileAttributes): Don't have failed chmod()s cause a
16         "file not found" error.  Fixes bug 54032.
17         
18 2004-05-07  Dick Porter  <dick@ximian.com>
19
20         * io.c (FindFirstFile): Comment out a windows-compatibility check
21         that breaks when directories have metachars in their names.
22         Workaround for bug 58116.
23
24 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25
26         * io.c: fixed for FindFirstFile for empty directories. Closes
27         bug #58147.
28
29 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30
31         * processes.c: set the start time for the current process. Fixes bug
32         #58109.
33
34 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
35
36         * io-private.h: 'namelist' is now a gchar ** in _WapiHandlePrivate_find.
37         * io.c: implemented scandir using glib functions.
38
39 2004-05-04  Dick Porter  <dick@ximian.com>
40
41         * daemon.c (read_message): Return FALSE on error so the GSource
42         callback itself can return FALSE.  Cures the infinite loop poll()
43         warning on MacosX.
44         * shared.c: Fix some daemon startup race conditions.
45
46 2004-04-29  Miguel de Icaza  <miguel@ximian.com>
47
48         * io.c (CopyFile): Use 32k buffers to copy the file instead of 2k,
49         use the stack, do not use dynamic memory.
50
51 2004-04-29  Zoltan Varga  <vargaz@freemail.hu>
52
53         * io.c: Add scandir implementation for platforms which do not have
54         it, like solaris.
55
56 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
57
58         * io.[ch]: implemented GetLogicalDriveStrings.
59
60 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
61
62         * io.c:
63         * sockets.c: use the field name from configure when accessing sigval
64         pointer field. Makes this work on the Mac.
65
66 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
67
68         * atomic.c: (InterlockedExchange) fix typo for
69         mutex name
70
71 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
72
73         * io.c:
74         * sockets.c: added check for sys/aio.h.
75
76 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
77
78         * error.[ch]: added _wapi_get_win32_file_error...
79         * io.c: ... which was _wapi_get_win32_error here.
80         * sockets.c: rename the function calls here too.
81
82 2004-04-28  Dick Porter  <dick@ximian.com>
83
84         * daemon-messages.c: Avoid a deadlock when a thread is killed while
85         waiting for the daemon by using a recursive mutex.  Helps bug 56699.
86
87 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
88
89         * io.c: fixed leak in async_notifier().
90
91         * sockets.[ch]: added AIO support for sockets and fixed WSAIoctl
92         declaration.
93
94         * threads.c: removed old comment.
95
96 2004-04-26  David Waite  <mass@akuma.org>
97
98         * daemon-messages.h:
99         * daemon-private.h
100         * error.h:
101         * io.h:
102         * processes.h:
103         * shared.h:
104         * thread-private.h:
105         * wapi-private.h: remove comma from end of enumeration declarations
106         * status.h: cast unsigned int types to int for enum assignment
107
108 2004-04-26 David Waite <mass@akuma.org>
109
110         * io.c:
111         * timefuncs.c: declare 64-bit constants as long long types (i.e.
112         10ULL)
113
114 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
115
116         * socket-wrappers.h: _wapi_socket == WSASocket now. Added
117         WSA_FLAG_OVERLAPPED.
118
119         * sockets.c: new unused parameters for _wapi_socket.
120
121 2004-04-22  Miguel de Icaza  <miguel@ximian.com>
122
123         * timed-thread.c: Replace sem_init with MONO_SEM_INIT to handle
124         the fact that MacOS X is a piece of junk (sem_init is *defined* in
125         the libc, but they return `not implemented'). 
126
127 2004-04-22  Dick Porter  <dick@ximian.com>
128
129         * handles.c: 
130         * handles-private.h: Reference the handle when it is locked, so
131         that another thread can't blow it away while we're waiting for it
132         to become signalled.
133         
134         * wait.c: 
135         * timed-thread.c: 
136         * threads.c: 
137         * sockets.c: 
138         * semaphores.c: 
139         * mutexes.c: 
140         * mono-mutex.c: 
141         * io.c: 
142         * handles.c: 
143         * handles-private.h: 
144         * events.c: 
145         * error.c: 
146         * daemon-messages.c: 
147         * critical-sections.c: 
148         * atomic.c: Added pthreads cleanup handlers and error asserts
149
150         * shared.c: 
151         * handles.c: Fixed the gcc "variable might be used uninitialised"
152         warnings.  They can't happen, but gcc doesn't know that
153         g_assert()s don't return.
154
155         Fixed the declaration of _wapi_handle_process_kill() so that it
156         expects the correct type for the pid.
157         
158         * threads.c: Removed the TLS_PTHREAD_MUTEX style locking that
159         hasn't been used in ages and just made the code more complex.
160
161 2004-04-17  Zoltan Varga  <vargaz@freemail.hu>
162
163         * processes.c: Include <signal.h> for SIGKILL and SIGILL + fix some
164         warnings. Fixes #57168.
165
166 2004-04-16  Dick Porter  <dick@ximian.com>
167
168         * threads.c (Sleep): Using div(3) with a negative (when signed)
169         numerator causes the quotient to be 0 and the remainder to be the
170         numerator.  This feeds a small negative value to nanosleep(3),
171         which will return immediately and cause a busy wait.  Fixes bug
172         56351.
173
174 2004-04-15  Dick Porter  <dick@ximian.com>
175
176         * io-private.h:
177         * io.c: Rewrite FindFirstFile and FindNextFile using scandir(3)
178         and fnmatch(3) instead of glob(3).  glob() can't cope with being
179         given filenames containing metachars.  This fixes bug 40557.
180
181 2004-04-14  Bernie Solomon  <bernard@ugsolutions.com>
182
183         * security.c: #warning is a GCC-ism
184
185 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
186
187         * security.c: Removed GetUserName as glib g_get_user_name does a
188         better (portability) job. Added ImpersonateLoggedOnUser and
189         RevertToSelf.
190
191 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
192
193         * mono-mutex.h: move pthread_mutex_timedlock declaration to...
194         * mono-mutex.c: ...here. It was causing a warning that prevented
195         libgdiplus compilation.
196
197 2004-04-04  Miguel de Icaza  <miguel@ximian.com>
198
199         * security.c (GetUserName): Make it work on MacOS X
200
201 2004-04-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
202
203         * security.c: use getpwuid_r if available. This one is thread-safe.
204
205 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
206
207         * Makefile.am: Added security.c|h.
208         * security.c: New file for security related functions. Added function
209         GetUserName to fix #56144.
210         * security.h: New. Header file for security.c
211         * wapi.h: Added include for security.h
212
213 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
214
215         * daemon-messages.h: added kill structs.
216
217         * daemon.c: implemented process_process_kill.
218         * handles-private.h:  define process_process_kill.
219         * handles.c: implemented _wapi_handle_process_kill.
220         * processes.[ch]: implemented TerminateProcess.
221
222 2004-03-25  Bernie Solomon  <bernard@ugsolutions.com>
223
224         * daemon.c (rem_fd): On solaris you seem to get an
225         error even after removing the input source so don't
226         try and rem_fd it twice.
227
228 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
229
230         * daemon.c: in process_post_mortem, If the child terminated due to the 
231         receipt of a signal, the exit status must be based on WTERMSIG, since 
232         WEXITSTATUS returns 0 in this case.
233
234 2004-03-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
235
236         * daemon.c: turned a warning into a DEBUG statement. Now we may hit it.
237
238 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
239
240         * daemon.c: only call getdtablesize () once.
241         * processes.c: wait 500 ms to check if execve failed and throw the same
242         exception as MS on failure. Fixes bug #32809.
243
244 2004-03-17  Bernie Solomon  <bernard@ugsolutions.com>
245
246         * io.c (async_notifier): use "union sigval" rather
247         than sigval_t as Solaris doesn't have sigval_t
248         (which isn't in IEEE 1003.1 either).
249
250 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
251
252         * io.c: added debug stuff and removed a few redundant lines in
253         file_write.
254
255 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
256
257         * io-private.h: added new fields for file structure. Declare
258         _wapi_io_add_callback.
259
260         * io.c: added _wapi_get_win32_error, support aio_read/write in
261         file_read/write. Implemented _wapi_io_add_callback, which is where
262         BindHandle ends up.
263         
264         * io.h: added new fields for WapiOverlapped and typedef for the
265         callback.
266
267         * processes.c: fixed off-by-one bug when handling environment variables 
268         passed in.
269
270         * threads.[ch]: implemented BindIoCompletionCallback.
271
272         * uglify.h: added typedef for LPOVERLAPPED_COMPLETION_ROUTINE.
273
274 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
275
276         * socket-wrappers.h: Remove extra semicolon.
277
278 2004-03-03  Dave Camp  <dave@ximian.com>
279
280         * daemon.c: (add_fd), (fd_activity), (_wapi_daemon_main):
281         Use a new main context.
282
283 2004-03-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
284
285         * io.c:
286         (GetFileAttributes): set the error depending on errno instead of
287         setting ERROR_FILE_NOT_FOUND always. See bug #55160.
288
289 2004-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
290
291         * io.c:
292         (CopyFile): free the buffer on error.
293         * sockets.c:
294         (WSAIoctl): free the buffer on error.
295
296 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
297
298         * error.c: fixed mapping for EPROTONOSUPPORT and ESOCKTNOSUPPORT.
299
300         * sockets.[ch]: retry creating the socket for AF_INET, SOCK_RAW
301         using IP protocol with IP over IP. Implemented WSAIoctl UNIX-style.
302
303 2004-01-27  Bernie Solomon  <bernard@ugsolutions.com>
304
305         * shared.c (_wapi_shm_file): add hostname
306         to shared data file names to handle NFS mounted
307         .wapi directories.
308
309 Mon Jan 26 16:15:03 CET 2004 Paolo Molaro <lupus@ximian.com>
310
311         * sockets.h: remove obsolete soklen_t typedef.
312
313 Fri Jan 23 21:07:02 CET 2004 Paolo Molaro <lupus@ximian.com>
314
315         * socket-wrappers.h, sockets.h, sockets.c, Makefile.am: move socket
316         wrappers to its own non-installed header file.
317
318 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
319
320         * io.c:
321         (FindFirstFile): unlock the handle if FindNextFile fails.
322         (FindNextFile): g_free a couple of pointers before retrying.
323
324         * wait.c:
325         (WaitForMultipleObjects): if only one handle provided, use
326         WaitForSingleObject.
327
328 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
329
330         * handles-private.h: (_wapi_handle_type) check
331         for segment in range before using it
332
333 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
334
335         * thread-private.h: _wapi_thread_ops is now const
336         must match .c file.
337
338 Mon Dec 22 18:29:03 CET 2003 Paolo Molaro <lupus@ximian.com>
339
340         * threads.c, timed-thread.c, timed-thread.h: use mach
341         semaphores on Darwin (MacOSX) since the posix ones
342         are mostly broken there (threads are not created suspended
343         and they can start executing before they are fully initialized
344         like in tests/thread-static.cs).
345
346 Mon Dec 22 17:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
347
348         * atomic.h: ppc fixes.
349
350 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
351
352         * handles.c: remove my bad use of MONO_ZERO_ARRAY_LENGTH
353         in HDRSIZE 
354
355 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
356
357         * shared.c: (_wapi_shm_open) make scratch file
358         not have to immediately regrow to avoid remaps
359         (HPUX can't cope with these).
360         (_wapi_shm_attach) use actual size of file
361         to set scratch data_len for the creating process.
362
363         * handles.c: (_wapi_handle_new_internal) make
364         sure mutex & cond var are initialized even for
365         non process shared ones. 
366         (_wapi_handle_unref) always call destroy 
367         routines on mutex & cond var
368
369 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
370
371         * daemon.c: change channel data structure so
372         input sources are removed from glib event loop
373         properly. xsp works better on Solaris and 
374         fixes #51278
375
376 2003-12-12  Bernie Solomon  <bernard@ugsolutions.com>
377
378         * wapi-private.h: Replace G_GNUC_PRETTY_FUNCTION
379         definition with file & line number for non-GCC
380         compiles.
381
382 2003-12-08  Bernie Solomon  <bernard@ugsolutions.com>
383
384         * Makefile.am: make sure hppa_atomic.s is in distribution
385
386 2003-12-01  Dick Porter  <dick@ximian.com>
387
388         * wapi-private.h: 
389         * mutexes.c (CreateMutex): 
390         * mutex-private.h (struct _WapiHandle_mutex): 
391         * handles.c: Look up certain handle types by name, in a shared
392         namespace.  Currently only mutex handles have this implemented.
393         Fixes bug 51089.
394
395         * semaphores.c (CreateSemaphore): 
396         * events.c (CreateEvent): Fix signature
397
398 2003-11-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
399
400         * io.c: don't call g_free before testing errno as it may modify it.
401         If the path exists, return an error if it's not a directory. Fixes
402         bug #50753.
403
404 2003-11-20  Dick Porter  <dick@ximian.com>
405
406         * io.c: Missed a little-endian UTF16 conversion.  Patch from
407         Jeroen Zwartepoorte (Jeroen@xs4all.nl), fixes bug 51065.
408
409 2003-10-29  Dick Porter  <dick@ximian.com>
410
411         * io.c (MoveFile): If the move crosses filesystems, try and fall
412         back to copy and delete.  Patch from Jörg Rosenkranz
413         (JoergR@voelcker.com), fixes bug 50298.
414
415 2003-10-28  Dick Porter  <dick@ximian.com>
416
417         * io.c: Use the new encoding conversion to cope with non-utf8
418         locales in filenames.
419
420         * processes.c: Ditto for process arguments.
421
422 Tue Oct 21 12:01:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
423
424         * atomic.h: some ppc inline asm fixes (incorrect use of labels, 
425         incorrect register constraints, incorrect clobber lists).
426
427 2003-10-13  Bernie Solomon  <bernard@ugsolutions.com>
428
429         * Makefile.am hppa_atomic.s: add HP 64bit
430         implementation of atomic ops
431
432 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
433
434         * threads.c (CreateThread): Wrap pthread_attr_setstacksize call in
435         a conditional for platforms that don't have it.
436
437 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
438
439         * threads.c: (CreateThread) use stacksize argument
440         if non-zero - change default for 64 bits to 4Mb
441
442 2003-09-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
443
444         * sockets.c: set last error when socket creation fails. This shed some
445         light on bug #49015.
446
447 2003-09-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
448
449         * processes.c: fixed bug #48973: we only change \ by / for the argument
450         to be used as command.
451         When getting the program name from the args, don't let the space between
452         them in the args.
453
454 2003-09-24  Bernie Solomon <bernard@ugsolutions.com>
455
456         * atomic.h atomic.c: fix sparc so lock is
457         global, increment does so and it compiles under Sun compiler.
458
459 2003-09-22  Bernie Solomon <bernard@ugsolutions.com>
460
461         * handles.c: include <string.h> directly as may
462         not be nested in <sys/un.h> like Linux
463
464 2003-09-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
465
466         * io.c:
467         (DeleteFile): call SetLastError on failure. Fix by
468         richard.torkar@htu.se (Richard Torkar). Closes bug #48222.
469
470 2003-09-15  Lluis Sanchez Gual  <lluis@ximian.com>
471
472         * daemon.c: In compare_process(), discard handles already signalled.
473
474 2003-09-02  Dick Porter  <dick@ximian.com>
475
476         * io.c: Work around glib brain-dead assumptions about utf8-encoded
477         filenames.  Fixes bug 30781.
478
479 2003-08-28  Dick Porter  <dick@ximian.com>
480
481         * critical-sections.c:  Patch from Bernie Solomon
482         <bernard@ugsolutions.com> to emit a warning if locking a critical
483         section fails.
484
485 2003-07-23  Dick Porter  <dick@ximian.com>
486
487         * shared.c:
488         * daemon.c (maybe_exit): Avoid the race condition when the daemon is
489         closing but another client comes along when the shared data is still
490         visible.  Should fix bugs 33671 and 35213.
491
492 2003-07-23  Dick Porter  <dick@ximian.com>
493
494         * handles.c:  Initialise handle mutex and cond.  Fix by
495         Bernie Solomon <bernard@ugsolutions.com>
496
497 2003-07-15  Dick Porter  <dick@ximian.com>
498
499         * timed-thread.c (timed_thread_start_routine): Fix virtual memory
500         leak when threads quit.  Fixes bug 44067.
501
502 Wed Jun 18 19:08:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
503
504         * io.c: never add write permission for group or others in
505         SetFileAttributes ().
506
507 2003-06-17  Dick Porter  <dick@ximian.com>
508
509         * io.c (SetFileAttributes): Implement the ReadOnly attribute, and
510         ignore the unsupported ones ("fixes" bug 44977).
511
512 2003-06-17  Lluis Sanchez Gual  <lluis@ximian.com>
513
514         * misc.c: fix bug in _wapi_calc_timeout. It gave wrong values for
515           high ms values (there was an overflow).
516
517 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
518
519         * system.h (struct _WapiSystemInfo ): Fix warnings when using gcc-3.3.
520
521 2003-06-11  Dick Porter  <dick@ximian.com>
522
523         * shared.c: Fix shared directory creation.  Patch from
524         Pablo Baena <pbaena@uol.com.ar>
525
526 2003-06-10  Dick Porter  <dick@ximian.com>
527
528         * atomic.c: Delete the useless compile warning
529
530 2003-06-09  Dick Porter  <dick@ximian.com>
531
532         * daemon.c: Lookup env as a string array.  Fixes bug 44289.  Also
533         make setting the process handle value in the environment actually
534         work.
535
536         * processes.c: Pretty up the process name, if it happens to be
537         "mono" such as when another mono process forks "mono foo.exe"
538
539 2003-06-05  Dick Porter  <dick@ximian.com>
540
541         * processes.c (process_set_current): Don't do an expensive handle
542         search at application startup, check the environment to see if the
543         process handle has already been created.
544
545         * io.c: Don't do an expensive handle search when creating stdin,
546         stdout and stderr handles, just create them all the first time one
547         is requested.
548
549         * wapi-private.h:
550         * shared.c:
551         * shared.h:
552         * handles.c:
553         * handles-private.h:
554         * daemon-messages.h:
555         * daemon-private.h:
556         * daemon.c: Support for "unlimited" number of handles and scratch
557         data.
558
559         Speed up application startup by passing process handle in the
560         environment, rather than let the app scan all handles (which gets
561         really slow when there are more than a few thousand to check.)
562
563         Initialise some structs passed to syscalls, noticed by valgrind.
564         
565
566 2003-05-20  Dick Porter  <dick@ximian.com>
567
568         * io.c (FindFirstFile): Include . files in the glob.  Fixes bug
569         43229.
570
571 2003-05-19  Dick Porter  <dick@ximian.com>
572
573         * threads.c: Set the new thread's stack size to 2M.  Fix needed
574         for BSD, reported by Martin Dvorak <md@9ll.cz>
575
576 2003-05-16  Dick Porter  <dick@ximian.com>
577
578         * io.h:
579         * io.c: Implement GetTempPath()
580
581 2003-05-16  Dick Porter  <dick@ximian.com>
582
583         * processes.c (CreateProcess): Set some error codes
584
585 2003-05-12  Dick Porter  <dick@ximian.com>
586
587         * misc.c (_wapi_calc_timeout): Cope with overflowing tv_nsec.
588         Patch from Martin Dvorak <mdvorak@ninell.cz>.
589
590 2003-05-10  Dick Porter  <dick@ximian.com>
591
592         * io.c (CopyFile): Copy file mode as well as file data.  Based on
593         suggestion by Giuseppe Greco <giuseppe.greco@agamura.com>, bug
594         42706.
595
596 2003-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
597
598         * handles.c: don't call GC_gcollect when creating new handles.
599
600 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
601
602         * handles.c: added some debugging code. Call GC_gcollect
603         before creating a new handle. It makes Lupus' test run smoother and
604         faster (from 62 to 83 request per second). Notice that calling
605         GC_finalizer_notifier if needed (GC_should_invoke_finalizer ()) does
606         not improve nor degrade the performance, so i don't do it.
607
608 2003-05-02  Dick Porter  <dick@ximian.com>
609
610         * sockets.c: Rearrange closesocket() and socket_close_private(),
611         and remember to unref the handle, so we don't leak socket handles.
612         Fix from Pelle Johnsen <pelle.johnsen@mail.dk>
613
614 2003-04-11  Dick Porter  <dick@ximian.com>
615
616         * atomic.h: ARM atomic operations by Malte Hildingson
617         <tds00mahi@tellus.thn.htu.se>
618
619 Tue Apr 8 11:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
620
621         * atomic.h: fix macosx build by "Urs C. Muff" <umuff@quark.com>.
622
623 2003-04-03  Martin Baulig  <martin@ximian.com>
624
625         The following change is conditional to `WITH_INCLUDED_LIBGC'
626         which is not yet enabled by default.
627
628         * threads.c (SuspendThread, ResumeThread): Fully implemented this.
629         (gc_init): New static function; install a signal handler for
630         SIGPWR which is used to suspend threads.  [FIXME: it SIGPWR
631         doesn't exist on all Unix systems, we need to find another
632         signal].
633         (mono_wapi_push_thread_stack): New public function.  Tells the
634         garbage collector about the current stack pointer of a suspended
635         thread.
636
637 2003-04-03  Martin Baulig  <martin@ximian.com>
638
639         * timed-thread.h (TimedThread): Added `suspended_sem',
640         `suspend_count' and `stack_ptr'.
641
642 2003-03-28  Dick Porter  <dick@ximian.com>
643
644         * atomic.h: PPC support gratiously donated to the public domain
645         by John Duncan <jddst19@mac.com>
646
647 2003-03-20  Dick Porter  <dick@ximian.com>
648
649         * sockets.c (_wapi_connect): If connect() fails with EACCES, try
650         setting SO_BROADCAST and connecting again.  Fixes bug 39178.
651
652 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
653
654         * processes.c: included Jerome Laban's patch and call SetLastError when
655         the executable is not found.
656
657 2003-03-03  Dick Porter  <dick@ximian.com>
658
659         * io.c (CreateFile): Try opening directories readonly, so that
660         timestamps can be adjusted.  Patch by Elan Feingold
661         <efeingold@mn.rr.com>.
662
663 2003-02-25  Dick Porter  <dick@ximian.com>
664
665         * shared.c (_wapi_shm_attach): Return a failure code on system
666         call errors, rather than exiting.
667
668 2003-02-21  Dick Porter  <dick@ximian.com>
669
670         * processes.c (GetCurrentProcessId): Use the current process
671         handle to return the process ID, as getpid() is unreliable
672         (linuxthreads gives each thread a different pid).  Fixes bug
673         37550.
674
675 2003-02-21  Dick Porter  <dick@ximian.com>
676
677         * io.c (FindNextFile): Skip over dangling symlinks.  Fixes bug
678         34076.
679
680 2003-02-11  Dick Porter  <dick@ximian.com>
681
682         * timefuncs.h: 
683         * timefuncs.c: Added GetTickCount()
684
685 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
686
687         * error.c: added WSA_EHOSTUNREACH mapping.
688
689 2003-01-26  Miguel de Icaza  <miguel@ximian.com>
690
691         * io.c (SetFileAttributes): This routine is not currently
692         implemented for the general case, but I added a special case to
693         set the executable bit on Linux.
694
695 Wed Jan 15 15:55:40 CET 2003 Paolo Molaro <lupus@ximian.com>
696
697         * sockets.h, daemon.c, io.c: compilation fixes on MacOSX.
698
699 2003-01-08  Dick Porter  <dick@ximian.com>
700
701         * sockets.c: Fixed setting blocking mode to true (fixes bug 36388)
702
703 2002-12-11  Juli Mallett  <jmallett@FreeBSD.org>
704
705         * daemon.c, handles-private.h, handles.c, wapi-private.h:
706         Check for an implementation which says it supports
707         _POSIX_THREAD_PROCESS_SHARED, rather than just one that
708         defines the symbol.  Defined but with a value of -1 still
709         means that it is unsupported.
710
711 2002-12-08  Martin Baulig  <martin@ximian.com>
712
713         * handles.c (_wapi_handle_new): Create new non-shared handles with
714         an initial refcount of 1, not 0.
715
716 2002-11-22  Dietmar Maurer  <dietmar@ximian.com>
717
718         * threads.c (TlsGetValue): removed unnecessary mutex
719
720 2002-11-20  Dick Porter  <dick@ximian.com>
721
722         * timed-thread.c (_wapi_timed_thread_attach): Attached threads
723         need to store their data structure too.
724
725         * threads.c: Make sure the threading data is initialised wherever
726         it is needed
727
728 2002-11-15  Dick Porter  <dick@ximian.com>
729
730         * timed-thread.c: Removed unneeded parameters in
731         _wapi_timed_thread_attach().
732
733         * threads.c: Renamed AttachThread() to make it not look like
734         external API.  Removed unneeded parameters.
735
736 2002-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
737
738         * error.[ch]: added errno_to_WSA (). It displays a warning and return
739         WSASYSCALLFAILURE if there is no error mapping for the given errno,
740
741         * sockets.c: use errno_to_WSA and fixed display of warning for h_errno.
742
743 2002-10-31  Dick Porter  <dick@ximian.com>
744
745         * io.h: 
746         * io.c: Define and use INVALID_FILE_ATTRIBUTES
747
748 2002-10-07  Dick Porter  <dick@ximian.com>
749
750         * timefuncs.c:
751         * daemon.c: Use a more accurate time source for process start and
752         end times.
753
754 2002-10-03  Dick Porter  <dick@ximian.com>
755
756         * daemon.c:
757         * handles.c:
758         * threads.c:  Fixes for freebsd.  Make sure that mutex and condition
759         creation and deletion happen in the process that owns them, when
760         POSIX shared thread objects aren't supported.  This breaks on
761         freebsd, as pthread_t is a pointer to data.
762
763 2002-10-02  Dick Porter  <dick@ximian.com>
764
765         * shared.c: Use mmap() instead of sysv shm for the shared data.
766
767         * wapi-private.h (_WAPI_HANDLE_VERSION): Reset back to 0, for the
768         new system
769
770         * daemon-private.h: 
771         * daemon.c: mmap()ed regions survive fork, so just pass the
772         pointer to _wapi_daemon_main instead of mapping it again.
773
774 2002-10-01  Dick Porter  <dick@ximian.com>
775
776         * timed-thread.c: Kludge for CREATE_SUSPENDED thread creation.
777         Unfortunately libgc uses the same thread suspend technique that I
778         want to, and the two don't mix: libgc will deadlock when it tries
779         to stop the world if a thread has already been suspended by
780         someone else.  Just do the simple suspended create rather than the
781         general purpose thread suspension for now.
782
783         * threads.c: Pass create flags to the timed_thread create call, to
784         implement suspended thread creation.  ResumeThread() partially
785         implemented, to cope with the case where a newly created but
786         suspended thread is launched.
787
788 2002-09-30  Dick Porter  <dick@ximian.com>
789
790         * sockets.c (ioctlsocket): Set non-blocking mode in a better way,
791         with fcntl.
792
793 2002-09-27  Dick Porter  <dick@ximian.com>
794
795         * semaphores.c: Only include semaphore.h if it's present. Patch
796         for BSD from jmmv@hispabsd.org (Julio Merino).
797
798 2002-09-27  Dick Porter  <dick@ximian.com>
799
800         * processes.c: Pass environment and working directory to the
801         daemon when forking.  Don't let argv[0] be duplicated when looking
802         for the program name.  Implement EnumProcessModules (simple
803         version for now, lsof-style later if needed), GetModuleBaseName,
804         {Get,Set}ProcessWorkingSetSize (just faked, because the vm hints
805         aren't available on Linux).
806
807         * process-private.h: Store the process name, and the working set
808         min and max
809
810         * handles.c:
811         * handles-private.h: New functions to store and retrieve an array
812         of strings in the scratch space
813
814         * daemon.c: Don't miss deleting some handles when a client exits
815         (we used to rely on the client doing the final cleanup, but
816         obviously if the client is no longer there the daemon has to do
817         it).
818
819         Process forking now sets the environment and the working
820         directory.
821
822         * io.c: Don't confuse fd 0 with an unassigned handle struct
823
824         * atomic.h: Add a google cache alternative to the msdn URL
825
826 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
827
828         * sockets.c:
829         (_wapi_recvfrom): added ECONNRESET to the switch.
830
831 2002-09-24  Mark Crichton  <crichton@gimp.org>
832
833         * atomic.h: Yea.  On linux, sparc isn't sparc, it's __sparc__.
834         Added to ifdef.
835
836 2002-09-19  Mark Crichton  <crichton@gimp.org>
837
838         * daemon.c, shared.c: Added NEED_LINK_UNLINK for systems that
839         dont have Linux's abstract filesystem for sockets.
840
841 2002-09-19  Mark Crichton  <crichton@gimp.org>
842
843         * atomic.h: Added SPARC atomic asm code.
844         * daemon.c, handles-private.h, handles.c, wapi-private.h:
845         undefined _POSIX_THREAD_PROCESS_SHARED.  This actually exists on
846         Solaris 9, however, the code paths don't seem to work.  More testing
847         on the shared case is *really* needed.
848
849 2002-09-03  Dick Porter  <dick@ximian.com>
850
851         * threads.h: 
852         * threads.c: Removed PosixKillThread(), because it's not in the
853         w32 api
854
855 2002-08-20  Dick Porter  <dick@ximian.com>
856
857         * handles.c (_wapi_handle_scratch_store): Made stored byte lengths
858         multiples of 4 bytes, to keep header structures aligned.  Needed
859         for sparc, at least. (Patch from crichton@gimp.org)
860
861         * handles.c: Removed 'disable_shm' variable (we've defaulted to
862         building with shm enabled for months now)
863
864 2002-08-19  Dick Porter  <dick@ximian.com>
865
866         * daemon.c: Rewrote the poll() loop to use GIOChannels instead,
867         for legacy NeXT-based systems.
868
869 2002-08-12  Dick Porter  <dick@ximian.com>
870
871         * atomic.h: Rename some parameters to avoid c++ keywords (Patch
872         from Joseph Wenninger <kde@jowenn.at>)
873
874 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
875
876         * threads.c: use fast spinlocks by default
877
878 2002-08-02  Dick Porter  <dick@ximian.com>
879
880         * io.c (GetStdHandle): Add a handle reference when returning a
881         duplicate console handle.  This fixes the unref_handle errors in
882         NUnit.
883
884 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
885
886         * threads.c (TLS_PTHREAD_MUTEX): define this because else some
887         tests does not work
888
889 2002-08-01  Dick Porter  <dick@ximian.com>
890
891         * threads.c: Use atomic spinlocks in TLS functions
892
893         * mono-spinlock.h:
894         * Makefile.am: Added mono-spinlock.h
895
896 2002-07-21  Jeffrey Stedfast  <fejj@ximian.com>
897
898         * daemon-messages.c: #include <sys/types.h> and <sys/sockets.h> -
899         these are needed for sendmsg() and also for struct msghdr (at
900         least on Solaris). Solaris still won't build because struct msghdr
901         doesn't have msg_flags, msg_control, or msg_controllen members.
902         (CMSG_SPACE): Define for systems that don't have it.
903         (CMSG_LEN): Same.
904
905 2002-07-20  Dick Porter  <dick@ximian.com>
906
907         * wapi-private.h:
908         * io-private.h:
909         * io.h:
910         * io.c:
911         * handles.c: Implemented pipe handles
912         
913         * handles.c:
914         * daemon.c: Fixed bug in handle closing.
915
916         * shared.c:
917         * daemon.c: Forked processes now close all open file descriptors.
918
919 Fri Jul 19 19:05:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
920
921         * sockets.h, io-layer.h, critical-sections.h: don't include config.h
922         in header files.
923
924 2002-07-19  Martin Baulig  <martin@gnome.org>
925
926         * threads.c (ExitThread): Call exit() if no threads has been
927         created yet.
928
929 2002-07-17  Dick Porter  <dick@ximian.com>
930
931         * daemon-messages.c: Freebsd fixes from Andreas Kohn
932         <andreas.kohn@gmx.net>
933
934 2002-07-15  Dick Porter  <dick@ximian.com>
935
936         * io.c: Removed bogus console_flush() method, that was just cut
937         and pasted from file_flush when I separated the two handle types.
938
939 2002-07-12  Dick Porter  <dick@ximian.com>
940
941         * io.c (convert_from_flags): Fixed misunderstanding wrt fcntl
942         flags.  Fixes bug 27633.
943
944 2002-07-12  Dick Porter  <dick@ximian.com>
945
946         * wapi-private.h:
947         * handles.c:
948         * daemon.c: Use size of sockaddr_un.sun_path from config.h
949
950 2002-07-12  Dick Porter  <dick@ximian.com>
951
952         * processes.c (CreateProcess): Send stdin, stdout and stderr
953         handles if the startup info doesnt specify new ones
954
955         * io.c (GetStdHandle): Return the same handle when the same
956         standard handle is requested
957
958         * handles.c: Pass file descriptors when forking
959
960         * daemon.c: Use supplied file descriptors when forking a new
961         process
962
963         * daemon-messages.h: 
964         * daemon-messages.c: Pass stdin, stdout and stderr file
965         descriptors to the daemon (used when forking)
966
967 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
968
969         * daemon.c (_wapi_daemon_main): Use sizeof
970         (main_socket_address.sun_path) instead of hardcoded 108 value.
971
972         * handles.c (shared_init): Use sizeof
973         (shared_socket_address.sun_path) instead of hardcoded 108 value.
974
975 2002-07-10  Dennis Haney  <davh@davh.dk>
976
977         * shared.c:
978         * handles.c:
979         * daemon.c: Lots of documentation, some added error checking, and
980         code readability improvements.
981
982         * daemon-messages.h: Add the Error request type to improve error
983         checking.
984
985         * daemon-messages.c: Do a bit more error checking on send() and
986         recv(), and log errors with a higher severity level.
987
988 2002-07-04  Dick Porter  <dick@ximian.com>
989
990         * daemon.c (process_process_fork): Fix argument handling, due to
991         buggy understanding of g_strsplit() behaviour.
992
993 2002-07-03  Dick Porter  <dick@ximian.com>
994
995         * threads.h:
996         * threads.c: Implement OpenThread().  Define access-control values
997         for thread handles.
998
999         * wapi.h:
1000         * processes.h:
1001         * access.h:
1002         * Makefile.am: Added access.h, to hold shared access-control
1003         definitions
1004
1005 2002-07-02  Dick Porter  <dick@ximian.com>
1006
1007         * wapi-private.h (_WAPI_HANDLE_VERSION): New protocol version
1008         
1009 2002-07-02  Dick Porter  <dick@ximian.com>
1010
1011         * handles.c (shared_init): Make a second attempt to contact the
1012         daemon if the shared memory attach succeeds, but the connect()
1013         fails. (This copes with the daemon crashing without cleaning up
1014         the shared memory.)
1015
1016         * Makefile.am: 
1017         * daemon-private.h:
1018         * daemon.c:
1019         * shared.c (_wapi_shm_attach): Don't exec() anything when we fork
1020         the daemon, it's now built into the library.
1021
1022 2002-06-25  Dick Porter  <dick@ximian.com>
1023
1024         * handles.c:
1025         * handles-private.h:
1026         * daemon-messages.h:
1027         * daemon.c: Process forking and handle data management
1028
1029         * processes.h:
1030         * process-private.h:
1031         * processes.c: Process forking and other support functions
1032
1033 2002-06-25  Dick Porter  <dick@ximian.com>
1034
1035         * versioninfo.h: PE resource decoding
1036
1037         * unicode.c (_wapi_unicode_to_utf8): g_utf16_to_utf8 doesnt need
1038         to be told the string length
1039
1040         * io.c: Removed the ACTUALLY_DO_UNICODE option.  Fixed some leaks.
1041         Moved _wapi_time_t_to_filetime and the WapiFileTime typedef to
1042         timefuncs.c
1043
1044 2002-06-12  Dick Porter  <dick@ximian.com>
1045
1046         * daemon.c: 
1047         * daemon-messages.c: Handle SIGPIPE in a non-stupid way in the
1048         daemon, if MSG_NOSIGNAL isn't available.  Thanks to Jaroslaw
1049         Kowalski <jarek@atm.com.pl> for pointing out the bogosity.
1050
1051 2002-06-10  Jaroslaw Kowalski <jarek@atm.com.pl>
1052
1053         * sockets.c, daemon-messages.c: Prevent SIGPIPE from being raised
1054         when writing to a closed socket.
1055
1056 2002-06-08  Jeffrey Stedfast  <fejj@ximian.com>
1057
1058         * mono-mutex.c (mono_once): New convenience function for my
1059         previous fix.
1060
1061         * handles.c:
1062         * error.c: 
1063         * critical-sections.c: 
1064         * threads.c: 
1065         * sockets.c: 
1066         * semaphores.c: 
1067         * processes.c: 
1068         * mutexes.c: 
1069         * io.c: 
1070         * events.c: 
1071         * atomic.c: Use mono_once() rather than pthread_once().
1072
1073 2002-06-06  Jeffrey Stedfast  <fejj@ximian.com>
1074
1075         * handles.c (_wapi_handle_new): pthread_once() is not atomic, so
1076         if multiple threads all try to call _wapi_handle_new() before the
1077         shared data has been initialized, it is possible that we could get
1078         into a condition where shared_init() is being executed and later
1079         threads will pass by pthread_once() due to the fact that it has
1080         already been called and so therefor will attempt to use the shared
1081         data before it has been completely initialized. If we instead use
1082         a standard mutex locking mechanism around shared_init(), we can
1083         avoid the situation entirely. By wrapping the mutex locking in a
1084         check to see if we've already initialized the data, we can even
1085         avoid wasting resources by having to lock/unlock the mutex in any
1086         later calls (the only time we'd have to worry about
1087         locking/unlocking is the initial race to call shared_init() at
1088         startup).
1089
1090 Sat Jun 1 13:27:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
1091
1092         * atomic.h: inline asm fixes from Dennis Haney (davh@davh.dk).
1093
1094 Fri May 31 16:21:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
1095
1096         * daemon.c, handles.c: rename "sun" local var since it's apparently
1097         a #define on Solaris.
1098
1099 Fri May 31 15:40:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
1100
1101         * daemon-messages.c: work-around MSG_NOSIGNAL missing on some
1102         platforms.
1103
1104 2002-05-15  Dick Porter  <dick@ximian.com>
1105
1106         * wait.c: Fix a deadlock in WaitForMultipleObjects
1107
1108 2002-05-14  Dick Porter  <dick@ximian.com>
1109
1110         * io.c: Fix a cut&paste error, found by
1111         Jaroslaw Kowalski <jarek@atm.com.pl>
1112
1113 2002-05-10  Dan Lewis  <dihlewis@yahoo.co.uk>
1114
1115         * io.c: Nasty typo.
1116
1117 2002-05-09  Dick Porter  <dick@ximian.com>
1118
1119         * threads.c: 
1120         * semaphores.c: 
1121         * processes.c: 
1122         * mutexes.c: 
1123         * handles-private.h: 
1124         * events.c: 
1125         * Makefile.am: Remove now-unused file wait-private.h
1126
1127 2002-05-08  Dick Porter  <dick@ximian.com>
1128
1129         * shared.c: Better error messages, and report when daemon
1130         connection fails rather than blocking forever.  Do some more
1131         shared memory sanity checking.
1132
1133         * handles.c: Better error messages when connecting to shared
1134         memory and the handle daemon.  Fall back to non-shared handles if
1135         an error occurs.  Set the default back to 'shared handles'.  Fix a
1136         crashing bug in scratch space allocation that mangled the block
1137         headers.
1138
1139 2002-05-07  Miguel de Icaza  <miguel@ximian.com>
1140
1141         * handles.c (shared_init): Disable SHM for now, people have too
1142         many problems with this, and the diagnostics are not helping.
1143
1144 2002-05-06  Dan Lewis  <dihlewis@yahoo.co.uk>
1145
1146         * io.c: CreateFile sets win32 last error.
1147
1148 2002-05-05  Dick Porter  <dick@ximian.com>
1149
1150         * wapi-private.h: 
1151         * handles-private.h:
1152         * io.c: 
1153         * io-private.h:
1154         * mutexes.c: 
1155         * mutex-private.h: 
1156         * processes.c: 
1157         * process-private.h: 
1158         * semaphores.c: 
1159         * semaphore-private.h: 
1160         * sockets.c: 
1161         * socket-private.h: 
1162         * events.c: 
1163         * event-private.h: Simplify the WapiHandleOps struct: take out all
1164         the file-specific entries, leaving just the items that operate on
1165         handles themselves.  Split the close operation into shared and
1166         private parts: shared close is called by the daemon.
1167
1168         * handles.c: As above, but also pass handle allocation, ref and
1169         unref operations to the daemon.  Populate the handle_ops array at
1170         compile time, because the daemon needs to call ops on handles too.
1171         Don't bother to track open handle counts any more, the daemon does
1172         that.
1173         
1174         * threads.c: 
1175         * thread-private.h: As above, but also make the thread data
1176         handle-private.
1177
1178         * shared.c: Fork a handle daemon if the calling process created
1179         the shared memory segment.
1180
1181         * daemon.c:
1182         * daemon-messages.c:
1183         * daemon-messages.h:
1184         * Makefile.am: Build a daemon to manage handle allocation and
1185         destruction without needing to lock the shared memory
1186
1187 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
1188
1189         * atomic.c: Changed to use a normal mutex rather than a spinlock
1190         since a lot of platforms seem to not have them :\
1191
1192 2002-04-30  Dick Porter  <dick@ximian.com>
1193
1194         * Completely rewrote the handle waiting code: removed the helper
1195         thread and its attendant complexity.  All handle waiting is now
1196         abstracted into the WaitForSingleObject() and
1197         WaitForMultipleObjects() functions.
1198
1199         * Implemented inter-process sharing of handles using sysv shared
1200         memory.  This makes handles even more opaque, with a handle now
1201         just an index into an array.
1202         
1203 2002-04-25  Dan Lewis  <dihlewis@yahoo.co.uk>
1204
1205         * io.c: unitialized pointer in GetCurrentDirectory.
1206
1207 Sat Apr 20 13:37:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
1208
1209         * threads.c: destroy the mutex at thread destruction
1210         (if/when thread destruction code will be actually called).
1211         When protecting a tls data pointer from the gc, use also the 
1212         thread id in the key.
1213         
1214 Wed Apr 17 18:36:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
1215
1216         * timed-thread.c: avoid race condition when setting the thread to
1217         detached.
1218
1219 2002-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1220
1221         * jit.h: to more #include lines to avoid breaking compilation
1222         under windows when upgrading mingw and w32api to version
1223         1.3 (thanks Dick!).
1224
1225 2002-04-16  Dick Porter  <dick@ximian.com>
1226
1227         * atomic.h: Explanatory comment about lack of 80386 support
1228
1229 2002-04-15  Dick Porter  <dick@ximian.com>
1230
1231         * atomic.h: use xaddl for InterlockedIncrement() and
1232         InterlockedDecrement().  Use cmpxchgl in a loop for
1233         InterlockedExchange() and InterlockedExchangePointer().
1234
1235 Mon Apr 15 13:31:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
1236
1237         * unicode.c: fix unicode_len() to not access uninitialized memory
1238         (and updated to conform to mono code style).
1239
1240 Fri Mar 29 17:15:11 CET 2002 Paolo Molaro <lupus@ximian.com>
1241
1242         * io.c: EEXISTS is ignored for directory creation.
1243         * mono-mutex.h: remove silly "pragma }" that emacs users insert
1244         because they use a broken editor:-)
1245
1246 2002-03-28  Dick Porter  <dick@ximian.com>
1247
1248         * sockets.h: 
1249         * sockets.c: 
1250         * io.c: 
1251         * handles.h: 
1252         * handles.c: Warning cleanups
1253
1254 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
1255
1256         * unicode.h, unicode.c: changed to gunichar2
1257         * io.h, io.c: changed strings to gunichar2*, added
1258         SetFileAttributes(), GetCurrentDirectory(), SetCurrentDirectory(),
1259         some fixes to FindFirstFile() and friends.
1260
1261 2002-03-26  Dick Porter  <dick@ximian.com>
1262
1263         * types.h: Implement the large integer struct
1264
1265         * timefuncs.h:
1266         * timefuncs.c: Dummy functions that don't yet implement
1267         QueryPerformanceCounter() and QueryPerformanceFrequency()
1268
1269         * threads.h:
1270         * threads.c: Implement SleepEx()
1271
1272         * system.h:
1273         * system.c: Beginnings of GetSystemInfo()
1274
1275         * mono-mutex.c (pthread_mutex_timedlock): Fix a ms/ns conversion
1276         thinko
1277
1278         * context.h:
1279         * context.c: Dummy function that doesnt yet implement
1280         GetThreadContext()
1281
1282         * atomic.h: 
1283         * atomic.c: Interlocked functions
1284
1285 Mon Mar 25 13:01:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1286
1287         * threads.c: use a gc-safe hash table to store tls pointers.
1288
1289 2002-03-22  Dick Porter  <dick@ximian.com>
1290
1291         * threads.c: Fix a race condition where a thread can start and
1292         exit before the handle has been properly initialised (no reason
1293         why the handle couldn't be initialised beforehand, so do so)
1294
1295         Fix a ms to ns conversion magnitude thinko.
1296
1297 2002-03-21  Dick Porter  <dick@ximian.com>
1298
1299         * semaphores.c: Fix a problem when waiting for one or more
1300         semaphores, and another semaphore is Released (all waiting
1301         semaphores assumed they were signalled)
1302
1303 2002-03-29  Dan Lewis <dihlewis@yahoo.co.uk>
1304
1305         * io.h, io.c, uglify.h: added MoveFile, CopyFile, CreateDirectory,
1306         RemoveDirectory, GetFileAttributes, GetFileAttributesEx
1307
1308 2002-03-19  Dietmar Maurer  <dietmar@ximian.com>
1309
1310         * threads.c (Sleep): bug fix: 1ms == 1000000ns
1311
1312 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
1313
1314         * io.h, io.c, events.c, mutexes.c, semaphores.c, sockets.c,
1315         threads.c, io.c: added flush method to handles.
1316
1317         * io.c: FlushFileBuffers() and FindFirstFile() functions.
1318
1319 Thu Mar 7 17:21:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1320
1321         * threads.c, timed-thread.c, wait.c: Boehm-GC anable.
1322
1323 2002-02-20  Dick Porter  <dick@ximian.com>
1324
1325         * io-layer.h: Always build without cygwin support on windows
1326
1327 Mon Feb 18 15:50:59 CET 2002 Paolo Molaro <lupus@ximian.com>
1328
1329         * sockets.c: #undef DEBUG.
1330
1331 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
1332
1333         * io-layer.h: conditionally include sys/filio.h and sys/sockio.h
1334         for FIONBIO, FIONREAD, and SIOCATMARK.
1335
1336 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
1337
1338         * sockets.c: conditionally include sys/filio.h and sys/sockio.h
1339         for FIONBIO, FIONREAD, and SIOCATMARK.
1340
1341 2002-02-13  Dick Porter  <dick@ximian.com>
1342
1343         * sockets.c: Implement shutdown and select
1344
1345 2002-02-13  Jeffrey Stedfast  <fejj@ximian.com>
1346
1347         * mono-mutex.[c,h]: New source files that thinly wrap all pthread
1348         functions that take pthread_mutex_t and/or pthread_mutexattr_t
1349         arguments for the sake of portability. Implements recursive
1350         mutexes and pthread_mutex_timedlock.
1351
1352         * critical-sections.c:
1353         * events.c:
1354         * handles.c:
1355         * mutexes.c:
1356         * semaphores.c:
1357         * threads.c:
1358         * timed-thread.c:
1359         * wait.c: Use the mono-mutex wrapper portability functions/macros.
1360
1361         * pthread-compat.[c,h]: Replaced by mono-mutex.[c,h]
1362
1363 2002-01-23  Dick Porter  <dick@ximian.com>
1364
1365         * sockets.c: Networking support, mostly wrapping BSD socket APIs
1366         with handle code, and translating errno into w32 error codes.
1367
1368         * macros.h: Some w32 macros used with the socket support
1369
1370         * error.c: Implemented GetLastError() and SetLastError()
1371
1372         * Makefile.am: Added sockets, with kludge to override some symbols
1373
1374 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
1375
1376         * unicode.c (_wapi_unicode_to_utf8): byteswap UTF16 strings before
1377         passing them to iconv
1378         (_wapi_unicode_to_utf8): only swap bytes on LE systems, remove bug
1379         from previous commit.
1380
1381 2001-12-11  Dick Porter  <dick@ximian.com>
1382
1383         * io.c: Implement DeleteFile(), GetFileTime(), SetFileTime() and
1384         FileTimeToSystemTime().
1385
1386         * unicode.c (unicode_len): Nasty way of finding length of unicode
1387         string with embedded NULLs (counts until two NULLs together).
1388
1389         * mutexes.c (mutex_close): 
1390         * events.c (event_close): Release the internal pthreads resources
1391
1392 2001-11-26  Dick Porter  <dick@ximian.com>
1393
1394         * critical-sections.c:
1395         * events.c:
1396         * handles.c:
1397         * io.c:
1398         * mutexes.c:
1399         * semaphores.c:
1400         * threads.c:
1401         * timed-thread.c:
1402         * wait.c: turn off DEBUG messages
1403
1404 2001-11-22  Dick Porter  <dick@ximian.com>
1405
1406         * handles.c (SignalObjectAndWait): Implement
1407
1408         * wait.c (WaitForSingleObject): Fix case where timeout == 0
1409
1410         * threads.c:
1411         * semaphores.c:
1412         * mutexes.c:
1413         * io.c:
1414         * events.c: Support for SignalObjectAndWait
1415         
1416 2001-11-21  Dick Porter  <dick@ximian.com>
1417
1418         * events.c:
1419         * handles.c:
1420         * mutexes.c:
1421         * semaphores.c:
1422         * threads.c:
1423         * wait.c: Reliable method of returning which handle was signalled
1424         on return from WaitForMultipleObjects().
1425
1426 2001-11-21  Dick Porter  <dick@ximian.com>
1427
1428         * events.c: Implement events
1429
1430 2001-11-15  Dick Porter  <dick@ximian.com>
1431
1432         * mutexes.c: Implement mutexes
1433
1434         * threads.c: 
1435         * semaphores.c: 
1436         * misc.c: Factor out some common code
1437
1438 2001-11-13  Dick Porter  <dick@ximian.com>
1439
1440         * threads.c: Implement TLS.  Implement GetCurrentThreadId(), and
1441         GetCurrentThread() by maintaining a hash of thread handles.
1442
1443         * threads.h: Define thread and process creation flags
1444
1445 2001-11-12  Dick Porter  <dick@ximian.com>
1446
1447         * critical-sections.c: Implement critical sections
1448
1449 2001-11-12  Dick Porter  <dick@ximian.com>
1450
1451         * semaphores.c: Implement semaphores
1452
1453         * wait.c (wait_for_item): Maintain a wait count rather than count
1454         signalled booleans.
1455
1456         * threads.c (thread_wait_multiple): Don't lock the wait item, that
1457         will block other wait threads
1458
1459 2001-11-11  Dick Porter  <dick@ximian.com>
1460
1461         * Makefile.am: Rename some automake variables
1462         (from Nick Drochak <ndrochak@gol.com>)
1463
1464 2001-11-10  Dick Porter  <dick@ximian.com>
1465
1466         * Makefile.am (libwapiincludedir): Fix include destination
1467
1468         * .cvsignore: Ignore generated files
1469
1470 2001-11-10  Dietmar Maurer  <dietmar@ximian.com>
1471
1472         * pthread-compat.c: added some include files to make it compile on
1473         linux.
1474
1475 2001-11-08  Dick Porter  <dick@ximian.com>
1476
1477         * Initial checkin.
1478
1479         This is a library emulating the win32 threading and IO API.