summaryrefslogtreecommitdiff
path: root/tests/cleanup3.c
AgeCommit message (Collapse)Author
2011-03-06More 64 bit cast fixupsrpj
2011-03-05Rework pthread_join result arg castingrpj
2011-03-04Casting fixupsrpj
2005-04-06fix unguarded global variable accessrpj
2005-01-01Copyright year updatedrpj
2004-11-22Copyright updaterpj
2004-11-03Mutex, semaphore, thread ID, test suite changes - see ChangeLogsrpj
2003-08-19Updated Copyright notice (date and contact address).rpj
2002-02-08Copyright notice updates; module splitting; POSIX versionrpj
conditional compilation; refinements; bug fixes. See the ChangeLog.
2002-02-03Change #pragma inline_depth(8) to use empty () for default value.rpj
2002-02-02 * cancel.c: Rearranged some code and introduced checksrpj
to disable cancelation at the start of a thread's cancelation run to prevent double cancelation. The main problem arises if a thread is canceling and then receives a subsequent async cancel request. * private.c: Likewise. * condvar.c: Place pragmas around cleanup_push/pop to turn off inline optimisation (/Obn where n>0 - MSVC only). Various optimisation switches in MSVC turn this on, which interferes with the way that cleanup handlers are run in C++ EH and SEH code. Application code compiled with inline optimisation must also wrap cleanup_push/pop blocks with the pragmas, e.g. #pragma inline_depth(0) pthread_cleanup_push(...) ... pthread_cleanup_pop(...) #pragma inline_depth(8) * rwlock.c: Likewise. * mutex.c: Remove attempts to inline some functions. * signal.c: Modify misleading comment. tests/ * mutex8: New test. * mutex8n: New test. * mutex8e: New test. * mutex8r: New test. * cancel6a: New test. * cancel6d: New test. * cleanup0.c: Add pragmas for inline optimisation control. * cleanup1.c: Add pragmas for inline optimisation control. * cleanup2.c: Add pragmas for inline optimisation control. * cleanup3.c: Add pragmas for inline optimisation control. * condvar7.c: Add pragmas for inline optimisation control. * condvar8.c: Add pragmas for inline optimisation control. * condvar9.c: Add pragmas for inline optimisation control.
2001-12-18Include an interim complete Copyright notice in each source file;rpj
Remove unused autoconf files; Add the file COPYING, which describes the pthread-win32 license relative to the FSF LGPL.
2000-12-28./ChangeLog:rpj
2000-12-28 Ross Johnson <rpj@special.ise.canberra.edu.au> * private.c (ptw32_threadStart): Unhandled exceptions are now passed through to the system to deal with. This is consistent with normal Windows behaviour. C++ applications may use set_terminate() to override the default behaviour which is to call ptw32_terminate(). Ptw32_terminate() cleans up some POSIX thread stuff before calling the system default function which calls abort(). The users termination function should conform to standard C++ semantics which is to not return. It should exit the thread (call pthread_exit()) or exit the application. * private.c (ptw32_terminate): Added as the default set_terminate() function. It calls the system default function after cleaning up some POSIX thread stuff. * implement.h (ptw32_try_enter_critical_section): Move declaration. * global.c (ptw32_try_enter_critical_section): Moved from dll.c. * dll.c: Move process and thread attach/detach code into functions in nonportable.c. * nonportable.c (pthread_win32_process_attach_np): Process attach code from dll.c is now available to static linked applications. * nonportable.c (pthread_win32_process_detach_np): Likewise. * nonportable.c (pthread_win32_thread_attach_np): Likewise. * nonportable.c (pthread_win32_thread_detach_np): Likewise. * pthread.h: Add new non-portable prototypes for static linked applications. * GNUmakefile (OPT): Increase optimisation flag and remove debug info flag. * pthread.def: Add new non-portable exports for static linked applications. 2000-12-11 Ross Johnson <rpj@special.ise.canberra.edu.au> * FAQ: Update Answer 6 re getting a fully working Mingw32 built library. 2000-09-09 Ross Johnson <rpj@special.ise.canberra.edu.au> * pthread.h (ctime_r): Fix arg. ./tests/ChangeLog: 2000-12-28 Ross Johnson <rpj@special.ise.canberra.edu.au> * eyal1.c: Increase thread work loads. * exception2.c: New test. * exception3.c: New test. * Makefile: Add new tests exception2.c and exception3.c. * GNUmakefile: Likewise. 2000-12-11 Ross Johnson <rpj@special.ise.canberra.edu.au> * cleanup3.c: Remove unused variable. * cleanup2.c: Likewise. * exception1.c: Throw an exception rather than use a deliberate zero divide so that catch(...) will handle it under Mingw32. Mingw32 now builds the library correctly to pass all tests - see Thomas Pfaff's detailed instructions re needed changes to Mingw32 in the Pthreads-Win32 FAQ.
2000-08-142000-08-13 Ross Johnson <rpj@special.ise.canberra.edu.au>rpj
* errno.c: Add _MD precompile condition; thus far had no effect when using /MD compile option but I thnk it should be there. * exit.c: Add __cplusplus to various #if lines; was compiling SEH code even when VC++ had C++ compile options. * private.c: ditto. * create.c (pthread_create): Add PT_STDCALL macro to function pointer arg in _beginthread(). * pthread.h: PT_STDCALL really does need to be defined in both this and impliment.h; don't set it to __cdecl - this macro is only used to extend function pointer casting for functions that will be passed as parameters. (~PThreadCleanup): add cast and group expression. (_errno): Add _MD compile conditional. (PtW32NoCatchWarn): Change pragma message. * implement.h: Move and change PT_STDCALL define. * need_errno.h: Add _MD to compilation conditional. * GNUmakefile: Substantial rewrite for new naming convention; set for nil optimisation (turn it up when we have a working library build; add target "fake.a" to build a libpthreadw32.a from the VC++ built DLL pthreadVCE.dll. * pthread.def (LIBRARY): Don't specify in the .def file - it is specified on the linker command line since we now use the same .def file for variously named .dlls. * Makefile: Substantial rewrite for new naming convention; default nmake target only issues a help message; run nmake with specific target corresponding to the EH scheme being used. * README: Update information; add naming convention explanation. * ANNOUNCE: Update information. 2000-08-12 Ross Johnson <rpj@special.ise.canberra.edu.au> * pthread.h: Add compile-time message when using MSC_VER compiler and C++ EH to warn application programmers to use PtW32Catch instead of catch(...) if they want cancelation and pthread_exit to work. * implement.h: Remove #include <semaphore.h>; we use our own local semaphore.h. tests/ChangeLog: 2000-08-13 Ross Johnson <rpj@special.ise.canberra.edu.au> * condvar3.c: Minor change to eliminate compiler warning. * condvar4.c: ditto. * condvar5.c: ditto. * condvar6.c: ditto. * condvar7.c: ditto. * condvar8.c: ditto. * condvar9.c: ditto. * exit1.c: Function needed return statement. * cleanup1.c: Remove unnecessary printf arg. * cleanup2.c: Fix cast. * rwlock6.c: Fix casts. * exception1.c (PtW32CatchAll): Had the wrong name; fix casts. * cancel3.c: Remove unused waitLock variable. * GNUmakefile: Change library/dll naming; add new tests; general minor changes. * Makefile: Change library/dll naming; add targets for testing each of the two VC++ EH scheme versions; default target now issues help message; compile warnings now interpreted as errors to stop the make; add new tests; restructure to remove prerequisites needed otherwise. * README: Updated.
2000-08-062000-08-06 Ross Johnson <rpj@special.ise.canberra.edu.au>rpj
* pthread.h: Remove #warning - VC++ doesn't accept it. 2000-08-05 Ross Johnson <rpj@special.ise.canberra.edu.au> * pthread.h (PtW32CatchAll): Add macro. When compiling applications using VC++ with C++ EH rather than SEH 'PtW32CatchAll' must be used in place of any 'catch( ... )' if the application wants pthread cancelation or pthread_exit() to work. 2000-08-03 Ross Johnson <rpj@special.ise.canberra.edu.au> * pthread.h: Add a base class Pthread_exception for library internal exceptions and change the "catch" re-define macro to use it. 2000-08-02 Ross Johnson <rpj@special.ise.canberra.edu.au> * GNUmakefile (CFLAGS): Add -mthreads. Add new targets to generate cpp and asm output. * sync.c (pthread_join): Remove dead code. tests: 2000-08-06 Ross Johnson <rpj@special.ise.canberra.edu.au> * ccl.bat: Add /nologo to remove extraneous output. * exception1.c (exceptionedThread): Init 'dummy'; put expression into if condition to prevent optimising away; remove unused variable. * cancel4.c (mythread): Cast return value to avoid warnings. * cancel2.c (mythread): Missing #endif. * condvar9.c (mythread): Cast return value to avoid warnings. * condvar8.c (mythread): Cast return value to avoid warnings. * condvar7.c (mythread): Cast return value to avoid warnings. * cleanup3.c (mythread): Cast return value to avoid warnings. * cleanup2.c (mythread): Cast return value to avoid warnings. * cleanup1.c (mythread): Cast return value to avoid warnings. * condvar5.c (mythread): Cast return value to avoid warnings. * condvar3.c (mythread): Cast return value to avoid warnings. * condvar6.c (mythread): Cast return value to avoid warnings. * condvar4.c (mythread): Cast return value to avoid warnings. 2000-08-05 Ross Johnson <rpj@special.ise.canberra.edu.au> * cancel2.c: Use PtW32CatchAll macro if defined. * exception1.c: Use PtW32CatchAll macro if defined. 2000-08-02 Ross Johnson <rpj@special.ise.canberra.edu.au> * tsd1.c: Fix typecasts of &result [g++ is now very fussy]. * test.h (assert): Return 0's explicitly to allay g++ errors. * join2.c: Add explicit typecasts. * join1.c: Add explicit typecasts. * join0.c: Add explicit typecasts. * eyal1.c: Add explicit typecasts. * count1.c (main): Add type cast to remove g++ parse warning [gcc-2.95.2 seems to have tightened up on this]. * Makefile (GLANG): Use c++ explicitly. Remove MSVC sections (was commented out). Add target to generate cpp output.
2000-01-06New cleanup handler execution tests.rpj