OSDN Git Service

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