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