1 2006-05-24 Christopher Faylor <cgf@timesys.com>
3 * configure.in: Update to newer autoconf.
4 (thanks to Steve Ellcey)
5 * configure: Regenerate.
6 * aclocal.m4: New file.
8 2006-01-12 Corinna Vinschen <corinna@vinschen.de>
10 * wincap.cc: New file.
12 * Makefile.in: Accomodate having our own wincap implementation now.
14 2006-01-09 Corinna Vinschen <corinna@vinschen.de>
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).
21 2005-11-10 Corinna Vinschen <corinna@vinschen.de>
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.
28 2005-11-10 Corinna Vinschen <corinna@vinschen.de>
30 * bsd_log.cc (_vpanic): LOG_EMERG is overkill, use LOG_CRIT.
32 2005-11-09 Corinna Vinschen <corinna@vinschen.de>
34 * process.cc (process_cache::process): Fix maximum process condition.
36 2005-10-24 Corinna Vinschen <corinna@vinschen.de>
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
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
53 (pcache_wait_thread): New thread function used for threaded process
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.
66 2005-08-08 Christopher Faylor <cgf@timesys.com>
68 * cygserver.cc (main): Call wincap.init() earlier to avoid a NULL
71 2005-06-14 Corinna Vinschen <corinna@vinschen.de>
73 * sysv_sem.cc (semu_list): Define static to avoid gcc 4.x compiler
76 2005-04-08 Corinna Vinschen <corinna@vinschen.de>
78 * bsd_mutex.cc (msleep_cnt): Remove.
79 (msleep_max_cnt): 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.
90 2005-04-06 Corinna Vinschen <corinna@vinschen.de>
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.
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
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
128 (struct sem_undo): Define un_proc as pid_t on Cygwin. Accomodate
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
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
139 2005-04-01 Corinna Vinschen <corinna@vinschen.de>
141 * bsd_mutex.cc (_msleep): Whitespace fix.
142 * process.cc (process::process): Handle invalid signal_arrived values
145 2004-12-30 Corinna Vinschen <corinna@vinschen.de>
147 * bsd_mutex.cc: Include limits.h.
148 (MSLEEP_MUTEX): New define for third parameter to msleep_event_name.
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.
157 2004-10-18 Corinna Vinschen <corinna@vinschen.de>
159 * sysv_sem.cc: Redefine offsetof to circumvent build problems with
162 2004-10-04 Corinna Vinschen <corinna@vinschen.de>
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.
176 2004-10-01 Corinna Vinschen <corinna@vinschen.de>
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.
185 2004-09-23 Corinna Vinschen <corinna@vinschen.de>
187 * sysv_shm.cc (kern_shmat): Avoid compiler warning.
189 2004-09-21 Corinna Vinschen <corinna@vinschen.de>
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.
197 2004-09-15 Corinna Vinschen <corinna@vinschen.de>
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.
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.
211 2004-09-06 Corinna Vinschen <corinna@vinschen.de>
213 * bsd_mutex.cc (_msleep): Disable resetting event object for now.
215 2004-08-31 Corinna Vinschen <corinna@vinschen.de>
217 * sysv_shm.cc (kern_shmat): Add debug_printf's.
219 2004-08-24 Corinna Vinschen <corinna@vinschen.de>
221 * bsd_mutex.cc (_msleep): Release process object while waiting.
223 2004-08-03 Corinna Vinschen <corinna@vinschen.de>
225 * transport.cc (transport_layer_base::~transport_layer_base): Resurrect.
226 * transport.h (transport_layer_base::~transport_layer_base): Ditto.
228 2004-07-30 Corinna Vinschen <corinna@vinschen.de>
230 * bsd_mutex.cc (_msleep): Reset event object and close it before
231 entering mutex. Turn order of conditional for better readability.
233 2004-07-26 Corinna Vinschen <corinna@vinschen.de>
235 * cygserver.conf: Describe relation between shmmaxpgs and SHMMAX.
237 2004-07-20 Corinna Vinschen <corinna@vinschen.de>
239 * bsd_helper.cc: Whitespace fixes.
240 * bsd_mutex.cc: Ditto.
242 2004-07-19 Corinna Vinschen <corinna@vinschen.de>
244 * transport.cc (transport_layer_base::~transport_layer_base): Remove.
245 * transport.h (transport_layer_base::~transport_layer_base): Ditto.
247 2004-07-19 Corinna Vinschen <corinna@vinschen.de>
249 * bsd_mutex.cc (win_priority): Actually calculate p from priority.
251 2004-06-03 Corinna Vinschen <corinna@vinschen.de>
253 * shm.cc (shmget): Explicitely set td_retval[0] to -1 on error.
255 2004-03-30 Corinna Vinschen <corinna@vinschen.de>
257 * sysv_shm.cc (shmget): Allow to retrieve shared memory segments
258 by shmid when IPC_KEY_IS_SHMID is set.
260 2004-03-02 Corinna Vinschen <corinna@vinschen.de>
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.
267 2004-02-07 Corinna Vinschen <corinna@vinschen.de>
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.
273 2004-02-06 Corinna Vinschen <corinna@vinschen.de>
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
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.
290 2004-01-16 Corinna Vinschen <corinna@vinschen.de>
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.
296 2003-12-26 Christopher Faylor <cgf@redhat.com>
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.
304 2003-12-16 Corinna Vinschen <corinna@vinschen.de>
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.
312 2003-11-26 Corinna Vinschen <corinna@vinschen.de>
314 * cygserver.cc (main): Move call to ipcinit() up before installing
316 * sysv_sem.cc: Update to FreeBSD version 1.67.
317 (seminit): Initialize semaphore sequence numbers to 0.
319 2003-11-26 Corinna Vinschen <corinna@vinschen.de>
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.
325 2003-11-25 Christopher Faylor <cgf@redhat.com>
327 * Makefile.in (CXXFLAGS): Remove duplicate options handled in
330 2003-11-22 Corinna Vinschen <corinna@vinschen.de>
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.
336 2003-11-21 Corinna Vinschen <corinna@vinschen.de>
338 * Makefile.in (install): Explicitely create directories. Install
339 README to $(prefix)/share/doc/Cygwin.
342 2003-11-21 Corinna Vinschen <corinna@vinschen.de>
344 * cygserver.cc (print_usage): Fix scrambled output.
346 2003-11-20 Corinna Vinschen <corinna@vinschen.de>
348 * cygserver-config: Slightly modify printed message.
350 2003-11-20 Corinna Vinschen <corinna@vinschen.de>
352 * Makefile.in (install): Install cygserver-config script to bindir.
353 * cygserver-config: New script.
355 2003-11-19 Corinna Vinschen <corinna@vinschen.de>
357 Don't use safe_new but new throughout. Fix copyright dates
359 * Makefile.in: Accomodate all new files and name changes.
360 Add a *.d dependency.
362 (etcdir): Drop in favor of more appropriate sysconfdir definition.
364 (CXXFLAGS): Add -MMD flag. Add SYSCONFDIR definition.
366 (install): Add action items.
367 (libclean): New target.
369 * bsd_helper.cc: New file.
370 * bsd_helper.h: Ditto.
373 * bsd_mutex.cc: Ditto.
374 * bsd_mutex.h: Ditto.
375 * client.cc: Rearrange to build as less as possible if
377 (client_request::handle_request): Add Message Queue and Semaphore
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
384 (__cygserver__printf): Remove.
385 (client_request_attach_tty::serve): Return error if impersonation
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.
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
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
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.
428 2003-10-22 Corinna Vinschen <corinna@vinschen.de>
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.
442 2003-08-30 Christopher Faylor <cgf@redhat.com>
447 2003-08-30 Christopher Faylor <cgf@redhat.com>
449 * threaded_queue.h: New file.
451 2003-08-25 Christopher Faylor <cgf@redhat.com>
453 * Makefile.in: Build libcygserver.a.
454 * client.cc: Rename allow_daemon to allow_server.
456 2003-07-25 Christopher Faylor <cgf@redhat.com>
458 * configure.in: Use 'install-sh -c'.
459 * configure: Regenerate.
461 2003-07-25 Christopher Faylor <cgf@redhat.com>
463 * configure.in: Always use install-sh.
464 * configure: Regenerate.
466 2003-07-01 Christopher Faylor <cgf@redhat.com>
468 * Makefile.in (OBJS): Move some more files from cygwin directory.
469 * woutsup.h: Define _MT_SAFE.
471 2003-07-01 Christopher Faylor <cgf@redhat.com>
473 * configure.in: First pass.
474 * Makefile.in: Ditto.
475 * configure: Generate.