| Age | Commit message (Collapse) | Author | 
|---|
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  | 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. | 
|  | * mutex.c (pthread_mutex_timedlock): New function suggested by
        Alexander Terekhov. The logic required to implement this
        properly came from Alexander, with some collaboration
        with Thomas Pfaff.
        (pthread_mutex_unlock): Wrap the waiters check and sema
        post in a critical section to prevent a race with
        pthread_mutex_timedlock.
        (ptw32_timed_semwait): New function;
        returns a special result if the absolute timeout parameter
        represents a time already passed when called; used by
        pthread_mutex_timedwait(). Have deliberately not reused
        the name "ptw32_sem_timedwait" because they are not the same
        routine.
        * condvar.c (ptw32_cond_timedwait): Use the new sem_timedwait()
        instead of ptw32_sem_timedwait(), which now has a different
        function. See previous.
        * implement.h: Remove prototype for ptw32_sem_timedwait.
        See next.
        (pthread_mutex_t_): Add critical section element for access
        to lock_idx during mutex post-timeout processing.
        * semaphore.h (sem_timedwait): See next.
        * semaphore.c (sem_timedwait): See next.
        * private.c (ptw32_sem_timedwait): Move to semaphore.c
        and rename as sem_timedwait().
2002-01-18  Ross Johnson  <rpj@special.ise.canberra.edu.au>
        * sync.c (pthread_join): Was getting the exit code from the
        calling thread rather than the joined thread if
        defined(__MINGW32__) && !defined(__MSVCRT__).
2002-01-15  Ross Johnson  <rpj@special.ise.canberra.edu.au>
        * pthread.h: Unless the build explicitly defines __CLEANUP_SEH,
        __CLEANUP_CXX, or __CLEANUP_C, then the build defaults to
        __CLEANUP_C style cleanup. This style uses setjmp/longjmp
        in the cancelation and thread exit implementations and therefore
        won't do stack unwinding if linked to applications that have it
        (e.g. C++ apps). This is currently consistent with most/all
        commercial Unix POSIX threads implementations.
        * spin.c (pthread_spin_init): Edit renamed function call.
        * nonportable.c (pthread_num_processors_np): New.
        (pthread_getprocessors_np): Renamed to ptw32_getprocessors
        and moved to private.c.
        * private.c (pthread_getprocessors): Moved here from
        nonportable.c.
        * pthread.def (pthread_getprocessors_np): Removed
        from export list.
        * rwlock.c (pthread_rwlockattr_init): New.
        (pthread_rwlockattr_destroy): New.
        (pthread_rwlockattr_getpshared): New.
        (pthread_rwlockattr_setpshared): New. | 
|  |  | 
|  | 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. | 
|  | * All applicable: Change _pthread_ prefix to
        ptw32_ prefix to remove leading underscores
        from private library identifiers (single
        and double leading underscores are reserved in the
        ANSI C standard for compiler implementations). | 
|  | * 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. | 
|  | * sched.c (sched_get_priority_max): Handle different WinCE and
        Win32 priority values together.
        (sched_get_priority_min): Ditto.
        - Tristan Savatier <tristan@mpegtv.com>
        * 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  <rpj@special.ise.canberra.edu.au>
        * 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  <rpj@special.ise.canberra.edu.au>
        * FAQ: Added Q5 and Q6.
tests/ChangeLog:
2000-07-25  Ross Johnson  <rpj@special.ise.canberra.edu.au>
        * 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. | 
|  |  | 
|  | - asynchronous cancellation added
	- attempt to hide internal exceptions from applications
	- kernel32 load/free problem fixed
	- new tests
	- changes only to comments in some tests | 
|  | Sat May  8 09:42:30 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>
	* pthread.def (sem_open): Add.
	(sem_close): Add.
	(sem_unlink): Add.
	(sem_getvalue): Add.
	* FAQ (Question 3): Add.
Thu Apr  8 01:16:23 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>
	* semaphore.c (sem_open): New function; returns an error (ENOSYS).
	(sem_close): ditto.
	(sem_unlink): ditto.
	(sem_getvalue): ditto.
	* semaphore.h (_POSIX_SEMAPHORES): define.
./tests/ChangeLog
Sat May 29 23:29:04 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>
        * runall.bat (condvar5): Add new test.
        * runall.bat (condvar6): Add new test.
        * Makefile (condvar5) : Add new test.
        * Makefile (condvar6) : Add new test.
        * condvar5.c: New test for pthread_cond_broadcast().
        * condvar6.c: New test for pthread_cond_broadcast(). | 
|  | * pthread.h (pthread_mutex_t): revert to (pthread_mutex_t *);
        define a value to serve as PTHREAD_MUTEX_INITIALIZER.
        (pthread_mutex_t_): remove staticinit and valid elements.
        (pthread_cond_t): revert to (pthread_cond_t_ *);
        define a value to serve as PTHREAD_COND_INITIALIZER.
        (pthread_cond_t_): remove staticinit and valid elements.
        * mutex.c (pthread_mutex_t args): adjust indirection of references.
        (all functions): check for PTHREAD_MUTEX_INITIALIZER value;
        check for NULL (invalid).
        * condvar.c (pthread_cond_t args): adjust indirection of references.
        (all functions): check for PTHREAD_COND_INITIALIZER value;
        check for NULL (invalid).
Wed Mar 10 17:18:12 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>
        * misc.c (CancelableWait): Undo changes from Mar 8 and 7.
tests/ChangeLog
Fri Mar 12 08:34:15 1999  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>
        * eyal1.c (main): Fix trylock loop; was not waiting for thread to lock
        the "started" mutex. | 
|  |  | 
|  |  | 
|  | Q 1     How do I get pthreads-win32 to link under Cygwin32 or Mingw32? |