glib/docs/reference
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
..
gio docs: Document g_unix_mount_for 2018-06-06 12:24:12 +02:00
glib Add reference counting types 2018-06-11 14:59:39 +01:00
gobject doc: Interface for derivable object 2018-05-25 12:50:21 -05:00
.gitignore .gitignore manpages (*.1) 2010-05-24 23:21:01 -04:00
AUTHORS Initial revision 1999-08-16 17:58:30 +00:00
ChangeLog Update README files to refer to git 2009-03-31 19:39:16 -04:00
COPYING Initial revision 1999-08-16 17:58:30 +00:00
Makefile.am docs/: ignore gtester Makefile targets 2013-05-29 21:36:50 -04:00
NEWS Initial revision 1999-08-16 17:58:30 +00:00