OSDN Git Service

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