[kdbus] KDBUS_ITEM_PAYLOAD_OFF items are (once again) relative to msg header
[platform/upstream/glib.git] / glib / gdatasetprivate.h
1 /* GLIB - Library of useful routines for C programming
2  * gdataset-private.h: Internal macros for accessing dataset values
3  * Copyright (C) 2005  Red Hat
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
17  */
18
19 /*
20  * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
21  * file for a list of people on the GLib Team.  See the ChangeLog
22  * files for a list of changes.  These files are distributed with
23  * GLib at ftp://ftp.gtk.org/pub/gtk/. 
24  */
25
26 #ifndef __G_DATASETPRIVATE_H__
27 #define __G_DATASETPRIVATE_H__
28
29 #include <gatomic.h>
30
31 G_BEGIN_DECLS
32
33 /* GET_FLAGS is implemented via atomic pointer access, to allow memory
34  * barriers to take effect without acquiring the global dataset mutex.
35  */
36 #define G_DATALIST_GET_FLAGS(datalist)                          \
37   ((gsize) g_atomic_pointer_get (datalist) & G_DATALIST_FLAGS_MASK)
38
39
40 G_END_DECLS
41
42 #endif /* __G_DATASETPRIVATE_H__ */