OSDN Git Service

* debug.h (console_printf): Define for non-debugging condition.
authorcgf <cgf>
Mon, 9 Feb 2004 04:04:22 +0000 (04:04 +0000)
committercgf <cgf>
Mon, 9 Feb 2004 04:04:22 +0000 (04:04 +0000)
* 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:
winsup/cygwin/ChangeLog
winsup/cygwin/autoload.cc
winsup/cygwin/cygheap.cc
winsup/cygwin/cygmalloc.h
winsup/cygwin/cygserver.h
winsup/cygwin/cygserver_ipc.h
winsup/cygwin/cygthread.cc
winsup/cygwin/cygtls.cc
winsup/cygwin/cygtls.h
winsup/cygwin/debug.cc
winsup/cygwin/debug.h
winsup/cygwin/dlfcn.cc
winsup/cygwin/dll_init.cc
winsup/cygwin/dtable.cc
winsup/cygwin/exceptions.cc
winsup/cygwin/external.cc
winsup/cygwin/fhandler.cc
winsup/cygwin/fhandler.h
winsup/cygwin/fhandler_clipboard.cc
winsup/cygwin/fhandler_console.cc
winsup/cygwin/fhandler_disk_file.cc
winsup/cygwin/fhandler_dsp.cc
winsup/cygwin/fhandler_fifo.cc
winsup/cygwin/fhandler_floppy.cc
winsup/cygwin/fhandler_mem.cc
winsup/cygwin/fhandler_nodevice.cc
winsup/cygwin/fhandler_proc.cc
winsup/cygwin/fhandler_process.cc
winsup/cygwin/fhandler_random.cc
winsup/cygwin/fhandler_raw.cc
winsup/cygwin/fhandler_registry.cc
winsup/cygwin/fhandler_serial.cc
winsup/cygwin/fhandler_socket.cc
winsup/cygwin/fhandler_tape.cc
winsup/cygwin/fhandler_termios.cc
winsup/cygwin/fhandler_virtual.cc
winsup/cygwin/fhandler_windows.cc
winsup/cygwin/fhandler_zero.cc
winsup/cygwin/gendef
winsup/cygwin/heap.cc
winsup/cygwin/malloc_wrapper.cc
winsup/cygwin/mmap.cc
winsup/cygwin/net.cc
winsup/cygwin/perthread.h
winsup/cygwin/pinfo.cc
winsup/cygwin/pipe.cc
winsup/cygwin/sec_acl.cc
winsup/cygwin/sec_helper.cc
winsup/cygwin/security.cc
winsup/cygwin/security.h
winsup/cygwin/select.cc
winsup/cygwin/select.h
winsup/cygwin/signal.cc
winsup/cygwin/sigproc.cc
winsup/cygwin/spawn.cc
winsup/cygwin/sync.cc
winsup/cygwin/sync.h
winsup/cygwin/syscalls.cc
winsup/cygwin/sysconf.cc
winsup/cygwin/thread.cc
winsup/cygwin/thread.h
winsup/cygwin/uinfo.cc
winsup/cygwin/wait.cc
winsup/cygwin/wincap.cc
winsup/cygwin/wincap.h
winsup/cygwin/window.cc
winsup/cygwin/winsup.h

index e3bd6e2..af1c6d4 100644 (file)
@@ -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
index 9cd7f6a..9ed87af 100644 (file)
@@ -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.
 
index 83189c3..e9dc5d4 100644 (file)
@@ -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.
 
index 30b9ee3..adb37cf 100644 (file)
@@ -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.
 
index 79f7d41..7f4943a 100644 (file)
@@ -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>
 
index 77f54c5..d25a3bd 100644 (file)
@@ -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.
 
index 309bd51..d655640 100644 (file)
@@ -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
index becde2d..d3ed824 100644 (file)
@@ -156,7 +156,7 @@ void
 _threadinfo::push (__stack_t addr, bool exception)
 {
   if (exception)
-    lock (true);
+    lock ();
   *stackptr++ = (__stack_t) addr;
   if (exception)
     unlock ();
index c1525a4..43802dd 100644 (file)
@@ -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*/
 };
index 6ab63eb..db5da1a 100644 (file)
@@ -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
index f4f00c6..796eeec 100644 (file)
@@ -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
 
index 8a25b7d..9202d11 100644 (file)
@@ -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.
 
index 14bfe93..72048ef 100644 (file)
@@ -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
index 2552789..2479373 100644 (file)
@@ -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.
 
index e90d093..03df67f 100644 (file)
@@ -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;
 }
index b637d2f..332879f 100644 (file)
@@ -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>
 
index 7b701d8..81466d3 100644 (file)
@@ -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.
 
index 13b8a5e..2fde1f7 100644 (file)
@@ -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.
 
index 3f24094..b0aed3e 100644 (file)
@@ -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)
 
index 2afb595..afac56c 100644 (file)
@@ -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.
 
index d60d632..fb70716 100644 (file)
@@ -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.
 
index 2726ea4..01e1ea6 100644 (file)
@@ -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)
 
index d886899..c45a4dc 100644 (file)
@@ -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.
 
index e849a53..5d715ad 100644 (file)
@@ -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.
 
index b9807d1..1688ab0 100644 (file)
@@ -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.
 
index 22281d5..d27747b 100644 (file)
@@ -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.
 
index a05615a..2c77afc 100644 (file)
@@ -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.
 
index a65bcf6..d990cc1 100644 (file)
@@ -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.
 
index a90b703..6ff92ae 100644 (file)
@@ -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)
 
index 2e67143..afa478b 100644 (file)
@@ -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.
 
index f80096f..95ee3ff 100644 (file)
@@ -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.
 
index 7934224..b52befa 100644 (file)
@@ -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.
 
index 6173460..99e0d18 100644 (file)
@@ -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.
 
index 8711246..e63a1ba 100644 (file)
@@ -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.
 
index 398dabd..ed8d3b2 100644 (file)
@@ -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.
 
index bada27c..ec38364 100644 (file)
@@ -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.
 
index a9c3364..ca9622f 100644 (file)
@@ -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).
index 46bf5bf..2146c73 100644 (file)
@@ -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)
 
index 2457314..b391d50 100755 (executable)
@@ -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
index af5ec2f..9ea5d9b 100644 (file)
@@ -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.
 
index 718f0b2..04d4f66 100644 (file)
@@ -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
index 7042048..4f8ea6e 100644 (file)
@@ -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.
 
index f3c0c8c..8f0f555 100644 (file)
@@ -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.
 
index 4436168..c721cef 100644 (file)
@@ -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>
 
index c53ff91..e3723f8 100644 (file)
@@ -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.
 
index e46eb7b..4b9c522 100644 (file)
@@ -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.
 
index 472c203..7bcf36c 100644 (file)
@@ -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>
 
index 7888c16..0c44c6f 100644 (file)
@@ -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>
 
index 66052ac..f54c33d 100644 (file)
@@ -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>
index ac1a664..875e2ad 100644 (file)
@@ -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.
 
index f962934..d16d03b 100644 (file)
@@ -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
index d38e19c..0938708 100644 (file)
@@ -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.
 
index 718f4e9..54232bb 100644 (file)
@@ -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>
index 327382e..caa22a5 100644 (file)
@@ -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);
        }
 
index bfb94bd..7f6231e 100644 (file)
@@ -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.
 
index dbc2630..2116ed0 100644 (file)
@@ -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>
 
index 3ae0937..75b0b16 100644 (file)
@@ -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>
 
index f2b0881..790fcb8 100644 (file)
@@ -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.
 
index 5722ed3..1e0f912 100644 (file)
@@ -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.
 
index c61308d..5da7634 100644 (file)
@@ -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>
index 0e9779a..3619817 100644 (file)
@@ -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>
index 62ed0f2..231347e 100644 (file)
@@ -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.
 
index d7dd1f8..8e5800b 100644 (file)
@@ -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.
 
index 8b720cb..dfa9a6d 100644 (file)
@@ -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.
 
index 66ab87e..7794f0e 100644 (file)
@@ -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.
 
index a96337a..d005ae6 100644 (file)
@@ -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>
 
index 7f45dbe..9301e92 100644 (file)
@@ -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.