diff options
author | Michael Adam <obnox@samba.org> | 2008-08-05 23:38:56 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-08-05 23:44:07 +0200 |
commit | 7b35eec609ac8e120939cd129c8ad9580deaaf5f (patch) | |
tree | 4b0155215adb8461c152e1215b0e29232434e0e9 /source3 | |
parent | 4c5752d40f3854276a4643d834c0cdab8779d43c (diff) | |
download | samba-7b35eec609ac8e120939cd129c8ad9580deaaf5f.tar.gz samba-7b35eec609ac8e120939cd129c8ad9580deaaf5f.tar.bz2 samba-7b35eec609ac8e120939cd129c8ad9580deaaf5f.zip |
dbwrap: add comment describing behaviour of dbwrap_change_int32_atomic().
Michael
(This used to be commit f8f21c8e3922806230e240cb54205fc2db7a3619)
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 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) { |