2008-08-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/cthreads.h (spin_unlock, spin_try_lock): Add memory clobbers.

2007-06-14  Thomas Schwinge  <tschwinge@gnu.org>

	* cthread_internals.h (cproc_block): Add prototype.

2006-03-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* i386/cthreads.h (cthread_sp): Likewise.

2002-08-26  Roland McGrath  <roland@frob.com>

	* cthreads.c (cthread_body) [HAVE_USELOCALE]: Call uselocale to
	initialize the thread to the global locale.

2002-07-29  Marcus Brinkmann  <marcus@gnu.org>

	* stack.c (stack_init): Put back in setting of the
	__hurd_threadvar_stack_mask and __hurd_threadvar_stack_offset
	variables (which got lost in the merge).

	* cthreads.c (cthread_init): Move cthread_alloc call before
	cproc_init call (lost in merge).

2002-05-28  Roland McGrath  <roland@frob.com>

	* cthreads.h: Do not define WAIT_DEBUG to affect inlines.
	* options.h: Not here either.

	* cprocs.c (cproc_block): Can't be static, called from cancel-cond.c.

	* cthreads.h (hurd_condition_wait, condition_implies,
	condition_unimplies): Restore decls lost in merge.
	(mutex_clear): Define as mutex_init instead of bogon (lost in merge).

	* cthreads.c (cthread_fork_prepare, cthread_fork_parent,
	cthread_fork_child): Don't call malloc_fork_* (lost in merge).

	* lockfile.c: Use __attribute__ magic instead of #pragma magic
	for alias definitions.  Don't bother to make them weak.

2002-05-26  Roland McGrath  <roland@frob.com>

	Changes merged from CMU MK83a version:
	* cthreads.h, options.h: Various cleanups.
	* call.c, cthread_data.c, sync.c, mig_support.c, stack.c: Likewise.
	* i386/cthreads.h, i386/thread.c, i386/lock.s: Likewise.
	* cthread_internals.h: Add decls for internal functions.
	(struct cproc): Use vm_offset_t for stack_base and stack_size members.
	Use natural_t for context member.
	* cprocs.c: Use prototypes for all defns.
	* cthreads.c: Likewise.
	(cthread_exit): Cast any_t to integer_t before int.

	* alpha/thread.c: #if 0 out the silly bzero decl.

	* alpha/cthreads.h, alpha/thread.c, alpha/csw.S, alpha/lock.S:
	New files, verbatim from CMU release MK83a user/threads/alpha.

2002-05-08  Roland McGrath  <roland@frob.com>

	* cthreads.c (cthread_exit): Cast any_t to long before int.

	* cthread_internals.h: int -> void * for `busy' member.
	* cprocs.c (cthread_mach_msg): Don't cast to int when setting it.
	* cprocs.c (cthread_mag_active): Likewise.

2002-05-07  Roland McGrath  <roland@frob.com>

	* cprocs.c (cproc_list_lock): Declare type as spin_lock_t.

	* cthreads.h (cthread_sp): Cast to vm_address_t instead of int.
	(mutex_unlock): Cast to void * instead of int.

2002-03-24  Roland McGrath  <roland@frob.com>

	* libthreads.map: Use GLIBC_2.2.6 set instead of GLIBC_2.2.

2001-12-22  Roland McGrath  <roland@frob.com>

	* i386/thread.c (cthread_sp): Use __thread_stack_pointer.

2001-08-23  Roland McGrath  <roland@frob.com>

	* lockfile.c: Rewritten to use macros now defined by libc.

2001-03-31  Roland McGrath  <roland@frob.com>

	* cthreads.h: Fix obsolescent #endif syntax.
	* cthread_internals.h: Likewise.
	* cancel-cond.c: Likewise.
	* stack.c: Likewise.
	* cthreads.c: Likewise.
	* cprocs.c: Likewise.
	* call.c: Likewise.
	* i386/thread.c: Likewise.
	* cthread_data.c: Likewise.

2001-02-25  Roland McGrath  <roland@frob.com>

	* i386/thread.c: Remove superfluous bzero decl,
	just include <strings.h> instead.

2000-05-25  Mark Kettenis  <kettenis@gnu.org>

	* libthreads.map: Update comment to reflect Roland's 2000-03-30
	change, and my change to the toplevel configure.in that disables
	versioning for the old stdio-using libc.

2000-03-30  Roland McGrath  <roland@baalperazim.frob.com>

	* libthreads.map: Define HURD_CTHREADS_0.3 version set,
	putting all symbols there except the lockfile symbols.
	* lockfile.c: Nit fixes.

2000-03-27  Roland McGrath  <roland@baalperazim.frob.com>

	Locking support for stdio streams with glibc-2.2 libio.  EXPERIMENTAL!
	* lockfile.c: New file.
	* libthreads.map: New file.
	* Makefile (SRCS): Add lockfile.c.
	[$(VERSIONING) = yes] ($(libname).so.$(hurd-version)): Depend
	on $(srcdir)/$(libname).map to get version script into the link.

2000-02-28  Roland McGrath  <roland@baalperazim.frob.com>

	* i386/csw.S: #undef __ELF__ before defining it, since
	it is usually predefined.

2000-01-10  Mark Kettenis  <kettenis@gnu.org>

	* cprocs.c: Include <assert.h>

2000-01-09  Roland McGrath  <roland@baalperazim.frob.com>

	* cprocs.c (cproc_alloc): Initialize P->wired and P->msg here (code
	from cthread_wire).
	(cthread_wire): Reduce to just an assert, cthreads always wired.
	(chtread_unwire): Abort if called.

1999-06-13  Roland McGrath  <roland@baalperazim.frob.com>

	* cthreads.h (MACRO_BEGIN, MACRO_END): #undef before unconditionally
	redefining.  Use GCC extension for statement expression with value 0.

1999-05-29  Roland McGrath  <roland@baalperazim.frob.com>

	* cthreads.h (mutex_clear): Change again, to call mutex_init.

	* cthreads.h (mutex_clear): Change from syntax error to no-op (with
	warning avoidance).

1998-11-12  Mark Kettenis  <kettenis@phys.uva.nl>

	* cthreads.c (cthread_init): Move cthread_alloc call before
	cproc_init call, since cthread_alloc uses malloc, and malloc won't
	work between initializing the new stack and switching over to it.

1998-07-20  Roland McGrath  <roland@baalperazim.frob.com>

	* i386/csw.S (cproc_prepare): Take address of cthread_body as third
	arg, so we don't have to deal with PIC magic to find its address
	without producing a text reloc.
	* cprocs.c (cproc_create): Pass &cthread_body to cproc_prepare.

Tue Jun  9 13:50:09 1998  Thomas Bushnell, n/BSG  <tb@mit.edu>

	* cthreads.c (cthread_fork_prepare): Don't call
	malloc_fork_prepare since we are no longer providing our own
	malloc in this library.
	(cthread_fork_parent): Likewise, for malloc_fork_parent.
	(cthread_fork_child): Likewise, for malloc_fork_child.

Wed Aug 20 15:39:44 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* cthreads.c (cthread_body): Wire self before calling user work
 	function.  This way all cthreads will be wired, which the ports
	library (and hurd_thread_cancel, etc.) depend on.

Fri Aug  8 13:21:17 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* Makefile (SRCS): Delete malloc.c; libc now has a thread safe
	malloc.
	(malloc.c): Delete file.

Mon Jun  9 21:18:46 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* cthreads.c (cthread_fork): Delete debugging oddity that crept
	into source.

Thu Apr  3 20:29:27 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/csw.S: Define __ELF__ too.

Wed Feb 19 23:29:55 1997  Miles Bader  <miles@gnu.ai.mit.edu>

	* stack.c (__hurd_threadvar_stack_mask,
	__hurd_threadvar_stack_offset, __hurd_threadvar_max): Make extern.

Tue Feb 18 16:28:36 1997  Miles Bader  <miles@gnu.ai.mit.edu>

	* i386/thread.c (cproc_setup): Correctly leave space at top of
	stack for GNU per-thread variables.

Mon Nov 18 16:36:56 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* cprocs.c (cproc_create): Cast CHILD in assignment.

Mon Oct 21 22:05:48 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/csw.S (CALL_MCOUNT): New macro.
	(cproc_swtich, cproc_start_wait, cproc_prepare): Use CALL_MCOUNT.

	* rwlock.h: Change extern inline protection to use new canonical
	method.
	* rwlock.c: Rewritten.

Wed Sep  4 09:06:09 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* Makefile (VPATH): Look in $(asm_syntax) instead of old
	$(machine); Hurd configure now folds equivalent CPU types into
	asm_syntax.

Thu Aug 29 12:50:37 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* i386/csw.S: Include <mach/i386/asm.h> instead of <i386/asm.h>.
	Define ELF before inclusion.

Sat Jul 20 15:47:24 1996  Michael I. Bushnell, p/BSG  <mib@gnu.ai.mit.edu>

	* Makefile (lndist-i386-files): Look for I386SRCS and I386HDRS in
	$(srcdir).

Thu Jun  6 07:29:31 1996  Miles Bader  <miles@gnu.ai.mit.edu>

	* malloc.c (more_memory): Use assert_perror instead of MACH_CALL.
	"cthread_internals.h": Include removed.

Thu May  9 11:13:42 1996  Michael I. Bushnell, p/BSG  <mib@gnu.ai.mit.edu>

	* Makefile (installhdrs, installhdrsubdir): Install headers using
	the generic technique, now that installhdrsubdir is available.

	* rwlock.h: If _RWLOCK_DEFINE_FUNCTIONS is defined, then clear
 	_EXTERN_INLINE, but *after* header files have been included.
	* rwlock.c (_RWLOCK_DEFINE_FUNCTIONS): New macro; use in place of
 	clearing _EXTERN_INLINE, which conflicts with machine-sp.h.

Sat May  4 05:33:57 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

	* cthreads.h [lint] (NEVER): Spurious global variable removed.
	[!lint] (NEVER): Useless macro removed.

	* Makefile (SRCS): Add rwlock.c.
	(LCLHDRS): Add rwlock.h.
	(install): Depend on $(includedir)/rwlock.h.
	($(includedir)/%.h: %.h): New rule.
	($(includedir)/cthreads.h): Target removed, obviated by that rule.
	* rwlock.h: Moved to libthreads from libshouldbeinlibc.
	(_EXTERN_INLINE): New macro.
	Use it for all the inline defns.
	* rwlock.c: New file.

Thu Apr 11 17:55:24 1996  Michael I. Bushnell, p/BSG  <mib@gnu.ai.mit.edu>

	* Makefile (CFLAGS): Turn off -Wall.

	* Makefile (VPATH): Fix up for new configure reality.

Thu Mar  7 15:52:38 1996  Miles Bader  <miles@gnu.ai.mit.edu>

	* malloc.c (realloc): Use LOG2_MIN_SIZE.
	(LOG2_MIN_SIZE): New macro.

	* malloc.c (realloc): Don't bother allocating a new block if the
 	new size request fits in the old one and doesn't waste any space.
  	Only free the old block if we successfully got a new one.

Wed Mar  6 18:05:57 1996  Miles Bader  <miles@gnu.ai.mit.edu>

	* malloc.c [MCHECK] (struct header): New type.
	(union header): Only define if !MCHECK.
	(HEADER_SIZE, HEADER_NEXT, HEADER_FREE, HEADER_CHECK): New macros.
	[MCHECK] (MIN_SIZE): Add correct definition for this case.
	(more_memory, malloc, free, realloc): Use above macros, and add
	appropiate checks & frobs in MCHECK case.

Wed Jan 31 20:05:57 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* cancel-cond.c: Add assert to check for signal bug.

Wed Jan 24 13:38:11 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* cthreads.h: Use prototypes for functions of zero args.

Sun Dec 10 08:41:36 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* stack.c (addr_range_check, probe_stack): Functions #if 0'd out.
	(stack_init): Don't call probe_stack or frob old stack at all.
	Default cthread_stack_size to 16 pages if it is zero.

Wed Dec  6 14:48:37 1995  Michael I. Bushnell, p/BSG  <mib@gnu.ai.mit.edu>

	* cprocs.c (condition_unimplies): Take address of (*impp)->next in
 	assignment to IMPP on loop step instruction.

Wed Oct  4 16:22:27 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* i386/csw.S (JUMPTARGET): New macro, versions for [PIC] and not.
	Use it in place of EXT.
	* Makefile (csw_pic.o): Bogus braindead target from hell removed.
	Bushnell will be shot.

Fri Sep 22 13:51:22 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* cprocs.c: Include hurd/threadvar.h.

Sat Sep 16 13:42:02 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* Makefile (CPPFLAGS): Variable removed.
	(lndist-i386-files): Use $(top_srcdir) in place of $(srcdir).

Wed Sep 13 15:49:17 1995  Michael I. Bushnell, p/BSG  <mib@duality.gnu.ai.mit.edu>

	* cthreads.h (CONDITION_INITIALIZER): Provide initial zero for
	IMPLICATIONS member.
	(condition_init): Bother initializing NAME and IMPLICATIONS members.

Wed Aug 30 11:10:27 1995  Michael I. Bushnell, p/BSG  <mib@duality.gnu.ai.mit.edu>

	* cthreads.h (condition_implies, condition_unimplies): New
	functions.
	(struct condition): New member `implications'.
	(cond_imp): New structure.
	(cond_signal): Return int now.
	(condition_broadcast): Always call cond_broadcast if this
	condition has implications.
	(condition_signal): Always call cond_signal if this condition has
	implications.
	* cprocs.c (cond_signal): If this condition has implications,
	see if one of them needs to be signalled when we have no waiters.
	(cond_broadcast): Signal the implications list too.
	(condition_implies, condition_unimplies): New functions.

	* cthreads.h (hurd_condition_wait): Provide declaration.

Tue Aug 29 10:48:59 1995  Michael I. Bushnell, p/BSG  <mib@duality.gnu.ai.mit.edu>

	* cthread_internals.h (cproc_block): Provide decl.

Sat Aug 26 14:08:15 1995  Miles Bader  <miles@churchy.gnu.ai.mit.edu>

	* cancel-cond.c (hurd_condition_wait_cancel): Name changed to
	`hurd_condition_wait'.

Tue Aug 22 19:26:38 1995  Miles Bader  <miles@churchy.gnu.ai.mit.edu>

	* Makefile (SRCS): Add a backslash.

Mon Aug 21 12:52:38 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* Makefile (SRCS): Add cancel-cond.c.
	* cancel-cond.c: New file.

Thu Jul  6 13:39:25 1995  Michael I Bushnell  <mib@duality.gnu.ai.mit.edu>

	* Makefile (install): Don't *always* install cthreads.h; do it
 	only if it's new.

	* Makefile: Removed dependencies that are now automatically
 	generated.

	* Makefile (csw_pic.o): Provide slightly cheating rule.

Fri May 12 14:25:35 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* i386/csw.S: Use EXT macro instead of explicit underscores.
	* i386/asm.h: File removed; it is installed by libc.
	* Makefile (I386HDRS): Variable removed.
	($(OBJS)): Don't depend on i386/asm.h.

	* Makefile (CPPFLAGS): Use $(srcdir) instead of $(hurdsource).

Wed Apr 12 14:33:06 1995  Michael I Bushnell  <mib@duality.gnu.ai.mit.edu>

	* Makefile (lndist, lndist-i386-files): Change $(hurdsource) to
        $(srcdir).
	($(hurdsource)/hurd-snap/$(dir)/i386): Likewise.

Tue Apr  4 17:04:45 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* Makefile (CPPFLAGS): Define.
	($(OBJS) rule): Fix typo in target.
	(install-cthreads.h): Use $(INSTALL_DATA).

	* cthreads.h (mutex_lock, mutex_unlock): Use __ names for *_solid.
	* cprocs.c (mutex_lock_solid, mutex_unlock_solid): Renamed to __*.
	(_cthread_mutex_lock_routine, _cthread_mutex_unlock_routine): Variables
	removed.

Fri Jul 22 10:47:51 1994  Michael I Bushnell  <mib@geech.gnu.ai.mit.edu>

	* Makefile: Rewritten in accord with new scheme.

Tue Jul 19 12:22:01 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* Makefile (generic-sources): Restored malloc.c.
	(malloc-sources, malloc-objects): Deleted variables.
	(DIST_FILES): Deleted $(malloc-sources)
	(all): Deleted libmalloc.a.
	(libmalloc.a): Delted target.
	($(hurdinst)/lib/libmalloc.a): Deleted target.
	(install): Deleted $(hurdinst)/lib/libmalloc.a.
	(clean): Deleted libmalloc.a.

Tue Jul  5 14:17:28 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* Makefile (SRCS, TAGSHDRS): New variables.
	(TAGS): Deleted local definition; now it's in Makeconf.

Thu May 19 00:54:54 1994  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)

	* cprocs.c (_cthread_mutex_lock_routine,
	_cthread_mutex_unlock_routine): New variables.

Thu May  5 19:33:49 1994  Michael I Bushnell  (mib@geech.gnu.ai.mit.edu)

	* Makefile: (generic-sources): Removed malloc.c.
	(malloc-sources, malloc-objects): new variables.
	(DIST_FILES): added $(malloc-sources).
	(libmalloc.a, $(hurdinst)/lib/libmalloc.a): New targets.
	($(hurdinst)/lib/malloc.o): Deleted target.
	(all): added libmalloc.a.
	(install): Changed $(hurdinst)/lib/malloc.o to
	$(hurdinst)/lib/libmalloc.a
	(clean): Added libmaloc.a.

Thu May  5 04:30:34 1994  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)

	* cthreads.c (cthread_init): Pass STACK instead of P to mig_init.

	* cprocs.c (cproc_create): Pass normal offset value to
	cproc_stack_base.  Explicitly store CHILD ptr at base of its stack.

	* stack.c (stack_init): Set __hurd_threadvar_stack_mask to find
	the lowest address of the stack segment.
	[STACK_GROWTH_UP]: Set __hurd_threadvar_stack_offset to
	sizeof(ur_cthread_t*).
	[! STACK_GROWTH_UP]: Set __hurd_threadvar_stack_offset to the size
	of the stack minus space for the cproc_self ptr and thread variables.

	* malloc.c (malloc, free, realloc): Change declarations to
	standard types, so as not to conflict with the declarations in
	<stdlib.h>.

	* cthread_internals.h: #if 0 out declaration of malloc.
	(struct cproc): #if 0 out `reply_port' member; libc implements that.
	* cprocs.c (cproc_alloc): #if 0 out initialization of P->reply_port.

	* Makefile (generic-sources): Omit sync.c.  libc implements that.

	* cprocs.c (cproc_block): Add __hurd_threadvar_max * sizeof (long
	int) to 2nd arg to cproc_stack_base.

	* stack.c: Include <hurd/threadvar.h>.
	(__hurd_threadvar_stack_mask, __hurd_threadvar_stack_offset,
	__hurd_threadvar_max): Define variables (uninitialized).
	(stack_init): Set __hurd_threadvar_stack_mask to cthread_stack_mask.
	Set __hurd_threadvar_stack_offset to point past the cproc_self ptr.
	Add __hurd_threadvar_max * sizeof (long int) to 2nd arg to
	cproc_stack_base.

	* cthreads.h: #if 0 include of <machine/cthreads.h>.
	Instead, include <machine-sp.h>.
	(cthread_sp): Define using __thread_stack_pointer.
	#if 0 out spin_lock definitions.  Just include <spin-lock.h> instead.
	(struct mutex): Move `held' member to be first in the structure.

Wed May  4 14:55:15 1994  Michael I Bushnell  (mib@churchy.gnu.ai.mit.edu)

	* i386/thread.c: Changed inclusions because we aren't using
	-I flags the way CMU's makefiles do.

	* i386/csw.S: Convert comment character to /* */ pairs.

	* Renamed csw.s to csw.S so that GCC knows to run cpp on it.
	* Makefile (machine-sources): Change csw.s to csw.S.

Wed May  4 07:11:46 1994  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)

	* Makefile (GEN_SRCS): Renamed generic-sources.
	(I386_SRCS): Replaced with machine-sources, omitting directory.
	(SRCS): Renamed sources.  Include $(machine-sources) and prepend
	$(machine)/ directory name.
	(headers): Define variable.
	(OBJS): Renamed objects.
	(VPATH): Define to $(machine).
