From 7b35eec609ac8e120939cd129c8ad9580deaaf5f Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 5 Aug 2008 23:38:56 +0200 Subject: dbwrap: add comment describing behaviour of dbwrap_change_int32_atomic(). Michael (This used to be commit f8f21c8e3922806230e240cb54205fc2db7a3619) --- source3/lib/dbwrap_util.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/lib/dbwrap_util.c') diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c index 7789f69223..09e9071d8c 100644 --- a/source3/lib/dbwrap_util.c +++ b/source3/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) { -- cgit