Skip to content

Commit

Permalink
remove debug code which was used to analyze the crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
GerHobbelt committed Oct 14, 2012
1 parent ca09e4d commit 2740214
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
14 changes: 5 additions & 9 deletions ptw32_new.c
Expand Up @@ -9,25 +9,25 @@
* Pthreads-win32 - POSIX Threads Library for Win32 * Pthreads-win32 - POSIX Threads Library for Win32
* Copyright(C) 1998 John E. Bossom * Copyright(C) 1998 John E. Bossom
* Copyright(C) 1999,2005 Pthreads-win32 contributors * Copyright(C) 1999,2005 Pthreads-win32 contributors
* *
* Contact Email: rpj@callisto.canberra.edu.au * Contact Email: rpj@callisto.canberra.edu.au
* *
* The current list of contributors is contained * The current list of contributors is contained
* in the file CONTRIBUTORS included with the source * in the file CONTRIBUTORS included with the source
* code distribution. The list can also be seen at the * code distribution. The list can also be seen at the
* following World Wide Web location: * following World Wide Web location:
* http://sources.redhat.com/pthreads-win32/contributors.html * http://sources.redhat.com/pthreads-win32/contributors.html
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version. * version 2 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library in the file COPYING.LIB; * License along with this library in the file COPYING.LIB;
* if not, write to the Free Software Foundation, Inc., * if not, write to the Free Software Foundation, Inc.,
Expand Down Expand Up @@ -85,10 +85,6 @@ ptw32_new (void)


if (tp->cancelEvent == NULL) if (tp->cancelEvent == NULL)
{ {
int err = GetLastError();
char buf[80];
sprintf(buf, "error = %08x\n", err);

ptw32_threadReusePush (tp->ptHandle); ptw32_threadReusePush (tp->ptHandle);
return nil; return nil;
} }
Expand Down
9 changes: 0 additions & 9 deletions ptw32_reuse.c
Expand Up @@ -112,21 +112,12 @@ ptw32_threadReusePop (void)
void void
ptw32_threadReusePush (pthread_t thread) ptw32_threadReusePush (pthread_t thread)
{ {
pthread_t thread_clone = thread;
pthread_t thread_clone2;

ptw32_thread_t * tp = (ptw32_thread_t *) thread.p; ptw32_thread_t * tp = (ptw32_thread_t *) thread.p;
pthread_t t; pthread_t t;
ptw32_mcs_local_node_t node; ptw32_mcs_local_node_t node;


thread_clone2 = tp->ptHandle;

ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node); ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node);


if (!tp && thread_clone.p == thread_clone2.p)
{
t.p = 0;
}
t = tp->ptHandle; t = tp->ptHandle;
memset(tp, 0, sizeof(ptw32_thread_t)); memset(tp, 0, sizeof(ptw32_thread_t));


Expand Down

0 comments on commit 2740214

Please sign in to comment.