diff options
author | Christopher Faylor <me@cgf.cx> | 2004-02-09 04:04:24 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-02-09 04:04:24 +0000 |
commit | cec4879206f2158d19eccdf5395b551da7c22cb3 (patch) | |
tree | 9360159e144fab21242d60375653ef2def3206ef | |
parent | 733309f5761d777a61b8db86e734fbffc236f104 (diff) | |
download | newlib-cec4879206f2158d19eccdf5395b551da7c22cb3.zip newlib-cec4879206f2158d19eccdf5395b551da7c22cb3.tar.gz newlib-cec4879206f2158d19eccdf5395b551da7c22cb3.tar.bz2 |
* debug.h (console_printf): Define for non-debugging condition.
* cygtls.h (_threadinfo::lock): Remove wait argument.
(_threadinfo::interrupt_setup): Remove retaddr argument.
* exceptions.cc (_threadinfo::interrupt_setup): Ditto.
(_threadinfo::interrupt_now): Accommodate change to interrupt_setup argument.
(setup_handler): Ditto. Always lock sig stack prior to determining interrupt
method.
* gendef (_sigfe): Correct thinko regarding cmpxchg.
(_sigbe): Ditto.
(_threadinfo::lock): Ditto.
(_threadinfo::pop): Eliminate left-over stack unlock.
* sigproc.cc (proc_subproc): Chnage debugging output to printed warning.
67 files changed, 116 insertions, 95 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e3bd6e2..af1c6d4 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,23 @@ 2004-02-08 Christopher Faylor <cgf@redhat.com> + * debug.h (console_printf): Define for non-debugging condition. + + * cygtls.h (_threadinfo::lock): Remove wait argument. + (_threadinfo::interrupt_setup): Remove retaddr argument. + * exceptions.cc (_threadinfo::interrupt_setup): Ditto. + (_threadinfo::interrupt_now): Accommodate change to interrupt_setup + argument. + (setup_handler): Ditto. Always lock sig stack prior to determining + interrupt method. + * gendef (_sigfe): Correct thinko regarding cmpxchg. + (_sigbe): Ditto. + (_threadinfo::lock): Ditto. + (_threadinfo::pop): Eliminate left-over stack unlock. + * sigproc.cc (proc_subproc): Chnage debugging output to printed + warning. + +2004-02-08 Christopher Faylor <cgf@redhat.com> + * localtime.cc (localtime_r): Call tzset. * Makefile.in: Make version.h/cygwin.din version check a warning since diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc index 9cd7f6a..9ed87af 100644 --- a/winsup/cygwin/autoload.cc +++ b/winsup/cygwin/autoload.cc @@ -1,6 +1,6 @@ /* autoload.cc: all dynamic load stuff. - Copyright 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 83189c3..e9dc5d4 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -1,6 +1,6 @@ /* cygheap.cc: Cygwin heap manager. - Copyright 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/cygmalloc.h b/winsup/cygwin/cygmalloc.h index 30b9ee3..adb37cf 100644 --- a/winsup/cygwin/cygmalloc.h +++ b/winsup/cygwin/cygmalloc.h @@ -1,6 +1,6 @@ /* cygmalloc.h: cygwin DLL malloc stuff - Copyright 2002 Red Hat, Inc. + Copyright 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/cygserver.h b/winsup/cygwin/cygserver.h index 79f7d41..7f4943a 100644 --- a/winsup/cygwin/cygserver.h +++ b/winsup/cygwin/cygserver.h @@ -1,6 +1,6 @@ /* cygserver.h - Copyright 2001, 2002 Red Hat Inc. + Copyright 2001, 2002, 2003, 2004 Red Hat Inc. Written by Egor Duda <deo@logos-m.ru> diff --git a/winsup/cygwin/cygserver_ipc.h b/winsup/cygwin/cygserver_ipc.h index 77f54c5..d25a3bd 100644 --- a/winsup/cygwin/cygserver_ipc.h +++ b/winsup/cygwin/cygserver_ipc.h @@ -1,6 +1,6 @@ /* cygserver_ipc.h - Copyright 2002, 2003 Red Hat, Inc. + Copyright 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc index 309bd51..d655640 100644 --- a/winsup/cygwin/cygthread.cc +++ b/winsup/cygwin/cygthread.cc @@ -1,6 +1,6 @@ /* cygthread.cc - Copyright 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc index becde2d..d3ed824 100644 --- a/winsup/cygwin/cygtls.cc +++ b/winsup/cygwin/cygtls.cc @@ -156,7 +156,7 @@ void _threadinfo::push (__stack_t addr, bool exception) { if (exception) - lock (true); + lock (); *stackptr++ = (__stack_t) addr; if (exception) unlock (); diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h index c1525a4..43802dd 100644 --- a/winsup/cygwin/cygtls.h +++ b/winsup/cygwin/cygtls.h @@ -1,6 +1,6 @@ /* cygtls.h - Copyright 2003 Red Hat, Inc. + Copyright 2003, 2004 Red Hat, Inc. This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for @@ -130,14 +130,15 @@ struct _threadinfo void reset_exception (); bool interrupt_now (CONTEXT *, int, void *, struct sigaction&) __attribute__((regparm(3))); - void __stdcall interrupt_setup (int sig, void *handler, struct sigaction& siga, __stack_t retaddr) + void __stdcall interrupt_setup (int sig, void *handler, + struct sigaction& siga) __attribute__((regparm(3))); void init_threadlist_exceptions (struct _exception_list *); operator HANDLE () const {return tid->win32_obj_id;} void set_siginfo (struct sigpacket *) __attribute__ ((regparm (3))); void set_threadkill () {threadkill = true;} void reset_threadkill () {threadkill = false;} - int lock (int wait) __attribute__ ((regparm (2))); + int lock () __attribute__ ((regparm (1))); void unlock () __attribute__ ((regparm (1))); /*gentls_offsets*/ }; diff --git a/winsup/cygwin/debug.cc b/winsup/cygwin/debug.cc index 6ab63eb..db5da1a 100644 --- a/winsup/cygwin/debug.cc +++ b/winsup/cygwin/debug.cc @@ -1,6 +1,6 @@ /* debug.cc - Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for diff --git a/winsup/cygwin/debug.h b/winsup/cygwin/debug.h index f4f00c6..796eeec 100644 --- a/winsup/cygwin/debug.h +++ b/winsup/cygwin/debug.h @@ -1,6 +1,6 @@ /* debug.h - Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for @@ -38,6 +38,7 @@ details. */ # define setclexec(h, nh, b) do {} while (0) # define debug_fixup_after_fork_exec() do {} while (0) # define VerifyHandle(h) do {} while (0) +# define console_printf small_printf #else diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc index 8a25b7d..9202d11 100644 --- a/winsup/cygwin/dlfcn.cc +++ b/winsup/cygwin/dlfcn.cc @@ -1,6 +1,6 @@ /* dlfcn.cc - Copyright 1998, 2000, 2001 Red Hat, Inc. + Copyright 1998, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc index 14bfe93..72048ef 100644 --- a/winsup/cygwin/dll_init.cc +++ b/winsup/cygwin/dll_init.cc @@ -1,6 +1,6 @@ /* dll_init.cc - Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 2552789..2479373 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -1,6 +1,6 @@ /* dtable.cc: file descriptor support. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index e90d093..03df67f 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -693,9 +693,8 @@ interruptible (DWORD pc) } void __stdcall _threadinfo::interrupt_setup (int sig, void *handler, - struct sigaction& siga, __stack_t retaddr) + struct sigaction& siga) { - __stack_t *retaddr_in_tls = stackptr - 1; push ((__stack_t) sigdelayed); oldmask = myself->getsigmask (); newmask = oldmask | siga.sa_mask | SIGTOMASK (sig); @@ -707,8 +706,9 @@ _threadinfo::interrupt_setup (int sig, void *handler, myself->stopsig = 0; myself->process_state |= PID_STOPPED; } - this->sig = sig; // Should ALWAYS be second to last setting set to avoid a race - *retaddr_in_tls = retaddr; + + this->sig = sig; // Should ALWAYS be last setting set to avoid a race + /* Clear any waiting threads prior to dispatching to handler function */ int res = SetEvent (signal_arrived); // For an EINTR case proc_subproc (PROC_CLEARWAIT, 1); @@ -720,8 +720,8 @@ bool _threadinfo::interrupt_now (CONTEXT *ctx, int sig, void *handler, struct sigaction& siga) { - push (0); - interrupt_setup (sig, handler, siga, (__stack_t) ctx->Eip); + push ((__stack_t) ctx->Eip); + interrupt_setup (sig, handler, siga); ctx->Eip = pop (); SetThreadContext (*this, ctx); /* Restart the thread in a new location */ return 1; @@ -762,20 +762,16 @@ setup_handler (int sig, void *handler, struct sigaction& siga, _threadinfo *tls) goto out; } + int locked; for (int i = 0; i < CALL_HANDLER_RETRY; i++) { + locked = tls->lock (); __stack_t *retaddr_on_stack = tls->stackptr - 1; if (retaddr_on_stack >= tls->stack) { - if (!tls->lock (false)) - continue; - __stack_t retaddr = InterlockedExchange ((LONG *) retaddr_on_stack, 0); - if (!retaddr) - continue; tls->reset_exception (); - tls->interrupt_setup (sig, handler, siga, retaddr); + tls->interrupt_setup (sig, handler, siga); sigproc_printf ("interrupted known cygwin routine"); - tls->unlock (); interrupted = true; break; } @@ -826,11 +822,15 @@ setup_handler (int sig, void *handler, struct sigaction& siga, _threadinfo *tls) if (interrupted) break; + tls->unlock (); + locked = false; sigproc_printf ("couldn't interrupt. trying again."); low_priority_sleep (0); } out: + if (locked) + tls->unlock (); sigproc_printf ("signal %d %sdelivered", sig, interrupted ? "" : "not "); return interrupted; } diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index b637d2f..332879f 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -1,6 +1,6 @@ /* external.cc: Interface to Cygwin internals from external programs. - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Christopher Faylor <cgf@cygnus.com> diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 7b701d8..81466d3 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1,6 +1,6 @@ /* fhandler.cc. See console.cc for fhandler_console functions. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 13b8a5e..2fde1f7 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1,6 +1,6 @@ /* fhandler.h - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_clipboard.cc b/winsup/cygwin/fhandler_clipboard.cc index 3f24094..b0aed3e 100644 --- a/winsup/cygwin/fhandler_clipboard.cc +++ b/winsup/cygwin/fhandler_clipboard.cc @@ -1,6 +1,6 @@ /* fhandler_dev_clipboard: code to access /dev/clipboard - Copyright 2000, 2001, 2002, 2003 Red Hat, Inc + Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc Written by Charles Wilson (cwilson@ece.gatech.edu) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 2afb595..afac56c 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1,6 +1,6 @@ /* fhandler_console.cc - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index d60d632..fb70716 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1,6 +1,6 @@ /* fhandler_disk_file.cc - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_dsp.cc b/winsup/cygwin/fhandler_dsp.cc index 2726ea4..01e1ea6 100644 --- a/winsup/cygwin/fhandler_dsp.cc +++ b/winsup/cygwin/fhandler_dsp.cc @@ -1,6 +1,6 @@ /* fhandler_dev_dsp: code to emulate OSS sound model /dev/dsp - Copyright 2001, 2002, 2003 Red Hat, Inc + Copyright 2001, 2002, 2003, 2004 Red Hat, Inc Written by Andy Younger (andy@snoogie.demon.co.uk) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index d886899..c45a4dc 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -1,6 +1,6 @@ /* fhandler_fifo.cc. See fhandler.h for a description of the fhandler classes. - Copyright 2002, 2003 Red Hat, Inc. + Copyright 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_floppy.cc b/winsup/cygwin/fhandler_floppy.cc index e849a53..5d715ad 100644 --- a/winsup/cygwin/fhandler_floppy.cc +++ b/winsup/cygwin/fhandler_floppy.cc @@ -1,7 +1,7 @@ /* fhandler_floppy.cc. See fhandler.h for a description of the fhandler classes. - Copyright 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_mem.cc b/winsup/cygwin/fhandler_mem.cc index b9807d1..1688ab0 100644 --- a/winsup/cygwin/fhandler_mem.cc +++ b/winsup/cygwin/fhandler_mem.cc @@ -1,6 +1,6 @@ /* fhandler_mem.cc. See fhandler.h for a description of the fhandler classes. - Copyright 2000, 2001, 2002 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_nodevice.cc b/winsup/cygwin/fhandler_nodevice.cc index 22281d5..d27747b 100644 --- a/winsup/cygwin/fhandler_nodevice.cc +++ b/winsup/cygwin/fhandler_nodevice.cc @@ -1,6 +1,6 @@ /* fhandler.cc. See console.cc for fhandler_console functions. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index a05615a..2c77afc 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -1,6 +1,6 @@ /* fhandler_proc.cc: fhandler for /proc virtual filesystem - Copyright 2002, 2003 Red Hat, Inc. + Copyright 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index a65bcf6..d990cc1 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -1,6 +1,6 @@ /* fhandler_process.cc: fhandler for /proc/<pid> virtual filesystem - Copyright 2002, 2003 Red Hat, Inc. + Copyright 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_random.cc b/winsup/cygwin/fhandler_random.cc index a90b703..6ff92ae 100644 --- a/winsup/cygwin/fhandler_random.cc +++ b/winsup/cygwin/fhandler_random.cc @@ -1,6 +1,6 @@ /* fhandler_random.cc: code to access /dev/random and /dev/urandom - Copyright 2000, 2001, 2002 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Corinna Vinschen (vinschen@cygnus.com) diff --git a/winsup/cygwin/fhandler_raw.cc b/winsup/cygwin/fhandler_raw.cc index 2e67143..afa478b 100644 --- a/winsup/cygwin/fhandler_raw.cc +++ b/winsup/cygwin/fhandler_raw.cc @@ -1,6 +1,6 @@ /* fhandler_raw.cc. See fhandler.h for a description of the fhandler classes. - Copyright 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc index f80096f..95ee3ff 100644 --- a/winsup/cygwin/fhandler_registry.cc +++ b/winsup/cygwin/fhandler_registry.cc @@ -1,6 +1,6 @@ /* fhandler_registry.cc: fhandler for /proc/registry virtual filesystem - Copyright 2002, 2003 Red Hat, Inc. + Copyright 2002, 2003, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index 7934224..b52befa 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -1,6 +1,6 @@ /* fhandler_serial.cc - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index 6173460..99e0d18 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -1,6 +1,6 @@ /* fhandler_socket.cc. See fhandler.h for a description of the fhandler classes. - Copyright 2000, 2001, 2002 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc index 8711246..e63a1ba 100644 --- a/winsup/cygwin/fhandler_tape.cc +++ b/winsup/cygwin/fhandler_tape.cc @@ -1,7 +1,7 @@ /* fhandler_tape.cc. See fhandler.h for a description of the fhandler classes. - Copyright 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index 398dabd..ed8d3b2 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -1,6 +1,6 @@ /* fhandler_termios.cc - Copyright 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_virtual.cc b/winsup/cygwin/fhandler_virtual.cc index bada27c..ec38364 100644 --- a/winsup/cygwin/fhandler_virtual.cc +++ b/winsup/cygwin/fhandler_virtual.cc @@ -1,6 +1,6 @@ /* fhandler_virtual.cc: base fhandler class for virtual filesystems - Copyright 2002 Red Hat, Inc. + Copyright 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/fhandler_windows.cc b/winsup/cygwin/fhandler_windows.cc index a9c3364..ca9622f 100644 --- a/winsup/cygwin/fhandler_windows.cc +++ b/winsup/cygwin/fhandler_windows.cc @@ -1,6 +1,6 @@ /* fhandler_windows.cc: code to access windows message queues. - Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Sergey S. Okhapkin (sos@prospect.com.ru). Feedback and testing by Andy Piper (andyp@parallax.co.uk). diff --git a/winsup/cygwin/fhandler_zero.cc b/winsup/cygwin/fhandler_zero.cc index 46bf5bf..2146c73 100644 --- a/winsup/cygwin/fhandler_zero.cc +++ b/winsup/cygwin/fhandler_zero.cc @@ -1,6 +1,6 @@ /* fhandler_dev_zero.cc: code to access /dev/zero - Copyright 2000, 2001, 2002 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by DJ Delorie (dj@cygnus.com) diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef index 2457314..b391d50 100755 --- a/winsup/cygwin/gendef +++ b/winsup/cygwin/gendef @@ -94,8 +94,9 @@ __sigfe: pushl %edx movl %fs:4,%edx 1: movl \$1,%eax - lock cmpxchg %eax,$tls::stacklock(%edx) - jne 2f + lock xchgl %eax,$tls::stacklock(%edx) + cmpl %eax,%eax + jz 2f xorl %eax,%eax call _low_priority_sleep jmp 1b @@ -103,7 +104,7 @@ __sigfe: xadd %eax,$tls::stackptr(%edx) decl $tls::stacklock(%edx) leal __sigbe,%edx - xchg %edx,8(%esp) + xchgl %edx,8(%esp) movl %edx,(%eax) popl %edx ret @@ -115,15 +116,17 @@ __sigbe: pushl %eax movl %fs:4,%edx 1: movl \$1,%eax - lock cmpxchg %eax,$tls::stacklock(%edx) - jne 2f + lock xchgl %eax,$tls::stacklock(%edx) + cmpl %eax,%eax + jz 2f xorl %eax,%eax call _low_priority_sleep jmp 1b 2: movl \$-4,%eax xadd %eax,$tls::stackptr(%edx) - xchg %edx,-4(%eax) - xchg %edx,4(%esp) + decl $tls::stacklock(%edx) + xchgl %edx,-4(%eax) + xchgl %edx,4(%esp) popl %eax ret @@ -134,19 +137,17 @@ __ZN11_threadinfo3popEv: movl \$-4,%ebx xadd %ebx,$tls::pstackptr(%edx) xorl %eax,%eax - xchg %eax,-4(%ebx) - decl $tls::pstacklock(%edx) + xchgl %eax,-4(%ebx) popl %ebx ret - .global __ZN11_threadinfo4lockEi -__ZN11_threadinfo4lockEi: + .global __ZN11_threadinfo4lockEv +__ZN11_threadinfo4lockEv: pushl %ebx movl %eax,%ebx 1: movl \$1,%eax - lock cmpxchg %eax,$tls::pstacklock(%ebx) - jne 2f - cmpl %edx,%edx + lock xchgl %eax,$tls::pstacklock(%ebx) + cmpl %eax,%eax jz 2f xorl %eax,%eax call _low_priority_sleep diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc index af5ec2f..9ea5d9b 100644 --- a/winsup/cygwin/heap.cc +++ b/winsup/cygwin/heap.cc @@ -1,6 +1,6 @@ /* heap.cc: Cygwin heap manager. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/malloc_wrapper.cc b/winsup/cygwin/malloc_wrapper.cc index 718f0b2..04d4f66 100644 --- a/winsup/cygwin/malloc_wrapper.cc +++ b/winsup/cygwin/malloc_wrapper.cc @@ -1,6 +1,6 @@ /* malloc_wrapper.cc - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Originally written by Steve Chamberlain of Cygnus Support sac@cygnus.com diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 7042048..4f8ea6e 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -1,6 +1,6 @@ /* mmap.cc - Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index f3c0c8c..8f0f555 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -1,6 +1,6 @@ /* net.cc: network-related routines. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/perthread.h b/winsup/cygwin/perthread.h index 4436168..c721cef 100644 --- a/winsup/cygwin/perthread.h +++ b/winsup/cygwin/perthread.h @@ -1,6 +1,6 @@ /* perthread.h: Header file for cygwin thread-local storage. - Copyright 2000, 2001, 2002, 2004 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Christopher Faylor <cgf@cygnus.com> diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index c53ff91..e3723f8 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -1,6 +1,6 @@ /* pinfo.cc: process table support - Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index e46eb7b..4b9c522 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -1,6 +1,6 @@ /* pipe.cc: pipe for Cygwin. - Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index 472c203..7bcf36c 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -1,6 +1,6 @@ /* sec_acl.cc: Sun compatible ACL functions. - Copyright 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Corinna Vinschen <corinna@vinschen.de> diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc index 7888c16..0c44c6f 100644 --- a/winsup/cygwin/sec_helper.cc +++ b/winsup/cygwin/sec_helper.cc @@ -1,6 +1,6 @@ /* sec_helper.cc: NT security helper functions - Copyright 2000, 2001, 2002 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Corinna Vinschen <corinna@vinschen.de> diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index 66052ac..f54c33d 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -1,6 +1,6 @@ /* security.cc: NT security functions - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Originaly written by Gunther Ebert, gunther.ebert@ixos-leipzig.de Completely rewritten by Corinna Vinschen <corinna@vinschen.de> diff --git a/winsup/cygwin/security.h b/winsup/cygwin/security.h index ac1a664..875e2ad 100644 --- a/winsup/cygwin/security.h +++ b/winsup/cygwin/security.h @@ -1,6 +1,6 @@ /* security.h: security declarations - Copyright 2000, 2001, 2002 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index f962934..d16d03b 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1,6 +1,6 @@ /* select.cc - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Christopher Faylor of Cygnus Solutions cgf@cygnus.com diff --git a/winsup/cygwin/select.h b/winsup/cygwin/select.h index d38e19c..0938708 100644 --- a/winsup/cygwin/select.h +++ b/winsup/cygwin/select.h @@ -1,6 +1,6 @@ /* select.h - Copyright 1998, 1999, 2000, 2001, 2004 Red Hat, Inc. + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index 718f4e9..54232bb 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -1,6 +1,6 @@ /* signal.cc - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Steve Chamberlain of Cygnus Support, sac@cygnus.com Significant changes by Sergey Okhapkin <sos@prospect.com.ru> diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 327382e..caa22a5 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -125,10 +125,10 @@ Static HANDLE wait_sig_inited; // Control synchronization of */ Static HANDLE events[PSIZE + 1]; // All my children's handles++ #define hchildren (events + 1) // Where the children handles begin -Static char cpchildren[PSIZE * sizeof (pinfo)]; // All my children info Static int nchildren; // Number of active children -Static char czombies[(NZOMBIES + 1) * sizeof (pinfo)]; // All my deceased children info +Static char cpchildren[PSIZE * sizeof (pinfo)]; // All my children info Static int nzombies; // Number of deceased children +Static char czombies[(NZOMBIES + 1) * sizeof (pinfo)]; // All my deceased children info #define pchildren ((pinfo *) cpchildren) #define zombies ((pinfo *) czombies) @@ -378,7 +378,7 @@ proc_subproc (DWORD what, DWORD val) way to deal with this and could lead to process hangs. */ if (nzombies >= NZOMBIES) { - sigproc_printf ("zombie table overflow %d", thiszombie); + system_printf ("zombie table overflow %d", thiszombie); remove_zombie (thiszombie); } diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index bfb94bd..7f6231e 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -1,6 +1,6 @@ /* spawn.cc - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/sync.cc b/winsup/cygwin/sync.cc index dbc2630..2116ed0 100644 --- a/winsup/cygwin/sync.cc +++ b/winsup/cygwin/sync.cc @@ -4,7 +4,7 @@ which is intended to operate similarly to a mutex but attempts to avoid making expensive calls to the kernel. - Copyright 2000, 2001, 2002 Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Christopher Faylor <cgf@cygnus.com> diff --git a/winsup/cygwin/sync.h b/winsup/cygwin/sync.h index 3ae0937..75b0b16 100644 --- a/winsup/cygwin/sync.h +++ b/winsup/cygwin/sync.h @@ -1,6 +1,6 @@ /* sync.h: Header file for cygwin synchronization primitives. - Copyright 1999, 2000, 2001, 2002 Red Hat, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Christopher Faylor <cgf@cygnus.com> diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index f2b0881..790fcb8 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1,6 +1,6 @@ /* syscalls.cc: syscalls - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc index 5722ed3..1e0f912 100644 --- a/winsup/cygwin/sysconf.cc +++ b/winsup/cygwin/sysconf.cc @@ -1,6 +1,6 @@ /* sysconf.cc - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index c61308d..5da7634 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -1,6 +1,6 @@ /* thread.cc: Locking and threading module functions - Copyright 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Originally written by Marco Fuykschot <marco@ddi.nl> Substantialy enhanced by Robert Collins <rbtcollins@hotmail.com> diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h index 0e9779a..3619817 100644 --- a/winsup/cygwin/thread.h +++ b/winsup/cygwin/thread.h @@ -1,6 +1,6 @@ /* thread.h: Locking and threading module definitions - Copyright 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Marco Fuykschot <marco@ddi.nl> Major update 2001 Robert Collins <rbtcollins@hotmail.com> diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 62ed0f2..231347e 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -1,6 +1,6 @@ /* uinfo.cc: user info (uid, gid, etc...) - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/wait.cc b/winsup/cygwin/wait.cc index d7dd1f8..8e5800b 100644 --- a/winsup/cygwin/wait.cc +++ b/winsup/cygwin/wait.cc @@ -1,6 +1,6 @@ /* wait.cc: Posix wait routines. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index 8b720cb..dfa9a6d 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -1,7 +1,7 @@ /* wincap.cc -- figure out on which OS we're running. Set the capability class to the appropriate values. - Copyright 2001, 2002 Red Hat, Inc. + Copyright 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h index 66ab87e..7794f0e 100644 --- a/winsup/cygwin/wincap.h +++ b/winsup/cygwin/wincap.h @@ -1,6 +1,6 @@ /* wincap.h: Header for OS capability class. - Copyright 2001, 2002 Red Hat, Inc. + Copyright 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. diff --git a/winsup/cygwin/window.cc b/winsup/cygwin/window.cc index a96337a..d005ae6 100644 --- a/winsup/cygwin/window.cc +++ b/winsup/cygwin/window.cc @@ -1,6 +1,6 @@ /* window.cc: hidden windows for signals/itimer support - Copyright 1997, 1998, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Sergey Okhapkin <sos@prospect.com.ru> diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index 7f45dbe..9301e92 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -1,6 +1,6 @@ /* winsup.h: main Cygwin header file. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. This file is part of Cygwin. |