summaryrefslogtreecommitdiffstats
path: root/source/lib
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-08-05 23:38:56 +0200
committerKarolin Seeger <kseeger@samba.org>2008-08-11 16:16:03 +0200
commit648fb541542bcd9f0e76d6f5f8b5589f9f02feb7 (patch)
tree72558bd25ad7205ae367575e326aca06522505f0 /source/lib
parent4b25a10a4d02c91ca3c5a2365e4e04d3f2c93f83 (diff)
downloadsamba-648fb541542bcd9f0e76d6f5f8b5589f9f02feb7.tar.gz
samba-648fb541542bcd9f0e76d6f5f8b5589f9f02feb7.tar.xz
samba-648fb541542bcd9f0e76d6f5f8b5589f9f02feb7.zip
dbwrap: add comment describing behaviour of dbwrap_change_int32_atomic().
Michael (cherry picked from commit f8f21c8e3922806230e240cb54205fc2db7a3619) (cherry picked from commit 0bdab793c1da9b56790d37ac7d064b67ec51e3a4)
Diffstat (limited to 'source/lib')
-rw-r--r--source/lib/dbwrap_util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/lib/dbwrap_util.c b/source/lib/dbwrap_util.c
index 7789f692230..09e9071d8c9 100644
--- a/source/lib/dbwrap_util.c
+++ b/source/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)
{