Commit Graph

23 Commits

Author SHA1 Message Date
Alan Cox
cff0a327b8 Stop describing an acquire operation as a read barrier and a release
operation as a write barrier.  That description has never been correct,
and it has caused confusion.  An acquire operation orders writes as well
as reads, and a release operation orders reads as well as writes.

Also, explicitly say that a thread doesn't see its own accesses being
reordered.  The reordering of a thread's accesses is only (potentially)
visible to another thread.  Thus, memory barriers need only be used to
control the ordering of accesses between threads, not within a thread.

Reviewed by:	bde, kib
Discussed with:	jhb
MFC after:	1 week
2015-08-14 17:49:03 +00:00
Alan Cox
a61bd9573f Revise the text about the atomicity of the defined operations across
multiple processors.  In particular, clearly state that the operations
are always atomic when they are applied to the default memory type
that is used by the kernel (and applications).

Reviewed by:	kib, jhb (an earlier version)
MFC after:	1 week
2015-08-09 07:45:15 +00:00
Konstantin Belousov
7705435606 The barriers, provided by _acq and _rel atomics, are acquire and
release barriers, not read and write barriers.  They fence all memory
accesses from the respective side, not limited by the kind of
operation.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-06-20 17:18:46 +00:00
Marcel Moolenaar
e7d939bda2 Remove ia64.
This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan
2014-07-07 00:27:09 +00:00
Joel Dahl
0678b9b1d6 Minor mdoc nit. 2013-08-22 16:00:09 +00:00
Jung-uk Kim
8a1ee2d346 Implement atomic_swap() and atomic_testandset().
Reviewed by:	arch, bde, jilles, kib
2013-08-21 22:03:06 +00:00
Ulrich Spörlein
25c8b07fc2 mdoc: Garbage collect unused/unneeded macros 2010-05-27 13:56:27 +00:00
Ulrich Spörlein
aa12cea2cc mdoc: order prologue macros consistently by Dd/Dt/Os
Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.

Reviewed by:	ru
Approved by:	philip, ed (mentors)
2010-04-14 19:08:06 +00:00
John Baldwin
e6b089446b Attempt to clarify some confusing wording regarding atomic_load() and
atomic_store().
2009-05-21 13:39:46 +00:00
Pawel Jakub Dawidek
6eb4157ffc Implement atomic_fetchadd_long() for all architectures and document it.
Reviewed by:	attilio, jhb, jeff, kris (as a part of the uidinfo_waitfree.patch)
2008-03-16 21:20:50 +00:00
Ruslan Ermilov
78ad54210f -mdoc sweep. 2005-11-18 10:56:28 +00:00
John Baldwin
4ea211a4f4 - Document atomic_fetchadd(9) and add a MLINK.
- Add arm and ppc to the list of archs not supporting operations on 64-bit
  integers.
- Update the sample code for acquiring a mutex to be more recent and to
  take into account the recent atomic_foo_ptr() changes.

MFC after:	1 week
2005-09-27 17:59:29 +00:00
Hiten Pandya
0640e9e01b Some mdoc(7) fixes:
Nuke incorrect usage of .Ar; replace it with .Vt, .Va or .Fa appropriately.
The .Ar mdoc(7) specifier should only be used when displaying command line
arguments.

Approved by:	des (mentor)
2003-05-31 14:07:25 +00:00
Ruslan Ermilov
c6a51f1c4a mdoc(7) police: removed raw troff from previous delta.
Objected to by:	mpp, jhb
2002-01-17 15:57:43 +00:00
Ruslan Ermilov
2be6c09fd5 mdoc(7) police:
- make SYNOPSIS look better with some troff magic
- tidy up the markup
2002-01-10 10:36:04 +00:00
Mike Pritchard
b82af3f5e4 ispell sweep of share/man/man9/*. 2002-01-09 11:43:48 +00:00
Jake Burkholder
c645e17a12 Note that the atomic ops on char and short data types may not be available
on all architectures.  Sparc64 does not implement them.
2001-12-15 21:28:02 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Jens Schweikhardt
d1ed27b64a Fixed double word typo.
MFC after:	7 days
2001-07-13 20:11:43 +00:00
John Baldwin
d265f30080 Add 2001 to copyright. 2001-03-09 03:17:18 +00:00
Bruce Evans
2ba5bb1ff5 Fixed missing and/or wrong and/or extra includes in synopsis. 2001-02-15 11:47:31 +00:00
John Baldwin
baeb94c70d Fix some nits in the globs used to describe the various sets of atomic
operations.

Submitted by:	jake, jasone
2000-12-08 22:10:28 +00:00
John Baldwin
eaca618337 Add a manpage to document the atomic operations including a quick treatment
of memory barriers and the newish atomic variants that include them.

Reviewed by:	sheldonh
2000-11-13 20:08:17 +00:00