This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
PATCH: Remove cruft
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- To: libstdc++ at gcc dot gnu dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 3 May 2003 02:44:16 -0500 (CDT)
- Subject: PATCH: Remove cruft
- Reply-to: rittle at labs dot mot dot com
While adding another threaded test case, I studied the old ones...
The FreeBSD 4.X code base fixed the memory leak. As committed to mainline.
* testsuite/thread/pthread1.cc: Remove special case for FreeBSD.
Index: testsuite/thread/pthread1.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/thread/pthread1.cc,v
retrieving revision 1.6
diff -c -r1.6 pthread1.cc
*** testsuite/thread/pthread1.cc 15 Apr 2003 20:31:57 -0000 1.6
--- testsuite/thread/pthread1.cc 3 May 2003 07:41:08 -0000
***************
*** 124,137 ****
{
pthread_join (prod[i], NULL);
pthread_join (cons[i], NULL);
- #if defined(__FreeBSD__) && __FreeBSD__ < 5
- // These lines are not required by POSIX since a successful
- // join is suppose to detach as well...
- pthread_detach (prod[i]);
- pthread_detach (cons[i]);
- // ...but they are according to the FreeBSD 4.X code base
- // or else you get a memory leak.
- #endif
delete tq[i];
}
}
--- 124,129 ----