git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c5752d
)
dbwrap: add comment describing behaviour of dbwrap_change_int32_atomic().
author
Michael Adam
<obnox@samba.org>
Tue, 5 Aug 2008 21:38:56 +0000
(23:38 +0200)
committer
Michael Adam
<obnox@samba.org>
Tue, 5 Aug 2008 21:44:07 +0000
(23:44 +0200)
Michael
(This used to be commit
f8f21c8e3922806230e240cb54205fc2db7a3619
)
source3/lib/dbwrap_util.c
patch
|
blob
|
history
diff --git
a/source3/lib/dbwrap_util.c
b/source3/lib/dbwrap_util.c
index 7789f6922303734daf3c0d8622175b76c28397fe..09e9071d8c9a69c30b78c3d8a935e506fde792c3 100644
(file)
--- 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)
{