📄 changelog
字号:
value. There is a small probability that this may
block other threads, but only momentarily.
2002-06-03 Ross Johnson <rpj at ise.canberra.edu.au>
* sem_init.c (sem_init): Initialise Win32 semaphores
to _POSIX_SEM_VALUE_MAX (which this implementation
defines in pthread.h) so that sem_getvalue() can use
the trick described in the comments in sem_getvalue().
* pthread.h (_POSIX_SEM_VALUE_MAX): Defined.
(_POSIX_SEM_NSEMS_MAX): Defined - not used but may be
useful for source code portability.
2002-06-03 Rob Fanner <rfanner at stonethree.com>
* sem_getvalue.c (sem_getvalue): Did not work on NT.
Use approach suggested by Johnson M. Hart in his book
"Win32 System Programming".
2002-02-28 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
* errno.c: Compiler directive was incorrectly including code.
* pthread.h: Conditionally added some #defines from config.h
needed when not building the library. e.g. NEED_ERRNO, NEED_SEM.
(PTW32_DLLPORT): Now only defined if _DLL defined.
(_errno): Compiler directive was incorrectly including prototype.
* sched.h: Conditionally added some #defines from config.h
needed when not building the library.
* semaphore.h: Replace an instance of NEED_SEM that should
have been NEED_ERRNO. This change currently has nil effect.
* GNUmakefile: Correct some recent changes.
* Makefile: Add rule to generate pre-processor output.
2002-02-23 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
* pthread_rwlock_timedrdlock.c: New - untested.
* pthread_rwlock_timedwrlock.c: New - untested.
* Testsuite passed (except known MSVC++ problems)
* pthread_cond_destroy.c: Expand the time change
critical section to solve deadlock problem.
* pthread.c: Add all remaining C modules.
* pthread.h: Use dllexport/dllimport attributes on functions
to avoid using pthread.def.
* sched.h: Likewise.
* semaphore.h: Likewise.
* GNUmakefile: Add new targets for single translation
unit build to maximise inlining potential; generate
pthread.def automatically.
* Makefile: Likewise, but no longer uses pthread.def.
2002-02-20 Ross Johnson <rpj at setup1.ise.canberra.edu.au>
* pthread_cond_destroy.c (pthread_cond_destroy):
Enter the time change critical section earlier.
2002-02-17 Ross Johnson <rpj at setup1.ise.canberra.edu.au
* Testsuite passed.
* pthread_timechange_handler_np.c: New; following
a suggestion from Alexander Terekhov that CVs should
be broadcast so that they all re-evaluate their
condition variables and reset a new timeout if
required, whenever an application receives a
WM_TIMECHANGE message. This message indicates that
the system time has been changed. Therefore, CVs
waiting for a timeout set as an abs_time will possibly
not wake up at the expected time. Some applications
may not be tolerant of this.
* pthread_cond_init.c: Add CV to linked list.
* pthread_cond_destroy.c: Remove CV from linked list.
* global.c (ptw32_cond_list_head): New variable.
(ptw32_cond_list_tail): New variable.
(ptw32_cond_list_cs): New critical section.
* ptw32_processInitialize (ptw32_cond_list_cs): Initialize.
* ptw32_processTerminate (ptw32_cond_list_cs): Delete.
* Reduce executable size.
-----------------------
When linking with the static library, only those
routines actually called, either directly or indirectly
should be included.
[Gcc has the -ffunction-segments option to do this but MSVC
doesn't have this feature as far as I can determine. Other
compilers are undetermined as well. - rpj]
* spin.c: Split file into function segments.
* ptw32_spinlock_check_need_init.c: Separated routine from spin.c.
* pthread_spin_init.c: Likewise.
* pthread_spin_destroy.c: Likewise.
* pthread_spin_lock.c: Likewise.
* pthread_spin_unlock.c: Likewise.
* pthread_spin_trylock.c: Likewise.
* sync.c: Split file into function segments.
* pthread_detach.c: Separated routine from sync.c.
* pthread_join.c: Likewise.
* tsd.c: Split file into function segments.
* pthread_key_create.c: Separated routine from tsd.c.
* pthread_key_delete.c: Likewise.
* pthread_setspecific.c: Likewise.
* pthread_getspecific.c: Likewise.
* sched.c: Split file into function segments.
* pthread_attr_setschedpolicy.c: Separated routine from sched.c.
* pthread_attr_getschedpolicy.c: Likewise.
* pthread_attr_setschedparam.c: Likewise.
* pthread_attr_getschedparam.c: Likewise.
* pthread_attr_setinheritsched.c: Likewise.
* pthread_attr_getinheritsched.c: Likewise.
* pthread_setschedparam.c: Likewise.
* pthread_getschedparam.c: Likewise.
* sched_get_priority_max.c: Likewise.
* sched_get_priority_min.c: Likewise.
* sched_setscheduler.c: Likewise.
* sched_getscheduler.c: Likewise.
* sched_yield.c: Likewise.
2002-02-16 Ross Johnson <rpj at setup1.ise.canberra.edu.au
Reduce executable size.
-----------------------
When linking with the static library, only those
routines actually called, either directly or indirectly
should be included.
[Gcc has the -ffunction-segments option to do this but MSVC
doesn't have this feature as far as I can determine. Other
compilers are undetermined as well. - rpj]
* mutex.c: Split file into function segments.
* pthread_mutexattr_destroy.c: Separated routine from mutex.c
* pthread_mutexattr_getpshared.c: Likewise.
* pthread_mutexattr_gettype.c: Likewise.
* pthread_mutexattr_init.c: Likewise.
* pthread_mutexattr_setpshared.c: Likewise.
* pthread_mutexattr_settype.c: Likewise.
* ptw32_mutex_check_need_init.c: Likewise.
* pthread_mutex_destroy.c: Likewise.
* pthread_mutex_init.c: Likewise.
* pthread_mutex_lock.c: Likewise.
* pthread_mutex_timedlock.c: Likewise.
* pthread_mutex_trylock.c: Likewise.
* pthread_mutex_unlock.c: Likewise.
* private.c: Split file into function segments.
* ptw32_InterlockedCompareExchange.c: Separated routine from private.c
* ptw32_callUserDestroyRoutines.c: Likewise.
* ptw32_getprocessors.c: Likewise.
* ptw32_processInitialize.c: Likewise.
* ptw32_processTerminate.c: Likewise.
* ptw32_threadDestroy.c: Likewise.
* ptw32_threadStart.c: Likewise.
* ptw32_throw.c: Likewise.
* ptw32_timespec.c: Likewise.
* ptw32_tkAssocCreate.c: Likewise.
* ptw32_tkAssocDestroy.c: Likewise.
* rwlock.c: Split file into function segments.
* pthread_rwlockattr_destroy.c: Separated routine from rwlock.c
* pthread_rwlockattr_getpshared.c: Likewise.
* pthread_rwlockattr_init.c: Likewise.
* pthread_rwlockattr_setpshared.c: Likewise.
* ptw32_rwlock_check_need_init.c: Likewise.
* pthread_rwlock_destroy.c: Likewise.
* pthread_rwlock_init.c: Likewise.
* pthread_rwlock_rdlock.c: Likewise.
* pthread_rwlock_tryrdlock.c: Likewise.
* pthread_rwlock_trywrlock.c: Likewise.
* pthread_rwlock_unlock.c: Likewise.
* pthread_rwlock_wrlock.c: Likewise.
2002-02-10 Ross Johnson <rpj at setup1.ise.canberra.edu.au
Reduce executable size.
-----------------------
When linking with the static library, only those
routines actually called, either directly or indirectly
should be included.
[Gcc has the -ffunction-segments option to do this but MSVC
doesn't have this feature as far as I can determine. Other
compilers are undetermined as well. - rpj]
* nonportable.c: Split file into function segments.
* np_delay.c: Separated routine from nonportable.c
* np_getw32threadhandle.c: Likewise.
* np_mutexattr_setkind.c: Likewise.
* np_mutexattr_getkind.c: Likewise.
* np_num_processors.c: Likewise.
* np_win32_attach_detach.c: Likewise.
* misc.c: Split file into function segments.
* pthread_equal.c: Separated routine from nonportable.c.
* pthread_getconcurrency.c: Likewise.
* pthread_once.c: Likewise.
* pthread_self.c: Likewise.
* pthread_setconcurrency.c: Likewise.
* ptw32_calloc.c: Likewise.
* ptw32_new.c: Likewise.
* w32_CancelableWait.c: Likewise.
2002-02-09 Ross Johnson <rpj at setup1.ise.canberra.edu.au
Reduce executable size.
-----------------------
When linking with the static library, only those
routines actually called, either directly or indirectly
should be included.
[Gcc has the -ffunction-segments option to do this but MSVC
doesn't have this feature as far as I can determine. Other
compilers are undetermined as well. - rpj]
* condvar.c: Split file into function segments.
* pthread_condattr_destroy.c: Separated routine from condvar.c.
* pthread_condattr_getpshared.c: Likewise.
* pthread_condattr_init.c: Likewise.
* pthread_condattr_setpshared.c: Likewise.
* ptw32_cond_check_need_init.c: Likewise.
* pthread_cond_destroy.c: Likewise.
* pthread_cond_init.c: Likewise.
* pthread_cond_signal.c: Likewise.
* pthread_cond_wait.c: Likewise.
2002-02-07 Alexander Terekhov<TEREKHOV at de.ibm.com>
* nonportable.c (pthread_delay_np): Make a true
cancelation point. Deferred cancels will interrupt the
wait.
2002-02-07 Ross Johnson <rpj at setup1.ise.canberra.edu.au
* misc.c (ptw32_new): Add creation of cancelEvent so that
implicit POSIX threads (Win32 threads with a POSIX face)
are cancelable; mainly so that pthread_delay_np doesn't fail
if called from the main thread.
* create.c (pthread_create): Remove creation of cancelEvent
from here; now in ptw32_new().
Reduce executable size.
-----------------------
When linking with the static library, only those
routines actually called, either directly or indirectly
should be included.
[Gcc has the -ffunction-segments option to do this but MSVC
doesn't have this feature as far as I can determine. Other
compilers are undetermined as well. - rpj]
* barrier.c: All routines are now in separate compilation units;
This file is used to congregate the separate modules for
potential inline optimisation and backward build compatibility.
* cancel.c: Likewise.
* pthread_barrierattr_destroy.c: Separated routine from cancel.c.
* pthread_barrierattr_getpshared.c: Likewise.
* pthread_barrierattr_init.c: Likewise.
* pthread_barrierattr_setpshared.c: Likewise.
* pthread_barrier_destroy.c: Likewise.
* pthread_barrier_init.c: Likewise.
* pthread_barrier_wait.c: Likewise.
* pthread_cancel.c: Likewise.
* pthread_setcancelstate.c: Likewise.
* pthread_setcanceltype.c: Likewise.
* pthread_testcancel.c: Likewise.
2002-02-04 Max Woodbury <mtew at cds.duke.edu>
Reduced name space pollution.
-----------------------------
When the appropriate symbols are defined, the headers
will restrict the definitions of new names. In particular,
it must be possible to NOT include the <windows.h>
header and related definitions with some combination
of symbol definitions. Secondly, it should be possible
that additional definitions should be limited to POSIX
compliant symbols by the definition of appropriate symbols.
* pthread.h: POSIX conditionals.
* sched.h: POSIX conditionals.
* semaphore.h: POSIX conditionals.
* semaphore.c: Included <limits.h>.
(sem_init): Changed magic 0x7FFFFFFFL to INT_MAX.
(sem_getvalue): Trial version.
Reduce executable size.
-----------------------
When linking with the static library, only those
routines actually called, either directly or indirectly
should be included.
[Gcc has the -ffunction-segments option to do this but MSVC
doesn't have this feature as far as I can determine. Other
compilers are undetermined as well. - rpj]
* semaphore.c: All routines are now in separate compilation units;
This file is used to congregate the separate modules for
potential inline optimisation and backward build compatibility.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -