  NGPT - Next Generation POSIX Threading

  ChangeLog
  =========

  This is the list of all(!) changes to this source tree. For a list
  of just the user-visible and/or major changes please have a look at
  the NEWS file.

     _   ____
    / | |___ \
    | |   __) |
    | |_ / __/
  __|_(_)_____|___________________________________________________________

  Changes between 1.1.2 and 1.2.0

   *) semaphore.h:
   *) semaphore.c:
   *) pthreadtypes.h:
   *) pth.h.in:
	Change definition of semaphore to maintain binary compatibility 
	with LinuxThreads.
      [Bill Abt, <babt@us.ibm.com>]
  
   *) pth.h.in:
   *) pthreadtypes.h:
	Correct hiding problems for the pth_qlock_st definition.
      [Bill Abt, <babt@us.ibm.com>]

   *) semaphore.h:
	Remove all definition of _pthread_fastlock.  It should already be
	defined via the pthreadtypes.h include.
      [Bill Abt, <babt@us.ibm.com>]
  
   *) semaphore.c:
	Define _pthread_fastlock to be a qlock if it is not already defined
	and our qlock is defined.
      [Bill Abt, <babt@us.ibm.com>]
  
   *) pthreadtypes.h:
	Remove old definition of _pthread_fastlock and replace it with the NGPT
	qlock structure.  
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_h.in:
	Add #define _PTHREAD_QLOCK_DEFINED after definiton of pth_qlock_st structure.
      [Bill Abt, <babt@us.ibm.com>]

   *) semaphore.h:
   *) semaphore.c:
	Change definition of semaphore to contain rather than point to the
	internal lock.
      [Bill Abt, <babt@us.ibm.com>]
  
   *) pth_native.c:
	Change pth_new_scheduler() diagnostic to prevent inadvertent and 
	misleading messages.
      [Bill Abt, <babt@us.ibm.com>]
  
   *) pthread.c:
	Added Bound thread (setscope/getscope attribute) support.
	check for (current->cleanups) to prevent seg fault in _pthread_cleanup_push_defer
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_event.c:
	Added Bound thread (setscope/getscope attribute) support.
	Remove the use the global WQ for MUTEX/COND events, use per-native
	wait_queues instead. No need to set the MUTEX_WAITING anymore.
      [Saurabh Desai, <sdesai@us.ibm.com>]
	
   *) pth_sync.c:
	Lock the mutex once it comes back from scheduler, if needed.
	Use the static event for PTH_EVENT_FUNC.
      [Saurabh Desai, <sdesai@us.ibm.com>]
	
   *) pth_attr.c:
   *) pth_lib.c:
   *) pth.h.in:
	Added Bound thread (setscope/getscope attribute) support.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_sched.c:
	Break from the signal loop, if sigpendcnt is satisfied.
	Added Bound thread (setscope/getscope attribute) support.
	Remove the use the global WQ for MUTEX/COND events, use per-native
	wait_queues instead. No need to set the MUTEX_WAITING anymore.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_high.c:
	Calculate the global signal mask in the pth_sigmask().
	No need to call pth_allthread_mask().	
      [Saurabh Desai, <sdesai@us.ibm.com>]
	
   *) semaphore.h:
   *) semaphore.c:
	Added implementation for the following semaphore related APIs:
	    sem_destroy, sem_init, sem_getvalue, sem_post, sem_trywait, sem_wait
      [Bill Abt, <babt@us.ibm.com>]

      _    _ 
     / |  / |
     | |  | |
     | |_ | |_
  ___|_(_)|_(_)_________________________________________________________________

  Changes between 1.1.1 and 1.1.2

   *) pth_native.c:
	Change value for NR_TKILL to conform to accepted patch.
      [Bill Abt, <babt@us.ibm.com>, Paul Larson, plars@us.ibm.com>]

   *) pthread.c:
	Rewrote following routines for better binary compatibility with LinuxThreads:
	    _pthread_cleanup_push(), _pthread_cleanup_push_defer(),
	    _pthread_cleanup_pop(), _pthread_cleanup_pop_restore().
	Added the following routines for api compatibility with LinuxThreads:
	    __pthread_clock_gettime(), __pthread_close_settime().
      [David Howell, <david.p.howell@intel.com>]

   *) pth_cleanup.c:
	Correct layout of pth_cleanup_st to achieve binary compatibility with
	LinuxThreads.
      [David Howell, <david.p.howell@intel.com>]

   *) libpthread.Versions:
	Override _pthread_cleanup_pop_restore and _pthread_cleanup_push_defer.
      [David Howell, <david.p.howell@intel.com>]

   *) pth_cancel.c:
   *) pth_lib.c:
   *) pthread.c:
   *) pth.h.in:
	pth_exit() - added wait_flag in argument, to wait for pthread_exit().
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_event.c:
	Added new argument (flag) for the PTH_EVENT_SIGS case.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_fork.c:
	pth_fork() -
	Moved the pth_get_native_descr() after the atfork.prepare execution,
	because the prepare routine may change the current running native thread.

	Initialize global locks for child process.
	Added new routine, pth_fork_drop_threads() to remove threads from global queues.
	There is no need to hold queue locks, because it's a new process. Also, added
	pth_fork_tcb_free() to free thread resources. We can't call the thread specific
	destructor at this point, so added pth_fork_key_destroydata() to free t->data_value.
	The pth_fork_tcb_free() is simplified version of pth_tcb_free().
	The pth_fork_drop_natives(), frees native threads resources as needed.
	The pth_fork_init(), initializes the pth_native_list, allocates first native for
	this process, creates a new scheduler and starts a watchdog thread, if needed.
	
	Finally, add the current thread to pth_NQ list and run this thread under newly
	created scheduler.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_high.c:
	pth_sleep_time() and pth_sigwait_ev() - added new flag value in the pth_event().
	pth_sleep_time() - issue tkill() if "sig" is non-zero.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_lib.c:
	pth_kill() - allow any thread to exit the process (not just pth_main). If current
		native thread is not the first native (primordial), wait to run under it.

	pth_raise() - if target is current thread, yield to deliver a signal. Also, if
		signal is SIGSTOP, bound to first native for proper delivery.

	pth_exit_cb() - count only the pth_active_threads.

	pth_exit() - for the last pthread_exit (for pth_main thread), wait until all threads
		exit. Also, call the thread cleanup for the pth_main.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_mctx.c:
	Rename the usr1_lock to pth_usr1_lock (just for consistency).
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_native.c:
	Added "sched_lock" (per-native lock) and "is_running" flag in the pth_descr_st.
	The "sched_lock" is used to synchronize the exit and scheduler (to avoid seg faults).

	pth_drop_natives() - set the is_running to false for the first native while holding
		a native lock, so no new scheduler can be created. (see pth_new_scheduler)
		For each cloned task, call pth_cleanup_native() while holding the sched_lock,
		to ensure that the scheduler is not running while freeing its resources.

	pth_cleanup_native() - for the first native, wait until all natives are gone.

	pth_exit_scheduler() - exit the cloned task cleanly, if pth_new_scheduler() fails.

	pth_new_scheduler() - 
		lock the per-native lock (sched_lock) instead global scheduler lock.
		Avoid any race condition with exit process. Free all resources and exit cleanly.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_p.h.in:
   *) pth_sync.c:
 	Added new macro, pth_lock_init() to initialize the pth_qlock_t.	 
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_pqueue.c: 
	use the pth_lock_init() and don't check for lock owner, if the fork_initialized 
	is TRUE in the pth_pqueue_delmax().
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_sched.c:
	use the pth_lock_init() and remove the pth_scheduler_kill().
	
	pth_scheduler() - For the signal delivery, if the signal is part of sigactionmask,
		call tkill() to send signal to current thread (i.e. when sigaction() is
		registred), else call kill() to send signal to process.
		(IMPORTANT NOTE: according to Posix, "pthread_kill() only causes the signal 
		to be handled in the context of the given thread; the signal action 
		(termination or stopping) affects the process as a whole.")

		The pth_scheduler() is now always run with the per-native "sched_lock". 
		This lock is released when it is switched to run actual thread and when
		it's sleeping in select().

	pth_sched_eventmanager() - If the event type is PTH_EVENT_SIGS and a signal is 
		pending on thread-specific "sigpending" mask, handle it differently for the
		sigwait() and sleep(). (i.e. sleep() can't be interrupted by blocked signal)

		Fix the pth_join race condition for 2 simultanous join.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_syscall.c: 
	Added a wrapper for _exit().
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_tcb.c: 
	pth_tcb_free() - added a check, do not allow to unmap the stack for current 
	running thread.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) test_pthread.c:
	added _exit(0) (commented!) in the child() to test the process exit behavior.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) test_pthread_segv.c:
	added pthread_kill() (commented!) to send a signal to a thread.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) libpthread.Versions:
   *) pth_syscall.c:
   *) pth_fork.c:
   *) pth_lib.c:
	Back out fork() and _exit() changes.
      [Bill Abt, <babt@us.ibm.com>]
   
   *) ngpt.spec:
	Removed dependency on kernel revision.  Not everyone installs
	the rpm version of the kernel.
      [Bill Abt, <babt@us.ibm.com>]

   *) libpthread.Versions:
   *) pth_syscall.c:
	Added wrapper to override _exit() behavior.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_fork.c:
	Correct declaration of new pth_fork_init() function.
      [Bill Abt, <babt@us.ibm.com>]

	Correct behavior for fork() system call emulation.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_lib.c:
	Correct behavior for fork() system call emulation.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) Makefile.in:
   *) test_cleanup.c:
   *) test_str01.c:
   *) test_str02.c:
   *) test_str03.c:
	Remove dos formatting characters.
      [Arkadi E. Shishlov, <arkadi@it.lv>, Bill Abt, <babt@us.ibm.com>]

   *) pth_attr.c:
   *) pth_cancel.c:
   *) pth_cancel.c:
   *) pth_data.c:
   *) pth_event.c:
   *) pth_ext.c:
   *) pth_fork.c:
   *) pth_msg.c:
   *) pth_native.c:
   *) pth_ring.c:
	Remove setting of errno.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_errno.c:
	Remove return_errno_noerr macro and replace it with return_error() macro.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_high.c:
	Remove use of errno_shield around free of buffers.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_lib.c:
   *) pth_sync:
	Remove use of errno_shield in most instances.
	Remove setting of errno.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_mctx.c:
	Add lock release on error.
	Remove setting of errno.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_tcb.c:
	Added use of errno_shield around mmap operations.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pthread.c:
	Remove setting of errno.
	Change pthread functions to return error number rather than a pre-set errno.
	Correct problem with once_control being set during init and not reset properly.
	Add push and pop to pthread_once() routine.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) sysconf.c:
	Added 1 to return value of POSIX_TTY_NAME_MAX to accomodate NULL terminator.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) test_str02.c:
	Added feedback to '-l' option to print out every 1000 threads.
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_sync.c:
	Call to pth_event(PTH_EVENT_FUNC, ...) doesn't pass the required number of
	parameters.
      [Bill Abt, <babt@us.ibm.com>, Ethan Solomita, <ethan@cs.columbia.edu>]

   *) pth_sched.c:
	Handle cond_timewait events in the scheduler event manager.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) aclocal.m4:
	Change the order of configure's parameter evaluation.
      [Yusuf Goolamabbas, <yusufg@outblaze.com>, Bill Abt, <babt@us.ibm.com>]

   *) pth_native.c:
	Fix PowerPC support.
      [Bill Abt, <babt@us.ibm.com>, Anton Blanchard, <anton@samba.org>]
	
	Added descriptor based errno value.
	Fixed k_gettid() not to use errno. (x86 only)
	Fixed gettid() not use errno.
      [Bill Abt, <babt@us.ibm.com>, Arend-jan Wytzes, <aj@godfather.wise-guys.nl>]

	Use scheduler lock when creating new native threads.
	Added time delay to avoid race condition between close and read of the sigpipe.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pthread.c:
	Fixed __errno_location() to retrieve the errno from the native descriptor
	if available.
      [Arend-jan Wytzes, <aj@godfather.wise-guys.nl>, Bill Abt, <babt@us.ibm.com>]

	Corrected cancellation problems.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_tcb.c:
	Reduce potential calls to gettid() in the pth_tcb_free() function.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_sched.c:
	Added new scheduler lock for use when a new native is created.
	Reorganize the pth_scheduler_drop() function to be more efficient.
	Fix handling of event flags so timers are not lost but only do so if
	a timer is present.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_lib.c:
	Fix the kill/restart process in pth_kill.
	Correct problem in pth_get_native_descr() that could allow a null descr
	to be returned.
	Have pth_exit_cb() use only the running threads as criteria for return value.
	Modify pth_exit() to correct problem with hangs at program end.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_tcb.c:
	Add the new sigactionmask member for tracking the action mask for each
	thread separately.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_syscall.c:
	Update the new sigactionmask member of the tcb when sigaction() is called
	prior to invoking the glibc version.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_lib.c:
	Maintain properly the new sigactionmask member of the tcb.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_high.c:
	pth_sleep() should consider all the catchable signals NOT the unblocked signals
	so that should an async signal be sent during a sleep it is processed properly.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_native.c:
	Fix the usage of the "is_used" flag in the native descriptor.  Since prior to
	this fix, we were setting "is_used" during allocation it was possible for the
	descriptor to be interrogated while still forming resulting in both tid and pid
	discrepancies.  Now the "is_used" flag is only in the new clone after the proper
	values have been filled in in the descriptor.
	Isolated pth_clone_flags to single constant value.
      [Bill Abt, <babt@us.ibm.com>]

	Fix thread count handling to take advantage of new all threads list.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_sched.c:
	Initialize the "is_used" flag in the first native descriptor when the first
	scheduler is started.
      [Bill Abt, <babt@us.ibm.com>]

	Fix thread count handling to take advantage of new all threads list.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_lib.c:
	Fix thread count handling to take advantage of new all threads list.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_data.c:
	pth_get_current() was be called multiple times needlessly.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_cancel.c:
	Put back the thread exists check in the pth_cancel() routine.  This can
	be done now because pth_thread_exists() is now reliable.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_tcb.c:
   *) pth.h.in:
   *) pth_p.h.in:
	Added support for keeping a separate, complete list of all active threads
	in the system along with a count.
      [Saurabh Desai, <sdesai@us.ibm.com>, Bill Abt, <babt@us.ibm.com>]

   *) pth_sched.c:
	In pth_sched_eventmanager(), a scheduled timer event can get lost when
	an other event happened before the timer elapses. This fix accounts for
	this and ensures that the timer event is reset and not lost.
      [Arend-jan Wytzes, <aj@godfather.wise-guys.nl>, Bill Abt, <babt@us.ibm.com>]

   *) ngpt.spec:
	Removed dependency on RH specific kernel-headers package.
      [Timothy Reaves, <treaves@silverfields.com>]

   *) pth_debug.c:
	Move write in pth_debug() to proper place.
      [Arend-jan Wytzes, <aj@godfather.wise-guys.nl>, Bill Abt, <babt@us.ibm.com>]


  Changes between 1.1.0 and 1.1.1

   *) pth_event.c:
	Fix overshadow of tid introduced by the locking code path
	reduction in the previous fix.
      [Bill Abt, <babt@us.ibm.com>]

   *) README:
   *) RELEASE:
   *) pth_vers.c:
   *) ChangeLog:
	Update for version change and the latest CVS updates.
      [Bill Abt, <babt@us.ibm.com>]
	
   *) pth_event.c:
	Optimize and reduce the locking code path in pth_event() which
	was identified via gprof as a "hot" spot.
      [David Howell, <david.p.howell@intel.com>, Bill Abt, <babt@us.ibm.com>]

   *) pth_sched.c:
	More fixes for cancellation handling within the eventmanger.
      [Saurabh Desai, <sdesai@us.ibm.com>]
      
   *) pth_sync.c:
	Abort if the scheduler has locked the mutex.
      [Saurabh Desai, <sdesai@us.ibm.com>]
      
   *) pth_sched.c:
	Add global wait queue for threads waiting on mutexes.
	Add count of mutex waiters to the overall wait queue count.
	Remove locks from WQ.
	Set the native current just before switching context to the
	userlevel thread becoming current.
	Make the scheduler the current immediately after return from
	the context switch.
	Handle the mutex wait queue when event checking.
	Populate the mutex wait queue as needed.
	Correct next timer event handling.
      [Saurabh Desai, <sdesai@us.ibm.com>]
      
   *) pth_mctx.c:
	Pass descr to pth_mctx_set_bootstrap() for performance improvements.
      [Saurabh Desai, <sdesai@us.ibm.com>]
      
   *) pth_lib.c:
	Account for descriptor change during cleanup.
	Remove locks from pth_get_native_descr().
	Check the wait queue when determining ESRCH failure during
	a check for thread existence in pth_thread_exists().
	Improved descriptor handling in pth_join().
	Handle PTH_STATE_MUTEX_WAITING.
      [Saurabh Desai, <sdesai@us.ibm.com>]
      
   *) pth_event.c:
	Account for PTH_STATE_MUTEX_WAITING if a mutex versus PTH_STATE_WAITNG for
	everything else in a wait state.
      [Saurabh Desai, <sdesai@us.ibm.com>]
      
   *) pth_cancel.c:
	Handle PTH_STATE_MUTEX_WAITING.
      [Saurabh Desai, <sdesai@us.ibm.com>]
      
   *) pth.h.in:
	Added PTH_STATE_MUTEX_WAITING.
      [Saurabh Desai, <sdesai@us.ibm.com>]
      
   *) pthread.h.in:
	Fix binary definitions of some constants to be compatible with LinuxThreads.
      [Bill Abt, <babt@us.ibm.com>, David Howell, <david.p.howell@init.com>]

   *) test_str03.c:
	Expand max threads to 50000 due to increased NGPT capacity.
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_syscall.c:
	Strong alias for vfork and __vfork.
      [David Howell, <david.p.howell@intel.com>, Bill Abt, <babt@us.ibm.com>]

   *) pth_high.c:
	Correct sleep behavior to conform to POSIX.
      [David Howell, <david.p.howell@intel.com>]

   *) pth_sync.c:
	Remove the yield under all circumstances from pth_mutex_release.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_sched.c:
	Set the current thread to the scheduler right after return
	from the context switch.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_native.c:
	Moved unmap of native stack after tkill of native thread.
      [Bill Abt, <babt@us.ibm.com>]

	Don't disable the watchdog when active threads goes to 1.
      [Saurabh Desai, <sdesai@us.ibm.com>]
   
   *) pth_lib.c:
	Added number of natives to criteria for ESRCH failure.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pthread.c:
	Added lock to protect global atfork resource.
	More changes to shorten code path for socketcalls.
      [David Howell, <david.p.howell@intel.com>]

   *) pth_debug.c:
	Put write back that deleted inadvertently.
      [David Howell, <david.p.howell@intel.com>]

   *) pthread.c:
	Added __raise as wrappered routine.
	Versioned raise to GLIBC 2.0.
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_syscall.c:
	Added strong alias for nanosleep.
      [Bill Abt, <babt@us.ibm.com>]

   *) test_cleanup.c:
	Source for newly added test case.
      [Bill Abt, <babt@us.ibm.com>]

   *) Makefile.in:
   *) configure.in:
	Added new test case, test_cleanup
      [Bill Abt, <babt@us.ibm.com>]

   *) aclocal.m4:
	Added ASSERTS_ON to debug options.
      [Bill Abt, <babt@us.ibm.com>]

   *) libpthread.versions:
	Expose _pthread_cleanup_push/pop.
      [David Howell, <david.p.howell@intel.com>]

   *) pth_p.h.in:
	Added ASSERTS_ON definition so that asserts are no longer
	executed in a "performance" build.
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_sync.c:
	Removed all debug statements from module to prevent recursive
	calling of mutex code.
      [Bill Abt, <babt@us.ibm.com>]

   *) pthread.c:
	Added pth_yield() to pthread_setcancelstate() and pthread_testcancel()
	to account for the removed pth_yield() in the pth_cancelpoint() routine.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_p.h.in:
   *) pth_high.c:
	Corrected problem in "verbose" mode when getting the name of the
	current thread.  In early stages of execution, there is no thread, 
	therefore no thread name!!!
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_high.c:
	Fixes to correct problems with FDMODE and socket io.
      [Saurabh Desai, <sdesai@us.ibm.com>]
      
   *) pth_lib.c:
	Changed pth_get_native_descr() to check for watchdog descr when searching.
	Reduced number of calls to pth_get_current() in pth_spawn_trampoline.
      [Bill Abt, <babt@us.ibm.com>]

	Move cleanup of main thread to earlier spot to correct timing problem.
	Retrieve descriptor once again prior to context switch in pth_exit.  It
	may have changed.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_native.c:
	Made pth_watchdog_descr visible outside so that pth_get_native_descr()
	can check it.
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_cancel.c:
   *) pth_event.c:
   *) pth_lib.c:
   *) pth_sync.c:
   *) pthread.c:
	Fix for cancellation problems.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pthread.c:
	Shorten code path for socketcalls.
	Expose _pthread_cleanup_push/pop.
      [David Howell, <david.p.howell@intel.com>]
      
   *) pth_syscall.c:
	Shorten code path for IO calls.
	Expand socketcall argument array to 6.  Fixes crash potential.
      [David Howell, <david.p.howell@intel.com>]
      

      _    _ 
     / |  / |
     | |  | |
     | |_ | |_
  ___|_(_)|_(_)_________________________________________________________________

  Changes between 1.0.3 and 1.1.0

   *) INSTALL:
        Remove enable kernel patch option, replace with kernel patch missing warning.
      [Bill Abt, <babt@us.ibm.com>]

   *) Makefile.in:
        Removed old pth test cases. These files are no longer supported.  
	Removed libngpt* build.  Legacy from Pth.
        GNU Pth Legacy support is no longer provided.
	Added install-backup and uninstall-restore capabilities.
        Added new files.
      [Bill Abt, <babt@us.ibm.com>]

   *) acconfig.h:
	Remove enable kernel patch option, replace with kernel patch missing warning.
      [Bill Abt, <babt@us.ibm.com>]

   *) aclocal.m4:
	Remove enable kernel patch option, replace with kernel patch missing warning.
	Added additional link options to create a init and fini entry points.
	Added link option that will give us map.
      [Bill Abt, <babt@us.ibm.com>]

   *) config.param:
	Remove enable kernel patch option.
      [Bill Abt, <babt@us.ibm.com>]

   *) configure:
   *) configure.in:
	Add generational support for new headers.
	Remove old kernel patch option. 
      [Bill Abt, <babt@us.ibm.com>]

   *) libpthread.Versions:    
	Added new functions for better glibc integration and
	LinuxThreads compatibility.
      [Bill Abt, <babt@us.ibm.com>]

   *) local_lim.h.in:
	New header to reflect NGPT limits which are higher than LinuxThreads.
      [Bill Abt, <babt@us.ibm.com>]

   *) ltmain.sh:
	Added additional link options to create a init and fini entry points.
	Added link option that will give us map.
      [Bill Abt, <babt@us.ibm.com>]

   *) ngpt.spec:
	Version change.
	Additional header files.
      [Bill Abt, <babt@us.ibm.com>]

   *) posix_opt.h.in:
	New header to reflect NGPT POSIX enablement which are more than LinuxThreads.
      [Bill Abt, <babt@us.ibm.com>]

   *) pth.h.in:
	Added support for mutexattr structure and APIs.
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_acdef.h.in:
	Remove enable kernel patch option, replace with kernel patch missing warning.
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_cancel.c:
	Internal lock handling changes.
      [Bill Abt, <babt@us.ibm.com>]

	Cancellation handling changes for POSIX compliance.
      [Saurabh Desai, <sdesai@us.ibm.com>]
    
   *) pth_debug.c:
	Internal lock handling changes.
      [Bill Abt, <babt@us.ibm.com>]

	Enable debug output to a file.
      [David Howell, <david.p.howell@intel.com>]

   *) pth_fork.c:
	Fork handling changes for POSIX compliance.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_high.c:
	Internal lock handling changes.
      [Bill Abt, <babt@us.ibm.com>]

	POSIX changes.
      [Saurabh Desai, <sdesai@us.ibm.com>]

	Improved error handling.
      [David Howell, <david.p.howell@intel.com>]

   *) pth_lib.c:
	Internal lock handling changes.
	Removed implicit initialization.  Now handled by library entry point.
      [Bill Abt, <babt@us.ibm.com>]

	POSIX changes for fork handling.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_mctx.c:
	Internal lock handling changes.
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_native.c:
	Internal lock handling changes.
	Improved watchdog handling.
	Improved cleanup handling (for fork).
	PowerPC support.
      [Bill Abt, <babt@us.ibm.com>, Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_p.h.in:
	Internal lock handling changes.
	Removed conditional for kernel patch.
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_pqueue.c:
	Internal lock handling changes.
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_sched.c:
	Internal lock handling changes.
      [Bill Abt, <babt@us.ibm.com>]

	Fork handling changes for POSIX compliance.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_sync.c:
	Internal lock handling changes.
      [Bill Abt, <babt@us.ibm.com>]

	Mutex handling changes for POSIX compliance.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_syscall.c:
	Glibc/LinuxThreads compatibility: 
	  Many more wrappers added.
	  More strong_aliases.
	Socketcall fixes.  SOCKOP condiitionally defined for Linux.
      [Bill Abt, <babt@us.ibm.com>, David Howell, <david.p.howell@intel.com>]

   *) pth_tcb.c:
	libc_tsd support.
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_vers.c:
	Version change.
      [Bill Abt, <babt@us.ibm.com>]

   *) pthread.c:
	Internal lock handling changes.
	Implicit startup and shutdown removed.
	Added new strong_aliases for startup and shutdown entry points.
	Added flockfile/funlockfile/ftrylockfile support.
	Mutex attribute support enhanced.
      [Bill Abt, <babt@us.ibm.com>]

	Mutex attribute support enhanced.
	Mutex handling fixes for POSIX.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pthread.h.in:
	Added flockfile/funlockfile/ftrylockfile support.
	Mutex attribute support enhanced.
      [Bill Abt, <babt@us.ibm.com>]
    
	Mutex attribute support enhanced.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pthreadtypes.h:
	Mutex attribute support enhanced.
      [Bill Abt, <babt@us.ibm.com>]

   *) semaphore.c:
   *) semaphore.h:
	Initial semaphore support.  INCOMPLETE.
      [Bill Abt, <babt@us.ibm.com>]
    
   *) sigrt.c:
	Initial realtime signal support.
      [Bill Abt, <babt@us.ibm.com>, David Howell, <david.p.howell@intel.com>]

   *) sysconf.c:
	Sysconf support.
      [Bill Abt, <babt@us.ibm.com>]

   *) getlogin.c:
	Getlogin and getlogin_r support.
      [Bill Abt, <babt@us.ibm.com>]

   *) test_pthread.c:
	General cleanup.
	Added testing of getlogin.
      [Bill Abt, <babt@us.ibm.com>]

   *) test_str01.c:
   *) test_str02.c:
   *) test_str03.c:
	Correct compiler warnings.
      [Paul Larson, <plars@us.ibm.com>]

     _   ___
    / | / _ \
    | || | | |
    | || |_| |
  __|_(_)___/_____________________________________________________________

  Changes between 1.0.2 and 1.0.3

   *) HISTORY:
   *) MILESTONES:
   *) README:
   *) RELEASE:
   *) THANKS:
   *) TODO:
   *) pth_vers.c:
	    Update per release info.
      [Bill Abt, <babt@us.ibm.com>]

   *) pthread.c:
	    Added new functions required by for POSIX.
	    Added new strong aliases and versioned symbols for increased 
	    binary compatibility with LinuxThreads
      [Bill Abt, <babt@us.ibm.com>]

   *) pthread.h.in:
   *) pthreadtypes.h:
   *) sigthread.h
	    Added new functions required by for POSIX.
	    Changed location of certain declarations to be as defined
	    by POSIX.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_sync.c:
	    Corrected problems with locks that caused a deadlock.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_syscall.c:
	    Function name changes for increased binary compatibility with LinuxThreads
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_sched.c:
	    Corrected problems with periodic hangs at thread exit time.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_pqueue.c:
	    Moved assert to proper place.  Can't lock what doesn't exist ;-)
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_p.h.in:
	    Accomodate changed location of certain declarations for POSIX
	    compliance.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_native.c:
	    hange definition of default syscall numbers for gettid, tkill.
	    Added definition of CLONE_SIGPEND for use in future releases.
      [Bill Abt, <babt@us.ibm.com>]

   *) pth_lib.c:
	    Accomodate thread exit time fixes.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth_debug:
	    Dump entries on all WAIT QUEUES for ALL native threads.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) pth.h.in:
	    Accomodate thread exit time fixes.
      [Saurabh Desai, <sdesai@us.ibm.com>]

   *) ngpt.spec:
	    Changed dependency and pre-reqs.  Binary RPMs now require 
	    kernel 2.4.9 or higher.
	    Fixed some errors uncovered by rpmlint.
      [Bill Abt, <babt@us.ibm.com>]

  Changes between 1.0.1 and 1.0.2

   *) Makefile.in:
   *) ngpt.spec:
	    Fixed install to properly install pthread library into /lib.
      [Bill Abt]

   *) config.param:
	    Added gprof option.
	    Added --enable-optimize to install option.
      [Bill Abt]

   *) README:
   *) pth_vers.c:
	    Update of Version.
      [Bill Abt]

   *) TODO:
	    Update of priorities
      [Bill Abt]

   *) pth_cancel.c:
   *) pth_lib.c:
   *) pth_native.c:
   *) pth_pqueue.c:
   *) pth_sched.c:
   *) pth_sync.c:
	    Changes to accomodate multiple wait queues.
      [Bill Abt, Saurabh Desai]

   *) pth_lib.c:
   *) pth_native.c:
	    Changes to allow use of library when kernel patch is not applied.
      [Bill Abt]

   *) pth_native.c:
	    Added watchdog thread.
	    Added pth_try_lock().
      [Bill Abt]
      
   *) pth_sched.c:
   *) pth_sync.c:
	    Some fixes for lock handling.
      [Bill Abt, Saurabh Desai]
      
   *) pthread.c:
   *) pthread.h.in:
	    Changed pth_attr_setXXXX functions signatures to conform to POSIX.
	    Made pthread_detach() a function rather than macro and added strong alias for it.
      [Bill Abt]
      
   *) pthread.h.in:
	    Set more flags to conform to POSIX.
      [Bill Abt]
      

  Changes between 1.0.0 and 1.0.1

   *) HACKING:
	    Added libpthread.Versions link edit script for glibc compatibility.
      [Bill Abt]

   *) INSTALL:
	    Update install instructions.
	    Update defaults for configure.
      [Bill Abt]
      
   *) Makefile.in:
	    Added libpthread.Versions link edit script for glibc compatibility.
	    Fix install problem for pth_p.h.
      [Bill Abt]

   *) MILESTONES:
   *) README:
   *) RELEASE:
   *) TODO:
   *) configure.in:
   *) ngpt.spec:
   *) pth_vers.c:
	    Update for 1.0.1
      [Bill Abt]

   *) ltconfig:
	    Added LDFLAGS as parameter to archive command so as to 
	    accomodate the link edit version script.
      [Bill Abt]

   *) ltmain.sh:
	    Check for the presence of the .Versions file and pass along to the
	    linker if found.
      [Bill Abt]

   *) pth_lib.c:
	    Start the watchdog thread if the we are running with more than
	    1 native thread.
      [Bill Abt]

   *) pth_native.c:
	    Added support for watchdog thread when in M:N mode.  This area
	    still needs some more work.
      [Bill Abt]

   *) pth_p.h.in:
	    glibc compatibility: Added macro to support creating versioned
	    symbols as required by glibc.
      [Bill Abt]

   *) pth_sched.c:
	    Added scheduler lock to correct load problems on SMP.
	    Corrected load balancing by ensuring now value in the scheduler
	    is set properly.  
      [Arun Sharma, Bill Abt]

   *) pth_syscall.c:
	    glibc compatibility: Added more ghosted glibc functions that are
	    expected by glibc to be ghosted.
      [Bill Abt]

   *) pthread.c:
	    glibc compatibility: Changed some entry point name and added use
	    of versioned symbols for some functions.  Added additional strong
	    aliases for new ghosted functions.
      [Bill Abt]

   *) pthread.h.in:
	    glibc compatibility: Changed some external values to match those in
	    use by LinuxThreads to improve binary compatibility.
      [Bill Abt]

   *) test_pthread.c:
   *) test_pthread_segv.c:
   *) test_std.c:
	    Removed use of gettid() function in test programs.
      [Bill Abt]

  Changes between 0.9.6 and 1.0.0

   *) General:
	    Change the way pth_native_list is addressed.
	    Added additional debug statements.
      [Bill Abt]

   *) pth_p.h.in:
	    Added new qlocks to the mutex and cond structures.
	    Added include of sys/mman.h for mmap/munmap.
      [Bill Abt]

   *) pth_attr.c:
   *) pth_clean.c:
   *) pth_data.c:
   *) pth_event.c:
   *) pth_ext.c:
   *) pth_high.c:
   *) pth_msg.c:
	    Changed from using malloc/free to pth_malloc/pth_free.
      [Bill Abt]

   *) pth_data.c:
	    Added new lock for debug operations.
      [Bill Abt]

   *) pth.h.in:
	    Fix description of qlock.
      [Bill Abt]

   *) INSTALL:
	    Update quick install directions.
      [Bill Abt]

   *) pth_lib.c:
	    Added pth_malloc using mmap().
	    Added pth_free using munmap().
	    Added code to initialize native descriptor list.
	    Fixed alogorithm for counting running threads to include threads
	    running on other native threads.
	    Removed the restriction that new native threads can only be
	    created on the first native thread.
	    Fixed pth_getcontext() to accomodate other context switching
	    methods.
	    Moved most of the work of pth_thread_cleanup to pth_tcb_free() to
	    fix chicken and egg problem on SMP ;-)
	    Added soft wrapper for exit().
      [Bill Abt]

   *) pth_mctx.c:
	    Changed from using malloc/free to pth_malloc/pth_free.
	    Added new lock for SIGUSR1 operations.
      [Bill Abt]

   *) pth_pqueue.c:
	    Moved definition of qlock to pth_p.h.in as usage has expanded.
      [Bill Abt]

   *) pth_sync.c:
	    Added new locks to mutex and conditions and code to acquire and
	    release them as appropriate.
      [Bill Abt]

   *) pth_syscall.c:
	    Added hard wrapper for syscall exit().
      [Bill Abt]

   *) pth_tcb.c:
	    Changed from using malloc/free to pth_malloc/pth_free.
	    Added thread lock.
	    Added code to remove pending timers from other native
	    threads that are waiting upon a newly expired thread.
	    Added code to destroy key data during the free of a thread.
      [Bill Abt]

   *) pth_native.c:
	    Changed from using malloc/free to mmap/munmap.
	    Added is_used, nexttimer_thread and stack_top members.
	    Changed the way pth_native_list is addressed.
	    Fixed parameter for clone() to use stack_top rather than bottom.
      [Bill Abt]

   *) pth_native.c:
	    Change the order in which native threads are cleaned up.
      [Saurabh Desai]

   *) pth_sched.c:
	    Changed from using malloc/free to mmap/munmap.
	    Made pth_native_list static.
	    Changed the way pth_native_list is addressed.
	    More debug info is outputted.
	    Moved nexttimer_thread to be native specific so cleanup can
	    be handled properly.
      [Bill Abt]

   *) pth_sched.c:
	    Made sure nexttimer_ev are only handled once.
      [Saurabh Desai]

   *) pth_sched.c:
	    Added code to ensure that other native threads who are waiting
	    in the scheduler are awakened when the load dictates.
      [Dave McCracken]

   *) pthread.c:
	    Added pthread_initialize() so glibc can call it during initialization.
	    Added a lock for use during initialization.
	    Added an array of static mutexes for used during initialization.
	    Changed mutex ops to work w/o memory allocation (at least for a
	    little while) during initialization.
	    Changed from using malloc/free to pth_malloc/pth_free.
      [Bill Abt]


      ___   ___
     / _ \ / _ \
    | | | | (_) |
    | |_| |\__, |
  ___\___(_) /_/__________________________________________________________

  Changes between 0.9.5 and 0.9.6

   *) In test cases, general code cleanup.
      Remove restart, no longer valid to shutdown and restart.
      Fix compiler warning in test cases.
      [Bill Abt, Saurabh Desai]

   *) pthread.c:  
	    Added new mlock to allow for early mutex usage by threadsafe
	    glibc malloc.
	    Added strong aliases for pthread_mutex_xxxx routines so that glibc
	    can detect and use the threadsafe versions of library functions.
      [Bill Abt]

   *) pth_sync:   
	    Added additional debug statements.
      [Bill Abt]

   *) pth_pqueue.c:	
	    Changed definition of a lock to track owner and to allow nested lock
	    operations.
      [Bill Abt]

   *) pthread.c:  
	    Added pth_lock_all() and pth_release_all() macros for locking all the
	    queues in a single operation.
	    Added defintion of strong_alias macro to allow strong aliasing of
	    certain pthread_xxxx functions to allow glibc to detect and therefore
	    use threadsafe versions of functions.
      [Bill Abt]

   *) pth_native.c:
	    Added use of new tkill() function instead of stock kill().
	    Changed the way pth_alloc_native works so that slot is no longer
	    needed to be passed as a parameter.
	    Cleanup error checking in general and the actual native cleanup
	    methods.
	    Pass the actual native descriptor to clone (and subsequently to the
	    pth_new_scheduler()) instead of slot.
	    Added locks when modifying the contents of the native descriptor.
	    Made gettid(), tkill() and pth_testandset() inline functions.
	    Improved pth_XXXXXX_lock functions to allow owner tracking
	    and nested locking by the owner.
	    Removed unused function, pth_compare_and_swap.
      [Bill Abt]

   *) pth_mctx.c: 
	    Changed to use tkill() instead of kill() when signalling.
      [Bill Abt]

   *) pth_cancel.c:
	    Added new locks around access to various queues.
      [Bill Abt]

   *) pth_data.c: 
	    Added locks to protect multiple access to key data.
      [Bill Abt]

   *) pth_event.c:
	    Added locks to protect multiple access to key data.
      [Bill Abt

   *) pth_high:   
	    Changed pth_sigmask to always set remembered signal mask.
	    Changed pth_sigmask to calculate new signal mask whenever the
	    mask is changed.
	    Changed pth_sigmask and pth_sigwait_ev to wake up the first native
	    thread whenever a change is made or pth_wait is about to be called.
      [Saurabh Desai]

   *) pth_lib.c:  
	    Added locks to protect multiple access to queue data.
	    Added new flags to indicate initialization and shutdown in progress
	    and code to set/unset appropriately.
	    Deferred the determination of library maximums until after the scheduler
	    has been initialized
	    In pth_kill() and pth_exit(), bind the user thread to the first native
	    and wake up the first native so the operation completes on the
	    first native thread.
      [Bill Abt, Saurabh Desai]

   *) pth_sched.c:
	    Added various locks to prevent multiple access to data.
      [Bill Abt, Saurabh Desai]

   *) pth_sched.c:
	    Added pth_allthread_mask() function used to re-calculate the signal
	    mask when it is changed.
	    Changed from using kill() to send a signal to using tkill().
      [Saurabh Desai]

   *) pth_sched.c:
	    Remove unused arrays.
	    Added static definition of first native descriptor so that malloc need
	    not be called prior to library initialization.
	    Added code to use static definition of first native descriptor.
	    In pth_scheduler(), if there are no items ready to run, go to the
	    event manager and wait.
	    Added additional debug statements.
      [Bill Abt]

  Changes between 0.9.4 and 0.9.5

   *) Added new headers, bits/sigthread.h and bits/pthreadtypes.h
      [Bill Abt]

   *) Added new test cases for pthreads: test_pthread_sig, test_pthread_segv, 
      test_pthread_cancel.
      [Saurabh Desai, Bill Abt]

   *) .aliases - Changed bt macro to do a make & make test so that a build will not
      continue if errors are encountered.
      [Bill Abt]

   *) pth_cancel.c - Changed pth_cancel_state() so that if the current cancel state is
      PTH_CANCEL_ASYNCHRONOUS, a yield will done to allow the
      scheduler a chance to run.  This corrects a problem found when
      using the pthread cancellation API.
      [Bill Abt, Saurabh Desai]
      
   *) pth_cancel.c = Changed pth_cancel_point(), called by pthread_testcancel(), to
      yield to the scheduler if the current thread is not in a cancel state
      and a cancel request is not pending.  This corrects a problem
      found when testing the pthread cancellation API on a UP machine.
      [Bill Abt, Saurabh Desai]

   *) pth_native.c - In pth_new_native(), corrected a problem whereby the slot number
      being passed via clone() to the new scheduler was passed as a
      stack based variable.  This variable is now allocated from the heap.
      [Arun Sharma, <arun@sharmas.dhs.org>]

   *) pth_native.c - In pth_new_native(), corrected a problem whereby the number of
      native threads was not decremented in the event of a failure to
      allocate or clone.
      [Saurabh Desai, Bill Abt]

   *) pth_native.c - Added support for IA64.
      [Nick Pollitt]
 
  Changes between 0.9.3 and 0.9.4
 
   *) Corrected problems with signal handling.  The signal mask was not being
      inherited properly from thread to thread.  This cause pthread_sigmask to
      fail in some instances.
      [Bill Abt, Saurabh Desai]
  
   *) Removed the change to the clone() parameters in pth_native.c  The peer
      relationship between threads is now established in the kernel patch.
      [Bill Abt]

  Changes between 0.9.2 and 0.9.3

   *) Changed clone parameters in pth_native.c to include the undocumented
      CLONE_PARENT.  This will establish a true peer relationship among threads
      in a process.
      [Saurabh Desai, Bill Abt]

  Changes between 0.9.1 and 0.9.2

   *) Added support for S/390 to pth_native.c
	(Thanks to Neale Ferguson of Software AG for his contribution.)
      [Neale Ferguson]
   *) Added kernel patch for 2.4.0 to complete implementation of the
      CLONE_THREAD functionality of the clone() api that was introduced
      in the 2.4 Linux kernel.
      [Bill Abt, Saurabh Desai]
   *) Added new build option to configure (--enable-kernel-patch) that will
      the user build and use NGPT with the accompanying kernel patch or continue
      to run with an unpatched kernel.  Enabling this feature without first
      applying the patch is NOT RECOMMENDED and will result in an internal
      library crash.
   *) Changed pth_new_native() so that the CLONE_THREAD flag is passed.
   *) Changed from the use of getpid() to get the process id to gettid(), a
      new system called added by the patch, that returns the native thread id.
   *) Improved the pth_bindtonative function in pth_lib.c
   *) Improved the alogrithm where new native threads are launched to better
      utilize system resources.
      [Bill Abt]
   
  Changes between 0.9.0 and 0.9.1

   *) POSIX/Single UNIX Spec Required Changes:
	    added pthread_attr_setguardsize, currently returns ENOSYS.
	    added pthread_attr_getguardsize, currently returns ENOSYS.
	    added pthread_setconcurrency, currently returns success.
	    added pthread_getconcurrency, currently returns 0 or value set
		with previous call to pthread_setcurrency.
	    added # defines as required by the POSIX specification.
   *) Removed ngpt headers and config from development spec in rpm spec
      file.  These are for internal use only.
   *) Added a .aliases file that can be sourced to make life easier when
      working with the NGPT source.
      [Bill Abt]

  Changes between 0.0.0 and 0.9.0

   *) Initial release
      [Bill Abt]

