From: Michael Adam Date: Tue, 5 Aug 2008 21:13:06 +0000 (+0200) Subject: dbwrap: add comment describing behaviour of dbwrap_change_uint32_atomic(). X-Git-Tag: samba-3.3.0pre1~276 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7edfb54c865ddcfd5cdcc8c2184b96aaac2d2ec0;p=thirdparty%2Fsamba.git dbwrap: add comment describing behaviour of dbwrap_change_uint32_atomic(). Michael --- diff --git a/source/lib/dbwrap_util.c b/source/lib/dbwrap_util.c index 14baec11a3c..3bf312d0d09 100644 --- a/source/lib/dbwrap_util.c +++ b/source/lib/dbwrap_util.c @@ -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) {