From 149e1ae25ab78754532f3005ab7885e826d53104 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 5 Aug 2008 23:13:06 +0200 Subject: dbwrap: add comment describing behaviour of dbwrap_change_uint32_atomic(). Michael (This used to be commit 7edfb54c865ddcfd5cdcc8c2184b96aaac2d2ec0) --- source3/lib/dbwrap_util.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3') diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c index 14baec11a3..3bf312d0d0 100644 --- a/source3/lib/dbwrap_util.c +++ b/source3/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) { -- cgit