On 8/6/06, Philip Martin <email@example.com> wrote:
> Branko Čibej <firstname.lastname@example.org> writes:
> > Vlad Georgescu wrote:
> >> (BDB_CACHE_UNINITIALIZED,
> >> BDB_CACHE_START_INIT,
> >> BDB_CACHE_INIT_FAILED,
> >> BDB_CACHE_INITIALIZED): Deleted. Similar definitions are now in
> >> svn_atomic.h.
> > I cannot for the life of me imagine why these definitions should be part
> > of Subversion's public API. In fact, they shouldn't be. They should
> > either go into svn_private_config.h, or, if that's not appropriate
> > (being a generated header), we should introduce a new _private_ header
> > for them.
> > -1 on putting them in include/svn_atomic.h, they have no use outside the
> > library implementation.
The header file is now in subversion/include/private.
> We don't need all four values, but the public API does need to provide
> a mechanism to initialize static objects of type svn_atomic_t so some
> sort of SVN_ATOMIC_ONCE_INITIALIZER is needed, unless we document that
> a static zero initialisation is sufficient.
I prefer the latter option to the former. After all, globals in C are
zero-initialized by default, so it works fine even if the user doesn't
explicitly initialize the svn_atomic_t to 0.
Extract the atomic initialization code from libsvn_fs_base/bdb/env.c
and convert it to a generic implementation that can be used to
initialize other libraries (*cough* Cyrus SASL *cough*). Make bdb use
the new implementation.
* subversion/include/private/svn_atomic.h: New file.
* subversion/libsvn_subr/atomic.c: New file.
Include svn_atomic.h instead of apr_atomic.h.
svn__atomic_cas): These are now in subversion/include/svn_atomic.h
and have a single
underscore. All calls were changed to reflect this.
BDB_CACHE_INITIALIZED): Deleted. Similar definitions are now in atomic.c.
(bdb_cache_state): This is no longer declared inside an #ifdef
and is no longer explicitly initialized.
(svn_fs_bdb__init_cb): New function. Contains bdb-specific initialization.
(svn_fs_bdb__init): Call svn_atomic_init_once().
Received on Tue Aug 8 16:01:15 2006
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org