From: Michael Adam Date: Tue, 5 Aug 2008 21:38:56 +0000 (+0200) Subject: dbwrap: add comment describing behaviour of dbwrap_change_int32_atomic(). X-Git-Tag: samba-3.3.0pre1~274 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f8f21c8e3922806230e240cb54205fc2db7a3619;p=thirdparty%2Fsamba.git dbwrap: add comment describing behaviour of dbwrap_change_int32_atomic(). Michael --- 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) {