📄 changelog
字号:
2004-05-16 Ross Johnson <rpj at callisto.canberra.edu.au>
* pthread_cancel.c (pthread_cancel): Adapted to use auto-detected
QueueUserAPCEx features at run-time.
(ptw32_RegisterCancelation): Drop in replacement for QueueUserAPCEx()
if it can't be used. Provides older style non-preemptive async
cancelation.
* pthread_win32_attach_detach_np.c (pthread_win32_attach_np):
Auto-detect quserex.dll and the availability of alertdrv.sys;
initialise and close on process attach/detach.
* global.c (ptw32_register_cancelation): Pointer to either
QueueUserAPCEx() or ptw32_RegisterCancelation() depending on
availability. QueueUserAPCEx makes pre-emptive async cancelation
possible.
* implement.h: Add definitions and prototypes related to QueueUserAPC.
2004-05-16 Panagiotis E. Hadjidoukas <peh at hpclab.ceid.upatras.gr>
* QueueUserAPCEx (separate contributed package): Provides preemptive
APC feature.
* pthread_cancel.c (pthread_cancel): Initial integration of
QueueUserAPCEx into pthreads-win32 to provide true pre-emptive
async cancelation of threads, including blocked threads.
2004-05-06 Makoto Kato <raven at oldskool.jp>
* pthread.h (DWORD_PTR): Define typedef for older MSVC.
* pthread_cancel.c (AMD64): Add architecture specific Context register.
* ptw32_getprocessors.c: Use correct types (DWORD_PTR) for mask
variables.
2004-04-06 P. van Bruggen <pietvb at newbridges.nl>
* ptw32_threadDestroy.c: Destroy threadLock mutex to
close a memory leak.
2004-02-13 Gustav Hallberg <gustav at virtutech.com>
* pthread_equal.c: Remove redundant equality logic.
2003-12-10 Philippe Di Cristo <philipped at voicebox.com>
* sem_timedwait.c (sem_timedwait): Fix timeout calculations.
2003-10-20 Alexander Terekhov <TEREKHOV at de.ibm.com>
* pthread_mutex_timedlock.c (ptw32_semwait): Move to individual module.
* ptw32_semwait.c: New module.
* pthread_cond_wait.c (ptw32_cond_wait_cleanup): Replace cancelable
sem_wait() call with non-cancelable ptw32_semwait() call.
* pthread.c (private.c): Re-order for inlining. GNU C warned that
function ptw32_semwait() was defined 'inline' after it was called.
* pthread_cond_signal.c (ptw32_cond_unblock): Likewise.
* pthread_delay_np.c: Disable Watcom warning with comment.
* *.c (process.h): Remove include from .c files. This is conditionally
included by the common project include files.
2003-10-20 James Ewing <james.ewing at sveasoft.com>
* ptw32_getprocessors.c: Some Win32 environments don't have
GetProcessAffinityMask(), so always return CPU count = 1 for them.
* config.h (NEED_PROCESSOR_AFFINITY_MASK): Define for WinCE.
2003-10-15 Ross Johnson <ross at callisto.canberra.edu.au>
* Re-indented all .c files using default GNU style to remove assorted
editor ugliness (used GNU indent utility in default style).
2003-10-15 Alex Blanco <Alex.Blanco at motorola.com>
* sem_init.c (sem_init): Would call CreateSemaphore even if the sema
struct calloc failed; was not freeing calloced memory if either
CreateSemaphore or CreateEvent failed.
2003-10-14 Ross Johnson <ross at callisto.canberra.edu.au>
* pthread.h: Add Watcom compiler compatibility. Esssentially just add
the cdecl attribute to all exposed function prototypes so that Watcom
generates function call code compatible with non-Watcom built libraries.
By default, Watcom uses registers to pass function args if possible rather
than pushing to stack.
* semaphore.h: Likewise.
* sched.h: Likewise.
* pthread_cond_wait.c (ptw32_cond_wait_cleanup): Define with cdecl attribute
for Watcom compatibility. This routine is called via pthread_cleanup_push so
it had to match function arg definition.
* Wmakefile: New makefile for Watcom builds.
2003-09-14 Ross Johnson <rpj at callisto.canberra.edu.au>
* pthread_setschedparam.c (pthread_setschedparam): Attempt to map
all priority levels between max and min (as returned by
sched_get_priority_min/max) to reasonable Win32 priority levels - i.e.
levels between THREAD_PRIORITY_LOWEST/IDLE to THREAD_PRIORITY_LOWEST and
between THREAD_PRIORITY_HIGHEST/TIME_CRITICAL to THREAD_PRIORITY_HIGHEST
while others remain unchanged; record specified thread priority level
for return by pthread_getschedparam.
Note that, previously, specified levels not matching Win32 priority levels
would silently leave the current thread priority unaltered.
* pthread_getschedparam.c (pthread_getschedparam): Return the priority
level specified by the latest pthread_setschedparam or pthread_create rather
than the actual running thread priority as returned by GetThreadPriority - as
required by POSIX. I.e. temporary or adjusted actual priority levels are not
returned by this routine.
* pthread_create.c (pthread_create): For priority levels specified via
pthread attributes, attempt to map all priority levels between max and
min (as returned by sched_get_priority_min/max) to reasonable Win32
priority levels; record priority level given via attributes, or
inherited from parent thread, for later return by pthread_getschedparam.
* ptw32_new.c (ptw32_new): Initialise pthread_t_ sched_priority element.
* pthread_self.c (pthread_self): Set newly created implicit POSIX thread
sched_priority to Win32 thread's current actual priority. Temporarily
altered priorities can't be avoided in this case.
* implement.h (struct pthread_t_): Add new sched_priority element.
2003-09-12 Ross Johnson <rpj at callisto.canberra.edu.au>
* sched_get_priority_min.c (sched_get_priority_min): On error should return -1
with errno set.
* sched_get_priority_max.c (sched_get_priority_max): Likewise.
2003-09-03 Ross Johnson <rpj at callisto.canberra.edu.au>
* w32_cancelableWait.c (ptw32_cancelable_wait): Allow cancelation
of implicit POSIX threads as well.
2003-09-02 Ross Johnson <rpj at callisto.canberra.edu.au>
* pthread_win32_attach_detach_np.c (pthread_win32_thread_detach_np):
Add comment.
* pthread_exit.c (pthread_exit): Fix to recycle the POSIX thread handle in
addition to calling user TSD destructors. Move the implicit POSIX thread exit
handling to ptw32_throw to centralise the logic.
* ptw32_throw.c (ptw32_throw): Implicit POSIX threads have no point
to jump or throw to, so cleanup and exit the thread here in this case. For
processes using the C runtime, the exit code will be set to the POSIX
reason for the throw (i.e. PTHREAD_CANCEL or the value given to pthread_exit).
Note that pthread_exit() already had similar logic, which has been moved to
here.
* ptw32_threadDestroy.c (ptw32_threadDestroy): Don't close the Win32 handle
of implicit POSIX threads - expect this to be done by Win32?
2003-09-01 Ross Johnson <rpj at callisto.canberra.edu.au>
* pthread_self.c (pthread_self): The newly aquired pthread_t must be
assigned to the reuse stack, not freed, if the routine fails somehow.
2003-08-13 Ross Johnson <rpj at ise.canberra.edu.au>
* pthread_getschedparam.c (pthread_getschedparam): An invalid thread ID
parameter was returning an incorrect error value; now uses a more exhaustive
check for validity.
* pthread_setschedparam.c (pthread_setschedparam): Likewise.
* pthread_join.c (pthread_join): Now uses a more exhaustive
check for validity.
* pthread_detach.c (pthread_detach): Likewise.
* pthread_cancel.c (pthread_cancel): Likewise.
* ptw32_threadDestroy.c (ptw32_threadDestroy): pthread_t structs are
never freed - push them onto a stack for reuse.
* ptw32_new.c (ptw32_new): Check for reusable pthread_t before dynamically
allocating new memory for the struct.
* pthread_kill.c (pthread_kill): New file; new routine; takes only a zero
signal arg so that applications can check the thread arg for validity; checks
that the underlying Win32 thread HANDLE is valid.
* pthread.h (pthread_kill): Add prototype.
* ptw32_reuse.c (ptw32_threadReusePop): New file; new routine; pop a
pthread_t off the reuse stack. pthread_t_ structs that have been destroyed, i.e.
have exited detached or have been joined, are cleaned up and put onto a reuse
stack. Consequently, thread IDs are no longer freed once calloced. The library
will attempt to get a struct off this stack before asking the system to alloc
new memory when creating threads. The stack is guarded by a global mutex.
(ptw32_threadReusePush): New routine; push a pthread_t onto the reuse stack.
* implement.h (ptw32_threadReusePush): Add new prototype.
(ptw32_threadReusePop): Likewise.
(pthread_t): Add new element.
* ptw32_processTerminate.c (ptw32_processTerminate): Delete the thread
reuse lock; free all thread ID structs on the thread reuse stack.
* ptw32_processInitialize.c (ptw32_processInitialize): Initialise the
thread reuse lock.
2003-07-19 Ross Johnson <rpj at ise.canberra.edu.au>
* GNUmakefile: modified to work under MsysDTK environment.
* pthread_spin_lock.c (pthread_spin_lock): Check for NULL arg.
* pthread_spin_unlock.c (pthread_spin_unlock): Likewise.
* pthread_spin_trylock.c (pthread_spin_trylock): Likewise;
fix incorrect pointer value if lock is dynamically initialised by
this function.
* sem_init.c (sem_init): Initialise sem_t value to quell compiler warning.
* sem_destroy.c (sem_destroy): Likewise.
* ptw32_threadStart.c (non-MSVC code sections): Include <exception> rather
than old-style <new.h>; fix all std:: namespace entities such as
std::terminate_handler instances and associated methods.
* ptw32_callUserDestroyRoutines.c (non-MSVC code sections): Likewise.
2003-06-24 Piet van Bruggen <pietvb at newbridges.nl>
* pthread_spin_destroy.c (pthread_spin_destroy): Was not freeing the
spinlock struct.
2003-06-22 Nicolas Barry <boozai at yahoo.com>
* pthread_mutex_destroy.c (pthread_mutex_destroy): When called
with a recursive mutex that was locked by the current thread, the
function was failing with a success return code.
2003-05-15 Steven Reddie <Steven.Reddie at ca.com>
* pthread_win32_attach_detach_np.c (pthread_win32_process_detach_np):
NULLify ptw32_selfThreadKey after the thread is destroyed, otherwise
destructors calling pthreads routines might resurrect it again, creating
memory leaks. Call the underlying Win32 Tls routine directly rather than
pthread_setspecific().
(pthread_win32_thread_detach_np): Likewise.
2003-05-14 Viv <vcotirlea at hotmail.com>
* pthread.dsp: Change /MT compile flag to /MD.
2003-03-04 Alexander Terekhov <TEREKHOV at de.ibm.com>
* pthread_mutex_timedlock.c (pthread_mutex_timedlock): Fix failure to
set ownership of mutex on second grab after abstime timeout.
- bug reported by Robert Strycek <strycek at posam.sk>
2002-12-17 Thomas Pfaff <tpfaff at gmx.net>
* pthread_mutex_lock.c (ptw32_semwait): New static routine to provide
a non-cancelable sem_wait() function. This is consistent with the
way that pthread_mutex_timedlock.c does it.
(pthread_mutex_lock): Use ptw32_semwait() instead of sem_wait().
2002-12-11 Thomas Pfaff <tpfaff at gmx.net>
* pthread_mutex_trylock.c: Should return EBUSY rather than EDEADLK.
* pthread_mutex_destroy.c: Remove redundant ownership test (the
trylock call does this for us); do not destroy a recursively locked
mutex.
2002-09-20 Michael Johnson <michaelj at maine.rr.com>
* pthread_cond_destroy.c (pthread_cond_destroy):
When two different threads exist, and one is attempting to
destroy a condition variable while the other is attempting to
initialize a condition variable that was created with
PTHREAD_COND_INITIALIZER, a deadlock can occur. Shrink
the ptw32_cond_list_lock critical section to fix it.
2002-07-31 Ross Johnson <rpj at special.ise.canberra.edu.au>
* ptw32_threadStart.c (ptw32_threadStart): Thread cancelLock
destruction moved to ptw32_threadDestroy().
* ptw32_threadDestroy.c (ptw32_threadDestroy): Destroy
the thread's cancelLock. Moved here from ptw32_threadStart.c
to cleanup implicit threads as well.
2002-07-30 Alexander Terekhov <TEREKHOV at de.ibm.com>
* pthread_cond_wait.c (ptw32_cond_wait_cleanup):
Remove code designed to avoid/prevent spurious wakeup
problems. It is believed that the sem_timedwait() call
is consuming a CV signal that it shouldn't and this is
breaking the avoidance logic.
2002-07-30 Ross Johnson <rpj at ise.canberra.edu.au>
* sem_timedwait.c (sem_timedwait): Tighten checks for
unreasonable abstime values - that would result in
unexpected timeout values.
* w32_CancelableWait.c (ptw32_cancelable_wait):
Tighten up return value checking and add comments.
2002-06-08 Ross Johnson <rpj at special.ise.canberra.edu.au>
* sem_getvalue.c (sem_getvalue): Now returns a value for the
NEED_SEM version (i.e. earlier versions of WinCE).
2002-06-04 Rob Fanner <rfanner at stonethree.com>
* sem_getvalue.c (sem_getvalue): The Johnson M. Hart
approach didn't work - we are forced to take an
intrusive approach. We try to decrement the sema
and then immediately release it again to get the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -