2002-05-05 Dick Porter <dick@ximian.com>
[mono.git] / mono / io-layer / ChangeLog
1 2002-05-05  Dick Porter  <dick@ximian.com>
2
3         * wapi-private.h: 
4         * handles-private.h:
5         * io.c: 
6         * io-private.h:
7         * mutexes.c: 
8         * mutex-private.h: 
9         * processes.c: 
10         * process-private.h: 
11         * semaphores.c: 
12         * semaphore-private.h: 
13         * sockets.c: 
14         * socket-private.h: 
15         * events.c: 
16         * event-private.h: Simplify the WapiHandleOps struct: take out all
17         the file-specific entries, leaving just the items that operate on
18         handles themselves.  Split the close operation into shared and
19         private parts: shared close is called by the daemon.
20
21         * handles.c: As above, but also pass handle allocation, ref and
22         unref operations to the daemon.  Populate the handle_ops array at
23         compile time, because the daemon needs to call ops on handles too.
24         Don't bother to track open handle counts any more, the daemon does
25         that.
26         
27         * threads.c: 
28         * thread-private.h: As above, but also make the thread data
29         handle-private.
30
31         * shared.c: Fork a handle daemon if the calling process created
32         the shared memory segment.
33
34         * daemon.c:
35         * daemon-messages.c:
36         * daemon-messages.h:
37         * Makefile.am: Build a daemon to manage handle allocation and
38         destruction without needing to lock the shared memory
39
40 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
41
42         * atomic.c: Changed to use a normal mutex rather than a spinlock
43         since a lot of platforms seem to not have them :\
44
45 2002-04-30  Dick Porter  <dick@ximian.com>
46
47         * Completely rewrote the handle waiting code: removed the helper
48         thread and its attendant complexity.  All handle waiting is now
49         abstracted into the WaitForSingleObject() and
50         WaitForMultipleObjects() functions.
51
52         * Implemented inter-process sharing of handles using sysv shared
53         memory.  This makes handles even more opaque, with a handle now
54         just an index into an array.
55         
56 2002-04-25  Dan Lewis  <dihlewis@yahoo.co.uk>
57
58         * io.c: unitialized pointer in GetCurrentDirectory.
59
60 Sat Apr 20 13:37:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
61
62         * threads.c: destroy the mutex at thread destruction
63         (if/when thread destruction code will be actually called).
64         When protecting a tls data pointer from the gc, use also the 
65         thread id in the key.
66         
67 Wed Apr 17 18:36:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
68
69         * timed-thread.c: avoid race condition when setting the thread to
70         detached.
71
72 2002-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
73
74         * jit.h: to more #include lines to avoid breaking compilation
75         under windows when upgrading mingw and w32api to version
76         1.3 (thanks Dick!).
77
78 2002-04-16  Dick Porter  <dick@ximian.com>
79
80         * atomic.h: Explanatory comment about lack of 80386 support
81
82 2002-04-15  Dick Porter  <dick@ximian.com>
83
84         * atomic.h: use xaddl for InterlockedIncrement() and
85         InterlockedDecrement().  Use cmpxchgl in a loop for
86         InterlockedExchange() and InterlockedExchangePointer().
87
88 Mon Apr 15 13:31:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
89
90         * unicode.c: fix unicode_len() to not access uninitialized memory
91         (and updated to conform to mono code style).
92
93 Fri Mar 29 17:15:11 CET 2002 Paolo Molaro <lupus@ximian.com>
94
95         * io.c: EEXISTS is ignored for directory creation.
96         * mono-mutex.h: remove silly "pragma }" that emacs users insert
97         because they use a broken editor:-)
98
99 2002-03-28  Dick Porter  <dick@ximian.com>
100
101         * sockets.h: 
102         * sockets.c: 
103         * io.c: 
104         * handles.h: 
105         * handles.c: Warning cleanups
106
107 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
108
109         * unicode.h, unicode.c: changed to gunichar2
110         * io.h, io.c: changed strings to gunichar2*, added
111         SetFileAttributes(), GetCurrentDirectory(), SetCurrentDirectory(),
112         some fixes to FindFirstFile() and friends.
113
114 2002-03-26  Dick Porter  <dick@ximian.com>
115
116         * types.h: Implement the large integer struct
117
118         * timefuncs.h:
119         * timefuncs.c: Dummy functions that don't yet implement
120         QueryPerformanceCounter() and QueryPerformanceFrequency()
121
122         * threads.h:
123         * threads.c: Implement SleepEx()
124
125         * system.h:
126         * system.c: Beginnings of GetSystemInfo()
127
128         * mono-mutex.c (pthread_mutex_timedlock): Fix a ms/ns conversion
129         thinko
130
131         * context.h:
132         * context.c: Dummy function that doesnt yet implement
133         GetThreadContext()
134
135         * atomic.h: 
136         * atomic.c: Interlocked functions
137
138 Mon Mar 25 13:01:40 CET 2002 Paolo Molaro <lupus@ximian.com>
139
140         * threads.c: use a gc-safe hash table to store tls pointers.
141
142 2002-03-22  Dick Porter  <dick@ximian.com>
143
144         * threads.c: Fix a race condition where a thread can start and
145         exit before the handle has been properly initialised (no reason
146         why the handle couldn't be initialised beforehand, so do so)
147
148         Fix a ms to ns conversion magnitude thinko.
149
150 2002-03-21  Dick Porter  <dick@ximian.com>
151
152         * semaphores.c: Fix a problem when waiting for one or more
153         semaphores, and another semaphore is Released (all waiting
154         semaphores assumed they were signalled)
155
156 2002-03-29  Dan Lewis <dihlewis@yahoo.co.uk>
157
158         * io.h, io.c, uglify.h: added MoveFile, CopyFile, CreateDirectory,
159         RemoveDirectory, GetFileAttributes, GetFileAttributesEx
160
161 2002-03-19  Dietmar Maurer  <dietmar@ximian.com>
162
163         * threads.c (Sleep): bug fix: 1ms == 1000000ns
164
165 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
166
167         * io.h, io.c, events.c, mutexes.c, semaphores.c, sockets.c,
168         threads.c, io.c: added flush method to handles.
169
170         * io.c: FlushFileBuffers() and FindFirstFile() functions.
171
172 Thu Mar 7 17:21:52 CET 2002 Paolo Molaro <lupus@ximian.com>
173
174         * threads.c, timed-thread.c, wait.c: Boehm-GC anable.
175
176 2002-02-20  Dick Porter  <dick@ximian.com>
177
178         * io-layer.h: Always build without cygwin support on windows
179
180 Mon Feb 18 15:50:59 CET 2002 Paolo Molaro <lupus@ximian.com>
181
182         * sockets.c: #undef DEBUG.
183
184 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
185
186         * io-layer.h: conditionally include sys/filio.h and sys/sockio.h
187         for FIONBIO, FIONREAD, and SIOCATMARK.
188
189 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
190
191         * sockets.c: conditionally include sys/filio.h and sys/sockio.h
192         for FIONBIO, FIONREAD, and SIOCATMARK.
193
194 2002-02-13  Dick Porter  <dick@ximian.com>
195
196         * sockets.c: Implement shutdown and select
197
198 2002-02-13  Jeffrey Stedfast  <fejj@ximian.com>
199
200         * mono-mutex.[c,h]: New source files that thinly wrap all pthread
201         functions that take pthread_mutex_t and/or pthread_mutexattr_t
202         arguments for the sake of portability. Implements recursive
203         mutexes and pthread_mutex_timedlock.
204
205         * critical-sections.c:
206         * events.c:
207         * handles.c:
208         * mutexes.c:
209         * semaphores.c:
210         * threads.c:
211         * timed-thread.c:
212         * wait.c: Use the mono-mutex wrapper portability functions/macros.
213
214         * pthread-compat.[c,h]: Replaced by mono-mutex.[c,h]
215
216 2002-01-23  Dick Porter  <dick@ximian.com>
217
218         * sockets.c: Networking support, mostly wrapping BSD socket APIs
219         with handle code, and translating errno into w32 error codes.
220
221         * macros.h: Some w32 macros used with the socket support
222
223         * error.c: Implemented GetLastError() and SetLastError()
224
225         * Makefile.am: Added sockets, with kludge to override some symbols
226
227 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
228
229         * unicode.c (_wapi_unicode_to_utf8): byteswap UTF16 strings before
230         passing them to iconv
231         (_wapi_unicode_to_utf8): only swap bytes on LE systems, remove bug
232         from previous commit.
233
234 2001-12-11  Dick Porter  <dick@ximian.com>
235
236         * io.c: Implement DeleteFile(), GetFileTime(), SetFileTime() and
237         FileTimeToSystemTime().
238
239         * unicode.c (unicode_len): Nasty way of finding length of unicode
240         string with embedded NULLs (counts until two NULLs together).
241
242         * mutexes.c (mutex_close): 
243         * events.c (event_close): Release the internal pthreads resources
244
245 2001-11-26  Dick Porter  <dick@ximian.com>
246
247         * critical-sections.c:
248         * events.c:
249         * handles.c:
250         * io.c:
251         * mutexes.c:
252         * semaphores.c:
253         * threads.c:
254         * timed-thread.c:
255         * wait.c: turn off DEBUG messages
256
257 2001-11-22  Dick Porter  <dick@ximian.com>
258
259         * handles.c (SignalObjectAndWait): Implement
260
261         * wait.c (WaitForSingleObject): Fix case where timeout == 0
262
263         * threads.c:
264         * semaphores.c:
265         * mutexes.c:
266         * io.c:
267         * events.c: Support for SignalObjectAndWait
268         
269 2001-11-21  Dick Porter  <dick@ximian.com>
270
271         * events.c:
272         * handles.c:
273         * mutexes.c:
274         * semaphores.c:
275         * threads.c:
276         * wait.c: Reliable method of returning which handle was signalled
277         on return from WaitForMultipleObjects().
278
279 2001-11-21  Dick Porter  <dick@ximian.com>
280
281         * events.c: Implement events
282
283 2001-11-15  Dick Porter  <dick@ximian.com>
284
285         * mutexes.c: Implement mutexes
286
287         * threads.c: 
288         * semaphores.c: 
289         * misc.c: Factor out some common code
290
291 2001-11-13  Dick Porter  <dick@ximian.com>
292
293         * threads.c: Implement TLS.  Implement GetCurrentThreadId(), and
294         GetCurrentThread() by maintaining a hash of thread handles.
295
296         * threads.h: Define thread and process creation flags
297
298 2001-11-12  Dick Porter  <dick@ximian.com>
299
300         * critical-sections.c: Implement critical sections
301
302 2001-11-12  Dick Porter  <dick@ximian.com>
303
304         * semaphores.c: Implement semaphores
305
306         * wait.c (wait_for_item): Maintain a wait count rather than count
307         signalled booleans.
308
309         * threads.c (thread_wait_multiple): Don't lock the wait item, that
310         will block other wait threads
311
312 2001-11-11  Dick Porter  <dick@ximian.com>
313
314         * Makefile.am: Rename some automake variables
315         (from Nick Drochak <ndrochak@gol.com>)
316
317 2001-11-10  Dick Porter  <dick@ximian.com>
318
319         * Makefile.am (libwapiincludedir): Fix include destination
320
321         * .cvsignore: Ignore generated files
322
323 2001-11-10  Dietmar Maurer  <dietmar@ximian.com>
324
325         * pthread-compat.c: added some include files to make it compile on
326         linux.
327
328 2001-11-08  Dick Porter  <dick@ximian.com>
329
330         * Initial checkin.
331
332         This is a library emulating the win32 threading and IO API.
333
334