diff options
author | Michael Adam <obnox@samba.org> | 2008-08-05 23:13:06 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-08-05 23:43:59 +0200 |
commit | 149e1ae25ab78754532f3005ab7885e826d53104 (patch) | |
tree | ba482b67ef01866e9d30780b18db0521340699ad /source3 | |
parent | b59ed9c05f5d5831e6abf5db6f58a75ec98902f8 (diff) | |
download | samba-149e1ae25ab78754532f3005ab7885e826d53104.tar.gz samba-149e1ae25ab78754532f3005ab7885e826d53104.tar.bz2 samba-149e1ae25ab78754532f3005ab7885e826d53104.zip |
dbwrap: add comment describing behaviour of dbwrap_change_uint32_atomic().
Michael
(This used to be commit 7edfb54c865ddcfd5cdcc8c2184b96aaac2d2ec0)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/dbwrap_util.c | 7 |
1 files changed, 7 insertions, 0 deletions
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) { |