From e2fd6e2de322cc12d9153da548ab76379049c11c Mon Sep 17 00:00:00 2001 From: rpj Date: Tue, 25 Jul 2000 16:14:23 +0000 Subject: 2000-07-25 Ross Johnson * sched.c (sched_get_priority_max): Handle different WinCE and Win32 priority values together. (sched_get_priority_min): Ditto. - Tristan Savatier * create.c (pthread_create): Force new threads to wait until pthread_create has the new thread's handle; we also retain a local copy of the handle for internal use until pthread_create returns. * private.c (_pthread_threadStart): Initialise ei[]. (_pthread_threadStart): When beginthread is used to start the thread, force waiting until the creator thread had the thread handle. * cancel.c (_pthread_cancel_thread): Include context switch code for defined(_X86_) environments in addition to _M_IX86. * rwlock.c (pthread_rwlock_destroy): Assignment changed to avoid compiler warning. * private.c (_pthread_get_exception_services_code): Cast NULL return value to avoid compiler warning. * cleanup.c (pthread_pop_cleanup): Initialise "cleanup" variable to avoid compiler warnings. * misc.c (_pthread_new): Change "new" variable to "t" to avoid confusion with the C++ keyword of the same name. * condvar.c (cond_wait_cleanup): Initialise lastWaiter variable. (cond_timedwait): Remove unused local variables. to avoid compiler warnings. * dll.c (dllMain): Remove 2000-07-21 change - problem appears to be in pthread_create(). 2000-07-22 Ross Johnson * tsd.c (pthread_key_create): If a destructor was given and the pthread_mutex_init failed, then would try to reference a NULL pointer (*key); eliminate this section of code by using a dynamically initialised mutex (PTHREAD_MUTEX_INITIALIZER). * tsd.c (pthread_setspecific): Return an error if unable to set the value; simplify cryptic conditional. * tsd.c (pthread_key_delete): Locking threadsLock relied on mutex_lock returning an error if the key has no destructor. ThreadsLock is only initialised if the key has a destructor. Making this mutex a static could reduce the number of mutexes used by an application since it is actually created only at first use and it's often destroyed soon after. 2000-07-22 Ross Johnson * FAQ: Added Q5 and Q6. tests/ChangeLog: 2000-07-25 Ross Johnson * runtest.bat: modified to work under W98. * runall.bat: Add new tests; modified to work under W98. It was ok under NT. * Makefile: Add new tests. * exception1.c: New; Test passing exceptions back to the application and retaining library internal exceptions. * join0.c: New; Test a single join. --- GNUmakefile | 140 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 71 insertions(+), 69 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index f0d8982..4c94cc7 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,69 +1,71 @@ -# -# Pthreads-win32 - POSIX Threads Library for Win32 -# Copyright (C) 1998 -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this library; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -# MA 02111-1307, USA -# - -RM = erase - -CC = g++ - -AR = ar - -LD = gcc -mdll - -OPT = -g -O2 - -## Mingw32 -CFLAGS = $(OPT) -I. -DHAVE_CONFIG_H -Wall - -## Cygwin G++ -#CFLAGS = $(OPT) -fhandle-exceptions -I. -DHAVE_CONFIG_H -Wall - -OBJS = attr.o cancel.o cleanup.o condvar.o create.o dll.o errno.o \ - exit.o fork.o global.o misc.o mutex.o private.o rwlock.o \ - sched.o semaphore.o signal.o sync.o tsd.o - -INCL = implement.h semaphore.h pthread.h windows.h - -DLL = pthread.dll - -LIB = libpthread32.a - - -all: $(LIB) - -$(LIB): $(DLL) - dlltool --def $(DLL:.dll=.def) --output-lib $@ --dllname $(DLL) - -.SUFFIXES: .dll - -$(DLL): $(OBJS) - $(LD) -o $@ $^ -Wl,--base-file,$*.base - dlltool --base-file=$*.base --def $*.def --output-exp $*.exp --dllname $@ - $(LD) -o $@ $^ -Wl,--base-file,$*.base,$*.exp - dlltool --base-file=$*.base --def $*.def --output-exp $*.exp --dllname $@ - $(LD) -o $@ $^ -Wl,$*.exp - -clean: - -$(RM) *~ - -$(RM) $(LIB) - -$(RM) *.o - -$(RM) *.exe - -$(RM) $(DLL) - -$(RM) $(DLL:.dll=.base) - -$(RM) $(DLL:.dll=.exp) +# +# Pthreads-win32 - POSIX Threads Library for Win32 +# Copyright (C) 1998 +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA +# + +GLANG = c++ + +RM = erase + +CC = gcc + +AR = ar + +LD = gcc -mdll + +OPT = -g -O2 -x $(GLANG) + +## Mingw32 +CFLAGS = $(OPT) -I. -DHAVE_CONFIG_H -Wall + +## Cygwin G++ +#CFLAGS = $(OPT) -fhandle-exceptions -I. -DHAVE_CONFIG_H -Wall + +OBJS = attr.o cancel.o cleanup.o condvar.o create.o dll.o errno.o \ + exit.o fork.o global.o misc.o mutex.o private.o rwlock.o \ + sched.o semaphore.o signal.o sync.o tsd.o + +INCL = implement.h semaphore.h pthread.h windows.h + +DLL = pthread.dll + +LIB = libpthread32.a + + +all: $(LIB) + +$(LIB): $(DLL) + dlltool --def $(DLL:.dll=.def) --output-lib $@ --dllname $(DLL) + +.SUFFIXES: .dll + +$(DLL): $(OBJS) + $(LD) -o $@ $^ -Wl,--base-file,$*.base + dlltool --base-file=$*.base --def $*.def --output-exp $*.exp --dllname $@ + $(LD) -o $@ $^ -Wl,--base-file,$*.base,$*.exp + dlltool --base-file=$*.base --def $*.def --output-exp $*.exp --dllname $@ + $(LD) -o $@ $^ -Wl,$*.exp + +clean: + -$(RM) *~ + -$(RM) $(LIB) + -$(RM) *.o + -$(RM) *.exe + -$(RM) $(DLL) + -$(RM) $(DLL:.dll=.base) + -$(RM) $(DLL:.dll=.exp) -- cgit v1.2.3