diff options
Diffstat (limited to 'ANNOUNCE')
-rw-r--r-- | ANNOUNCE | 238 |
1 files changed, 152 insertions, 86 deletions
@@ -1,4 +1,4 @@ - PTHREADS-WIN32 SNAPSHOT 2001-06-06
+ PTHREADS-WIN32 SNAPSHOT 2001-??-??
----------------------------------
Web Site: http://sources.redhat.com/pthreads-win32/
FTP Site: ftp://sources.redhat.com/pub/pthreads-win32
@@ -28,83 +28,148 @@ Change Summary (since the last snapshot) (See the ChangeLog file for details.)
-New:
-- Async cancellation should now work for Windows running
- on the following processors: IX86, MIPS, ALPHA, PPC.
- - contributors name misplaced (please contact me if it's you)
-
-- New functions (no-ops) for source code compatibility:
- pthread_getconcurrency()
- Returns the value previously set by
- pthread_setconcurrency(), or 0 (zero)
- if no value was previously set.
- The implementation does not currently use
- this value.
- pthread_setconcurrency()
- Accepts any value >= 0 but does not
- have any effect; returns '0', or
- EINVAL if the value is < 0
- pthread_attr_getscope()
- pthread_attr_setscope()
- Currently only return ENOSYS
-
-- The following mutex types and related functions are now
- supported:
-
- pthread_mutexattr_gettype()
- pthread_mutexattr_settype()
- pthread_mutexattr_setkind_np()
- pthread_mutexattr_getkind_np()
- PTHREAD_MUTEX_DEFAULT
- PTHREAD_MUTEX_NORMAL or PTHREAD_MUTEX_FAST_NP
- PTHREAD_MUTEX_ERRORCHECK or PTHREAD_MUTEX_ERRORCHECK_NP
- PTHREAD_MUTEX_RECURSIVE or PTHREAD_MUTEX_RECURSIVE_NP
-
- The *_NP versions are for Linux portability.
-
- In this implementation PTHREAD_MUTEX_DEFAULT is
- mapped to PTHREAD_MUTEX_NORMAL for compatibility
- with major Unix vendors. This is also the default
- if no type is specified.
-
- Please note that the default behaviour in previous
- versions of the library was equivalent to
- PTHREAD_MUTEX_RECURSIVE. This will be a problem
- for some applications unless they are updated to
- explicitly set the type of any mutexes that are, or
- could be, locked recursively.
-
- PTHREAD_MUTEX_NORMAL will cause thread deadlock
- if the owner of a mutex tries to relock it without
- first unlocking it. It has slightly less overhead
- that other types.
- - Thomas Pfaff <tpfaff@gmx.net>
-
-- Pthreads-win32 mutexes are now based on Win32
- critical sections for all Windows versions. The
- implementation no longer depends on
- TryEnterCriticalSection.
- - Thomas Pfaff <tpfaff@gmx.net>
-
-- New implementation of condition variables which attempts to
- correct problems of spurious wakeups, unfairness, and
- broadcast deadlock. See README.CV for details of the
- discussion.
- - Alexander Terekhov <TEREKHOV@de.ibm.com>
- - Louis Thomas <lthomas@arbitrade.com>
-
-Bugs fixed:
-- Pthread_mutex_trylock() now properly returns EBUSY
- even when the current thread owns the mutex.
- Consequently, pthread_mutex_destroy() will no longer
- destroy a locked mutex (it will return EBUSY).
- - Thomas Pfaff <tpfaff@gmx.net>
-
-- Errno warnings and building with /MD;
- calling conventions (stdcall v cdecl);
- thread termination problems;
- - Milan Gardian <Milan.Gardian@LEIBINGER.com>
+-----------------------
+Additions to Scheduling
+-----------------------
+New routines:
+ pthread_attr_setinheritsched()
+ pthread_attr_getinheritsched()
+ pthread_attr_setschedpolicy()
+ pthread_attr_getschedpolicy()
+ sched_setscheduler()
+ sched_getscheduler()
+ sched_rr_get_interval()
+Now defined:
+ _POSIX_THREAD_PRIORITY_SCHEDULING
+
+These routines complete the set required for defining
+_POSIX_THREAD_PRIORITY_SCHEDULING.
+
+
+sched_setscheduler
+sched_getscheduler
+------------------
+These routines will require patching to work with UWIN
+or any other system that provides it's own pid_t.
+Pthread.h conditionally defines pid_t as a DWORD, which
+is the type returned by GetCurrentProcessId().
+
+The only supported policy is SCHED_OTHER, however, in
+order to provide semantic compatibility these routines
+verify the following:
+- that the process identified by pid exists;
+- that permission is granted to set or query the policy;
+The appropriate error is returned if either of these fail.
+On success, both routines return SCHED_OTHER.
+
+
+sched_rr_get_interval
+---------------------
+Always returns -1 and sets errno to ENOTSUP.
+
+
+pthread_attr_setschedpolicy
+pthread_attr_getschedpolicy
+---------------------------
+The only valid supported policy is SCHED_OTHER.
+Attempting to set other policies results in an ENOTSUP
+error.
+
+
+pthread_attr_setinheritsched
+pthread_attr_getinheritsched
+----------------------------
+The two possible values that can be set are
+PTHREAD_INHERIT_SCHED and PTHREAD_EXPLICIT_SCHED.
+
+Neither the POSIX standard nor the Single Unix Spec
+specifies which should be the default value.
+Consequently, implementations use different defaults,
+eg (from a scan of the web):
+
+PTHREAD_INHERIT_SCHED default:
+ HP, MKS Toolkit, QNX, AIX (?)
+
+PTHREAD_EXPLICIT_SCHED default:
+ IBM OS/400, Linux, Sun
+
+All Win32 threads are created with THREAD_PRIORITY_NORMAL.
+They do not inherit the priority of the parent thread or the
+process. This behaviour is equivalent to the following
+Pthreads defaults:
+
+ Inheritance: PTHREAD_EXPLICIT_SCHED
+ Priority: THREAD_PRIORITY_NORMAL
+
+These are also the defaults in pthreads-win32, and now
+reinforced by changes to the library which now actually
+use these values and routines. This choice maintains the
+notion that, from the Pthread point-of-view, Win32
+threads (those not created via pthread_create()) are
+treated as detached POSIX threads with default attribute
+values.
+
+
+------------------
+Changes to Mutexes
+------------------
+Snapshot-2001-06-06 included Thomas Pfaff's enhancements
+to the mutex routines to improve speed. The improvements
+are most apparent on Win9x class systems where pthreads-win32
+previously used Win32 mutexes rather than critical
+sections as the underlying mechanism. The enhancements
+also resulted in speed improvements in other primitives
+which use mutexes internally, such as condition variables
+and read-write locks. Thomas also added mutex
+types to the library as described in the Single Unix
+Specification documentation, and as provided with
+the majority of major Unix and Linux Pthreads
+implementations.
+
+Changes have been made to further improve the speed of the
+default PTHREAD_MUTEX_NORMAL type (and therefore also
+PTHREAD_MUTEX_DEFAULT which is equivalent in pthreads-win32).
+
+Specifically, the library no longer sets or checks the real
+mutex owner when locking, unlocking, trylocking, or
+destroying PTHREAD_MUTEX_NORMAL mutexes. This saves
+significant overhead and results in measured speed increases
+of around 90 percent for non-blocking lock operations, and a
+slight improvement for blocking lock operations. Since the
+type of mutex used internally is PTHREAD_MUTEX_DEFAULT, this
+also results in additional speed improvements to CVs and R/W
+lock operations. Subjective observation shows an
+improvement of approximately 30-35% in R/W locks
+(from tests/rwlock7.c). This is compared to the
+already improved snapshot-2001-06-06.
+
+The price paid for this improvement is that some checking
+for errors is not done for these mutex types. The onus
+is placed on the developer to check application code
+for logical errors, or use a safer mutex type such as
+PTHREAD_MUTEX_ERRORCHECK. For example, it is now
+possible for a non-owner thread to unlock or destroy
+a mutex of these types. However, because the owner
+is not simply left as NULL but set to a special anonymous
+owner value when locked and then reset to NULL when
+unlocked or destroyed, an error will ultimately eventuate
+when the owner thread subsequently attempts to unlock or
+destroy the mutex.
+
+These mutex changes appear to be consistent with both
+the behaviour exhibited by other implementations and their
+documentation, including the Open Group documentation.
+
+
+-------
+Bug fix
+-------
+Pthread_create now sets the priority of the new thread
+from the value set in the thread attribute.
+- from Ralf.Brese@pdb4.siemens.de.
+
+---------------------------
Known bugs in this snapshot
---------------------------
@@ -173,24 +238,22 @@ reliably. Level of standards conformance
------------------------------
-The following POSIX 1003.1c 1995 options are defined:
+The following POSIX 1003.1c 1995 and POSIX 1003.1b options are defined:
_POSIX_THREADS
_POSIX_THREAD_SAFE_FUNCTIONS
_POSIX_THREAD_ATTR_STACKSIZE
+ _POSIX_THREAD_PRIORITY_SCHEDULING
+ _POSIX_SEMAPHORES
The following POSIX 1003.1c 1995 options are not defined:
_POSIX_THREAD_ATTR_STACKADDR
- _POSIX_THREAD_PRIORITY_SCHEDULING
_POSIX_THREAD_PRIO_INHERIT
_POSIX_THREAD_PRIO_PROTECT
_POSIX_THREAD_PROCESS_SHARED
-The following POSIX 1003.1b option is defined:
-
- _POSIX_SEMAPHORES
The following functions are implemented:
@@ -291,6 +354,10 @@ The following functions are implemented: ---------------------------
pthread_attr_getschedparam
pthread_attr_setschedparam
+ pthread_attr_getinheritsched
+ pthread_attr_setinheritsched
+ pthread_attr_getschedpolicy (only supports SCHED_OTHER)
+ pthread_attr_setschedpolicy (only supports SCHED_OTHER)
pthread_getschedparam
pthread_setschedparam
pthread_getconcurrency
@@ -299,6 +366,9 @@ The following functions are implemented: pthread_attr_setscope (returns an error ENOSYS)
sched_get_priority_max (POSIX 1b)
sched_get_priority_min (POSIX 1b)
+ sched_rr_set_interval (POSIX 1b - returns an error ENOSYS)
+ sched_setscheduler (POSIX 1b - only supports SCHED_OTHER)
+ sched_getscheduler (POSIX 1b - only supports SCHED_OTHER)
sched_yield (POSIX 1b)
---------------------------
@@ -344,10 +414,6 @@ The following functions are not implemented: ---------------------------
RealTime Scheduling
---------------------------
- pthread_attr_getinheritsched
- pthread_attr_getschedpolicy
- pthread_attr_setinheritsched
- pthread_attr_setschedpolicy
pthread_mutex_getprioceiling
pthread_mutex_setprioceiling
pthread_mutex_attr_getprioceiling
|