OSDN Git Service

update to newer autoconf
[pf3gnuchains/pf3gnuchains4x.git] / winsup / cygserver / ChangeLog
1 2006-05-24  Christopher Faylor  <cgf@timesys.com>
2
3         * configure.in: Update to newer autoconf.
4         (thanks to Steve Ellcey)
5         * configure: Regenerate.
6         * aclocal.m4: New file.
7
8 2006-01-12  Corinna Vinschen  <corinna@vinschen.de>
9
10         * wincap.cc: New file.
11         * wincap.h: New file.
12         * Makefile.in: Accomodate having our own wincap implementation now.
13
14 2006-01-09  Corinna Vinschen  <corinna@vinschen.de>
15
16         Check FreeBSD upstream changes and apply important patches.
17         * sysv_sem.cc (__semctl): Check copyin return value (from 1.76).
18         * sysv_shm.cc (shminit): Actually use the iterating variable in the
19         for loop when trying to avoid overflow (from 1.102).
20
21 2005-11-10  Corinna Vinschen  <corinna@vinschen.de>
22
23         * bsd_helper.cc (securityinit): New function.  Move initialization
24         of security related variables from ipcinit here.
25         * bsd_helper.h (securityinit): Add prototype.
26         * cygserver.cc (main): Call securityinit right after wincap.init.
27
28 2005-11-10  Corinna Vinschen  <corinna@vinschen.de>
29
30         * bsd_log.cc (_vpanic): LOG_EMERG is overkill, use LOG_CRIT.
31
32 2005-11-09  Corinna Vinschen  <corinna@vinschen.de>
33
34         * process.cc (process_cache::process): Fix maximum process condition.
35
36 2005-10-24  Corinna Vinschen  <corinna@vinschen.de>
37
38         * README: Add description for new -p/--process-cache option.
39         * bsd_helper.cc (default_tun_check): Add kern.srv.process_cache_size
40         entry to tunable_params. Set max value of kern.srv.request_threads
41         to 310.
42         * cygserver.cc (SERVER_VERSION): Set to 1.20.
43         (print_usage): Print usage of new parameter -p.
44         (main): Add process cache parameter handling. Accomodate new max
45         value of request threads.
46         * cygserver.conf: Add kern.srv.process_cache_size tunable parameter.
47         Accomodate new max value of kern.srv.request_threads.
48         * process.cc: Fix a comment.
49         (process_cache::process_cache): Add max process cache size parameter.
50         Change _cache_add_trigger to manual reset event.
51         (struct pcache_wait_t): New struct used as parameter to
52         pcache_wait_thread.
53         (pcache_wait_thread): New thread function used for threaded process
54         cache.
55         (process_cache::wait_for_processes): Use threaded waiting if number
56         of processes to wait for is bigger than 62. Always check all processes
57         to avoid race under heavy load.
58         (process_cache::sync_wait_array): Remove useless assert. Reset
59         _cache_add_trigger right at the start since it's manual reset now.
60         Accomodate threaded waiting.
61         * process.h (process_cache::process_cache): Add max_procs parameter.
62         (process_cache::_max_process_count): New member.
63         (process_cache::_wait_array: Raise to allow up to 5 wait threads.
64         (process_cache::_process_array): Ditto.
65
66 2005-08-08  Christopher Faylor  <cgf@timesys.com>
67
68         * cygserver.cc (main): Call wincap.init() earlier to avoid a NULL
69         dereference.
70
71 2005-06-14  Corinna Vinschen  <corinna@vinschen.de>
72
73         * sysv_sem.cc (semu_list): Define static to avoid gcc 4.x compiler
74         warning.
75
76 2005-04-08  Corinna Vinschen  <corinna@vinschen.de>
77
78         * bsd_mutex.cc (msleep_cnt): Remove.
79         (msleep_max_cnt): Remove.
80         (msleep_arr): Remove.
81         (class msleep_sync_array): New class to encapsulate msleep/wakeup
82         thread synchronization.
83         (msleep_sync): New object pointer.
84         (msleep_init): Initialize new msleep_sync object.
85         (_mutex): Just call msleep_sync->enter() and msleep_sync->leave() for
86         thread synchronization. Improve debug output a bit more.
87         (wakeup): Just call msleep_sync->wakeup().
88         (wakeup_all): Whitespace fix.
89
90 2005-04-06  Corinna Vinschen  <corinna@vinschen.de>
91
92         * bsd_helper.cc (ipcexit_hookthread): Fix whitespace and handle leak.
93         * bsd_mutex.cc: Include stdlib.h, sys/msg.h and sys/sem.h.
94         (mtx_init): Initialize lock counter to 0.
95         (_mtx_lock): Increment and log mutex lock counter.
96         (mtx_owned): Add winpid argument. Return true only if mutex is
97         actually owned by process winpid.
98         (_mtx_assert): Add winpid argument accordingly.
99         (_mtx_unlock): Log owner and lock count.
100         (MSLEEP_MUTEX): Remove.
101         (MSLEEP_SEM): Ditto.
102         (MSLEEP_EVENT): Ditto.
103         (msleep_event_name): Ditto.
104         (msleep_cs): New global critical section.
105         (msleep_cnt): New global variable indicating msleep record usage.
106         (msleep_max_cnt): New global variable indicating msleep record size.
107         (msleep_arr): New global pointer to msleep records.
108         (msleep_init): Initialize msleep_cs. Allocate msleep_arr array.
109         (_msleep): Rewrite using new msleep_cs/msleep_arr based thread
110         synchronization. Don't be shy with debug output.
111         (wakeup): Rewrite using new msleep_cs/msleep_arr based thread
112         synchronization.
113         * bsd_mutex.h (struct mtx): Add lock counter for better debugging.
114         (mtx_owned): Declare with winpid argument.
115         (_mtx_assert): Ditto.
116         (mtx_assert): Define with winpid argument.
117         * cygserver.cc (version): Remove.
118         (SERVER_VERSION): New define, decoupling server version information
119         from source code control system.
120         (print_version): Simplify printing server version.
121         * process.cc (process::process): Fix wrong bracketing (and handle leak).
122         (process::~process): Only try to close _signal_arrived if valid.
123         * sysv_sem.cc: Include sys/smallprint.h.
124         (semundo_clear): Define with additional struct thread pointer argument.
125         Accomodate throughout.
126         (SEMUNDO_LOCKASSERT): Define with winpid argument. Accomodate
127         throughout.
128         (struct sem_undo): Define un_proc as pid_t on Cygwin. Accomodate
129         throughout.
130         (seminit): Improve debugging by adding the semid to the mutex name.
131         (semget): Correctly print key value as 64 bit hex value in debug
132         output.
133         (semexit_myhook): Remove Cygwin specific unlocking of mutexes owned
134         by exiting process.  Keep semaphore global lock throughout whole
135         function to avoid races.
136         * sysv_shm.cc (GIANT_REQUIRED): Define empty on Cygwin. We know that
137         Giant is locked.
138
139 2005-04-01  Corinna Vinschen  <corinna@vinschen.de>
140
141         * bsd_mutex.cc (_msleep): Whitespace fix.
142         * process.cc (process::process): Handle invalid signal_arrived values
143         more gracefully.
144
145 2004-12-30  Corinna Vinschen  <corinna@vinschen.de>
146
147         * bsd_mutex.cc: Include limits.h.
148         (MSLEEP_MUTEX): New define for third parameter to msleep_event_name.
149         (MSLEEP_SEM): Ditto.
150         (MSLEEP_EVENT): Ditto.
151         (msleep_event_name): Add third parameter to allow multiple
152         synchronization objects per ident.
153         (_msleep): Implement new synchronization technique to make sure
154         that all threads have been woken up by a corresponding wakeup call.
155         (wakeup): Ditto.
156
157 2004-10-18  Corinna Vinschen  <corinna@vinschen.de>
158
159         * sysv_sem.cc: Redefine offsetof to circumvent build problems with
160         gcc 3.4.
161
162 2004-10-04  Corinna Vinschen  <corinna@vinschen.de>
163
164         * bsd_mutex.cc (_msleep): Simplify event creation.  Revert change from
165         2004-08-24.  It should be unnecessary now.
166         * msg.cc (client_request_msg::serve): Release process critical
167         section as early as possible.
168         * sem.cc (client_request_sem::serve): Ditto.
169         * shm.cc (client_request_shm::serve): Ditto.
170         * process.cc: Use hold and release method calls instead of
171         EnterCriticalSection/LeaveCriticalSection calls throughout.
172         * process.h (_hold): Rename from hold.  Take filename and linenumber
173         parameter for logging.  Define matching hold macro.
174         (release): Ditto.
175
176 2004-10-01  Corinna Vinschen  <corinna@vinschen.de>
177
178         * sysv_sem.cc: Update to FreeBSD version 1.69.
179         1.68: Reduce the overhead of semop() by using the kernel stack
180         instead of malloc'd memory to store the operations array if it
181         is small enough to fit.
182         1.69: Adjust the number of processes waiting on a semaphore properly
183         if we're woken up in the middle of sleeping.
184
185 2004-09-23  Corinna Vinschen  <corinna@vinschen.de>
186
187         * sysv_shm.cc (kern_shmat): Avoid compiler warning.
188
189 2004-09-21  Corinna Vinschen  <corinna@vinschen.de>
190
191         * sysv_shm.cc (vm_object_reference): remove Cygwin specific define.
192         (vm_map_find): Ditto.
193         (vm_map_inherit): Ditto.
194         (kern_shmat): On Cygwin, take shmaddr just as is.  Don't call vm
195         system calls on Cygwin.  Add comment.
196
197 2004-09-15  Corinna Vinschen  <corinna@vinschen.de>
198
199         Fix copyright throughout.
200         Eliminate use of _impure_ptr outside Cygwin.
201         * bsd_helper.cc: Include errno.h instead of cygerrno.h.
202         * bsd_mutex.cc : Ditto.
203         * client.cc: Ditto.
204         * cygserver.cc: Ditto.
205         * process.cc: Don't build functions inside Cygwin.  Don't include
206         cygerrno.h.  Don't set errno.
207         * transport_pipes.cc (SET_ERRNO): New define.  Use througout.
208         * transport_sockets.cc (SET_ERRNO): Ditto.
209         (GET_ERRNO): Ditto.
210
211 2004-09-06  Corinna Vinschen  <corinna@vinschen.de>
212
213         * bsd_mutex.cc (_msleep): Disable resetting event object for now.
214
215 2004-08-31  Corinna Vinschen  <corinna@vinschen.de>
216
217         * sysv_shm.cc (kern_shmat): Add debug_printf's.
218
219 2004-08-24  Corinna Vinschen  <corinna@vinschen.de>
220
221         * bsd_mutex.cc (_msleep): Release process object while waiting.
222
223 2004-08-03  Corinna Vinschen  <corinna@vinschen.de>
224
225         * transport.cc (transport_layer_base::~transport_layer_base): Resurrect.
226         * transport.h (transport_layer_base::~transport_layer_base): Ditto.
227
228 2004-07-30  Corinna Vinschen  <corinna@vinschen.de>
229
230         * bsd_mutex.cc (_msleep): Reset event object and close it before
231         entering mutex.  Turn order of conditional for better readability.
232
233 2004-07-26  Corinna Vinschen  <corinna@vinschen.de>
234
235         * cygserver.conf: Describe relation between shmmaxpgs and SHMMAX.
236
237 2004-07-20  Corinna Vinschen  <corinna@vinschen.de>
238
239         * bsd_helper.cc: Whitespace fixes.
240         * bsd_mutex.cc: Ditto.
241
242 2004-07-19  Corinna Vinschen  <corinna@vinschen.de>
243
244         * transport.cc (transport_layer_base::~transport_layer_base): Remove.
245         * transport.h (transport_layer_base::~transport_layer_base): Ditto.
246
247 2004-07-19  Corinna Vinschen  <corinna@vinschen.de>
248
249         * bsd_mutex.cc (win_priority): Actually calculate p from priority.
250
251 2004-06-03  Corinna Vinschen  <corinna@vinschen.de>
252
253         * shm.cc (shmget): Explicitely set td_retval[0] to -1 on error.
254
255 2004-03-30  Corinna Vinschen  <corinna@vinschen.de>
256
257         * sysv_shm.cc (shmget): Allow to retrieve shared memory segments
258         by shmid when IPC_KEY_IS_SHMID is set.
259
260 2004-03-02  Corinna Vinschen  <corinna@vinschen.de>
261
262         * sysv_sem.cc (semundo_adjust): Check for process id instead of
263         process struct pointer, which isn't fixed under Cygwin.
264         (semexit_myhook): Ditto.  Adjust debug print statements to print
265         Cygwin and Windows PIDs instead of process pointer under Cygwin.
266
267 2004-02-07  Corinna Vinschen  <corinna@vinschen.de>
268
269         * bsd_mutex.cc (win_priority): Move to msleep helper function section.
270         (set_priority): Ditto. Fix formatting.
271         (_msleep): Cleanup obj formatting.  Rearrange obj order.
272
273 2004-02-06  Corinna Vinschen  <corinna@vinschen.de>
274
275         * bsd_mutex.cc (_msleep): Handle PCATCH using signal_arrived event.
276         * client.cc: Include sigproc.h.
277         * msg.cc (client_request_msg::serve): Accomodate third parameter to
278         process::process.
279         * sem.cc (client_request_sem::serve): Ditto.
280         * shm.cc (client_request_shm::serve): Ditto.
281         * process.cc (process::process): Duplicate signal_arrived into
282         Cygserver process space.
283         (process::~process): Close _signal_arrived handle.
284         (process_cache::process): Add signal_arrived handling.
285         * process.h (process::process): Add signal_arrived parameter.
286         (process:signal_arrived): New read accessor.
287         (process:_signal_arrived): New member.
288         (process_cache::process): Add signal_arrived parameter.
289
290 2004-01-16  Corinna Vinschen  <corinna@vinschen.de>
291
292         * process.h (cleanup_routine::~cleanup_routine): Make pure virtual
293         function to avoid miscompilation with certain versions of gcc.
294         * process.cc (cleanup_routine::~cleanup_routine): Remove.
295
296 2003-12-26  Christopher Faylor  <cgf@redhat.com>
297
298         * Makefile.in (CFLAGS, CXXFLAGS): Remove unneeded include.
299         (CYGWIN_LIB): Delete.
300         (cygserver.exe target): Add -L$(cygwin_build) to the link line to force
301         linker to use build tree version of the library.  Remove specific
302         inclusion of libcygwin.a from the link line.
303
304 2003-12-16  Corinna Vinschen  <corinna@vinschen.de>
305
306         * bsd_helper.cc (tunable_params): Add entries for kern.ipc.msgmnb and
307         kern.ipc.msgtql.  Raise max value for kern.ipc.msgseg to 65535.
308         * cygserver.conf: Add kern.ipc.msgmnb and kern.ipc.msgtql.
309         * sysv_msg.cc (msginit): Add TUNABLE_INT_FETCH call for
310         kern.ipc.msgmnb and kern.ipc.msgtql.
311
312 2003-11-26  Corinna Vinschen  <corinna@vinschen.de>
313
314         * cygserver.cc (main): Move call to ipcinit() up before installing
315         any threads.
316         * sysv_sem.cc: Update to FreeBSD version 1.67.
317         (seminit): Initialize semaphore sequence numbers to 0.
318
319 2003-11-26  Corinna Vinschen  <corinna@vinschen.de>
320
321         * Makefile.in (CYGWIN_LIB): Variable pointing to libcygwin.a in
322         the parallel cygwin dir.
323         (cygserver.exe): Depend on and link against $CYGWIN_LIB.
324
325 2003-11-25  Christopher Faylor  <cgf@redhat.com>
326
327         * Makefile.in (CXXFLAGS): Remove duplicate options handled in
328         Makefile.common.
329
330 2003-11-22  Corinna Vinschen  <corinna@vinschen.de>
331
332         * msg.cc (client_request_msg::serve): Add default case to msgop switch.
333         * sem.cc (client_request_sem::serve): Add default case to semop switch.
334         * shm.cc (client_request_shm::serve): Add default case to shmop switch.
335
336 2003-11-21  Corinna Vinschen  <corinna@vinschen.de>
337
338         * Makefile.in (install): Explicitely create directories.  Install
339         README to $(prefix)/share/doc/Cygwin.
340         * README: New file.
341
342 2003-11-21  Corinna Vinschen  <corinna@vinschen.de>
343
344         * cygserver.cc (print_usage): Fix scrambled output.
345
346 2003-11-20  Corinna Vinschen  <corinna@vinschen.de>
347
348         * cygserver-config: Slightly modify printed message.
349
350 2003-11-20  Corinna Vinschen  <corinna@vinschen.de>
351
352         * Makefile.in (install): Install cygserver-config script to bindir.
353         * cygserver-config: New script.
354
355 2003-11-19  Corinna Vinschen  <corinna@vinschen.de>
356
357         Don't use safe_new but new throughout.  Fix copyright dates
358         throughout.
359         * Makefile.in: Accomodate all new files and name changes.
360         Add a *.d dependency.
361         (sbindir): Add.
362         (etcdir): Drop in favor of more appropriate sysconfdir definition.
363         (sysconfdir): Add.
364         (CXXFLAGS): Add -MMD flag. Add SYSCONFDIR definition.
365         (.SUFFIXES): Add.
366         (install): Add action items.
367         (libclean): New target.
368         (fullclean): Ditto.
369         * bsd_helper.cc: New file.
370         * bsd_helper.h: Ditto.
371         * bsd_log.cc: Ditto.
372         * bsd_log.h: Ditto.
373         * bsd_mutex.cc: Ditto.
374         * bsd_mutex.h: Ditto.
375         * client.cc: Rearrange to build as less as possible if
376         __INSIDE_CYGWIN__.
377         (client_request::handle_request): Add Message Queue and Semaphore
378         handling.
379         * cygserver.cc: Rearrange to build as less as possible if
380         __INSIDE_CYGWIN__. Use new debug/log/panic logging functions.
381         (DEF_CONFIG_FILE): New definition for configuration file.  Use
382         throughout.
383         (getfunc): Remove.
384         (__cygserver__printf): Remove.
385         (client_request_attach_tty::serve): Return error if impersonation
386         fails.
387         (print_usage): Pump up help message.
388         (print_version): Add output of default configuration file.
389         (main): Accommodate new options.  Allow overwrite of threading options
390         from config file.  Call several new initialization functions.  Drop
391         printing dots.  Don't define SIGHANDLE inline.
392         * cygserver.conf: New file.
393         * cygserver_process.h: Rename to process.h.
394         * cygserver_transport.h: Rename to transport.h.
395         * cygserver_transport_pipes.h: Rename to transport_pipes.h.
396         * cygserver_transport_sockets.h: Rename to transport_sockets.h.
397         * msg.cc: Rewrite.
398         * sem.cc: Rewrite.
399         * shm.cc: Rewrite.
400         * sysv_msg.cc: New file, derived from FreeBSD version 1.52.
401         * sysv_sem.cc: New file, derived from FreeBSD version 1.66.
402         * sysv_shm.cc: New file, derived from FreeBSD version 1.89.
403         * threaded_queue.cc: Rearrange to build as less as possible if
404         __INSIDE_CYGWIN__.
405         * transport.cc (transport_layer_base::impersonate_client): Define bool.
406         (transport_layer_base::revert_to_self): Ditto.
407         * transport.h (transport_layer_base::impersonate_client): Declare bool.
408         (transport_layer_base::revert_to_self): Ditto.
409         * transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
410         Don't call init_security.
411         (init_security): Remove.
412         (transport_layer_pipes::accept): Use global sec_all_nih.
413         (transport_layer_pipes::connect): Ditto.
414         (transport_layer_pipes::impersonate_client): Define bool.
415         (transport_layer_pipes::revert_to_self): Ditt.
416         * transport_pipes.h (transport_layer_pipes::impersonate_client): Declare
417         bool.
418         (transport_layer_pipes::revert_to_self): Ditto.
419         * woutsup.h: Include bsd compatibility headers.
420         (SIGHANDLE): Add definition.
421         (__cygserver__printf): Remove definition.
422         (__noop_printf): Ditto.
423         (debug_printf): Define using debug.
424         (syscall_printf): Define using log.
425         (system_printf): Ditto.
426         Drop all other _printf definitions.
427
428 2003-10-22  Corinna Vinschen  <corinna@vinschen.de>
429
430         Accomodate moving cygserver header files from cygwin/include/cygwin
431         to here and cygwin dir.
432         * Makefile.in (EXEEXT): Drop as unused.
433         (EXEEXT_FOR_BUILD): Ditto.
434         (all): Don't build libcygserver.a.
435         * cygserver_process.h: Moved from cygwin/include/cygwin to here.
436         * cygserver_transport.h: Ditto.
437         * cygserver_transport_pipes.h: Ditto.
438         * cygserver_transport_sockets.h: Ditto.
439         * ipc.h: Moved to ../cygwin and renamed to cygserver_ipc.h.
440         * shm.h: Moved to ../cygwin and renamed to cygserver_shm.h.
441
442 2003-08-30  Christopher Faylor  <cgf@redhat.com>
443
444         * msg.cc: New file.
445         * sem.cc: Ditto.
446
447 2003-08-30  Christopher Faylor  <cgf@redhat.com>
448
449         * threaded_queue.h: New file.
450
451 2003-08-25  Christopher Faylor  <cgf@redhat.com>
452
453         * Makefile.in: Build libcygserver.a.
454         * client.cc: Rename allow_daemon to allow_server.
455
456 2003-07-25  Christopher Faylor  <cgf@redhat.com>
457
458         * configure.in: Use 'install-sh -c'.
459         * configure: Regenerate.
460
461 2003-07-25  Christopher Faylor  <cgf@redhat.com>
462
463         * configure.in: Always use install-sh.
464         * configure: Regenerate.
465
466 2003-07-01  Christopher Faylor  <cgf@redhat.com>
467
468         * Makefile.in (OBJS): Move some more files from cygwin directory.
469         * woutsup.h: Define _MT_SAFE.
470
471 2003-07-01  Christopher Faylor  <cgf@redhat.com>
472
473         * configure.in: First pass.
474         * Makefile.in: Ditto.
475         * configure: Generate.