glib/docs
Emmanuele Bassi 9e5a53d576 Add reference counting types
We have a common pattern for reference counting in GLib, but we always
implement it with ad hoc code. This is a good chance at trying to
standardise the implementation and make it public, so that other code
using GLib can take advantage of shared behaviour and semantics.

Instead of simply taking an integer variable, we should create type
aliases, to immediately distinguish the reference counting semantics of
the code; we can handle mixing atomic reference counting with a
non-atomic type (and vice versa) by using differently signed values for
the atomic and non-atomic cases.

The gatomicrefcount type is modelled on the Linux kernel refcount_t
type; the grefcount type is added to let single-threaded code bases to
avoid paying the price of atomic memory barriers on reference counting
operations.
2018-06-11 14:59:39 +01:00
..
reference Add reference counting types 2018-06-11 14:59:39 +01:00
debugging.txt Remove references to gruntime. This includes renaming the test program 2002-02-26 21:23:52 +00:00
macros.txt build: Remove the --disable-mem-pools build option and the DISABLE_MEM_POOLS macro 2018-06-02 09:45:55 +02:00
Makefile.am Removed obsolete makefile rules 2013-10-17 13:20:14 -04:00