summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-08-05 23:38:56 +0200
committerMichael Adam <obnox@samba.org>2008-08-05 23:44:07 +0200
commit7b35eec609ac8e120939cd129c8ad9580deaaf5f (patch)
tree4b0155215adb8461c152e1215b0e29232434e0e9
parent4c5752d40f3854276a4643d834c0cdab8779d43c (diff)
downloadsamba-7b35eec609ac8e120939cd129c8ad9580deaaf5f.tar.gz
samba-7b35eec609ac8e120939cd129c8ad9580deaaf5f.tar.bz2
samba-7b35eec609ac8e120939cd129c8ad9580deaaf5f.zip
dbwrap: add comment describing behaviour of dbwrap_change_int32_atomic().
Michael (This used to be commit f8f21c8e3922806230e240cb54205fc2db7a3619)
-rw-r--r--source3/lib/dbwrap_util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c
index 7789f69223..09e9071d8c 100644
--- a/source3/lib/dbwrap_util.c
+++ b/source3/lib/dbwrap_util.c
@@ -138,6 +138,13 @@ uint32_t dbwrap_change_uint32_atomic(struct db_context *db, const char *keystr,
return 0;
}
+/**
+ * Atomic integer change (addition):
+ *
+ * if value does not exist yet in the db, use *oldval as initial old value.
+ * return old value in *oldval.
+ * store *oldval + change_val to db.
+ */
int32 dbwrap_change_int32_atomic(struct db_context *db, const char *keystr,
int32 *oldval, int32 change_val)
{