]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dbwrap: add comment describing behaviour of dbwrap_change_uint32_atomic().
authorMichael Adam <obnox@samba.org>
Tue, 5 Aug 2008 21:13:06 +0000 (23:13 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 5 Aug 2008 21:43:59 +0000 (23:43 +0200)
Michael

source/lib/dbwrap_util.c

index 14baec11a3c40c8a8362617f15078d1d4e80a11f..3bf312d0d095ea5abce5e3f943b0708062ba51ca 100644 (file)
@@ -98,6 +98,13 @@ bool dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v)
        return NT_STATUS_IS_OK(status) ? 0 : -1;
 }
 
+/**
+ * Atomic unsigned 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.
+ */
 uint32_t dbwrap_change_uint32_atomic(struct db_context *db, const char *keystr,
                                     uint32_t *oldval, uint32_t change_val)
 {