Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 917712 Details for
Bug 928488
sys-libs/db-6.0.35-r5 - /.../atomic.h: error: too few arguments provided to function-like macro invocation
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
rename atomic_init
dbinc_atomic.h.patch (text/plain), 4.37 KB, created by
Steffen Hau
on 2025-01-28 10:36:38 UTC
(
hide
)
Description:
rename atomic_init
Filename:
MIME Type:
Creator:
Steffen Hau
Created:
2025-01-28 10:36:38 UTC
Size:
4.37 KB
patch
obsolete
>http://www.databaseusers.com/article/6047407/Bug%3A+Build+failure+on+Linux+with+clang+libc%2B%2B+(atomic+issues) >https://gist.githubusercontent.com/LnL7/5153b251fd525fe15de69b67e63a6075/raw/7778e9364679093a32dec2908656738e16b6bdcb/clang.patch > >diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h >index 6a858f7..9f338dc 100644 >--- a/src/dbinc/atomic.h >+++ b/src/dbinc/atomic.h >@@ -70,7 +70,7 @@ typedef struct { > * These have no memory barriers; the caller must include them when necessary. > */ > #define atomic_read(p) ((p)->value) >-#define atomic_init(p, val) ((p)->value = (val)) >+#define atomic_init_db(p, val) ((p)->value = (val)) > > #ifdef HAVE_ATOMIC_SUPPORT > >@@ -206,7 +206,7 @@ static inline int __atomic_compare_exchange( > #define atomic_dec(env, p) (--(p)->value) > #define atomic_compare_exchange(env, p, oldval, newval) \ > (DB_ASSERT(env, atomic_read(p) == (oldval)), \ >- atomic_init(p, (newval)), 1) >+ atomic_init_db(p, (newval)), 1) > #else > #define atomic_inc(env, p) __atomic_inc(env, p) > #define atomic_dec(env, p) __atomic_dec(env, p) >diff --git a/src/mp/mp_fget.c b/src/mp/mp_fget.c >index 16de695..d0dcc29 100644 >--- a/src/mp/mp_fget.c >+++ b/src/mp/mp_fget.c >@@ -653,7 +653,7 @@ alloc: /* Allocate a new buffer header and data space. */ > > /* Initialize enough so we can call __memp_bhfree. */ > alloc_bhp->flags = 0; >- atomic_init(&alloc_bhp->ref, 1); >+ atomic_init_db(&alloc_bhp->ref, 1); > #ifdef DIAGNOSTIC > if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) { > __db_errx(env, DB_STR("3025", >@@ -968,7 +968,7 @@ alloc: /* Allocate a new buffer header and data space. */ > MVCC_MPROTECT(bhp->buf, mfp->pagesize, > PROT_READ); > >- atomic_init(&alloc_bhp->ref, 1); >+ atomic_init_db(&alloc_bhp->ref, 1); > MUTEX_LOCK(env, alloc_bhp->mtx_buf); > alloc_bhp->priority = bhp->priority; > alloc_bhp->pgno = bhp->pgno; >diff --git a/src/mp/mp_mvcc.c b/src/mp/mp_mvcc.c >index 770bad8..e28cce0 100644 >--- a/src/mp/mp_mvcc.c >+++ b/src/mp/mp_mvcc.c >@@ -281,7 +281,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp) > #else > memcpy(frozen_bhp, bhp, SSZA(BH, buf)); > #endif >- atomic_init(&frozen_bhp->ref, 0); >+ atomic_init_db(&frozen_bhp->ref, 0); > if (mutex != MUTEX_INVALID) > frozen_bhp->mtx_buf = mutex; > else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH, >@@ -440,7 +440,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp) > #endif > alloc_bhp->mtx_buf = mutex; > MUTEX_LOCK(env, alloc_bhp->mtx_buf); >- atomic_init(&alloc_bhp->ref, 1); >+ atomic_init_db(&alloc_bhp->ref, 1); > F_CLR(alloc_bhp, BH_FROZEN); > } > >diff --git a/src/mp/mp_region.c b/src/mp/mp_region.c >index 4952030..47645f8 100644 >--- a/src/mp/mp_region.c >+++ b/src/mp/mp_region.c >@@ -278,7 +278,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) > MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0) > return (ret); > SH_TAILQ_INIT(&htab[i].hash_bucket); >- atomic_init(&htab[i].hash_page_dirty, 0); >+ atomic_init_db(&htab[i].hash_page_dirty, 0); > } > > mtx_base = mtx_prev = MUTEX_INVALID; >@@ -332,7 +332,7 @@ no_prealloc: > DB_MUTEX_SHARED, &hp->mtx_hash)) != 0) > return (ret); > SH_TAILQ_INIT(&hp->hash_bucket); >- atomic_init(&hp->hash_page_dirty, 0); >+ atomic_init_db(&hp->hash_page_dirty, 0); > #ifdef HAVE_STATISTICS > hp->hash_io_wait = 0; > hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0; >diff --git a/src/mutex/mut_method.c b/src/mutex/mut_method.c >index 09353b0..177353c 100644 >--- a/src/mutex/mut_method.c >+++ b/src/mutex/mut_method.c >@@ -474,7 +474,7 @@ atomic_compare_exchange(env, v, oldval, newval) > MUTEX_LOCK(env, mtx); > ret = atomic_read(v) == oldval; > if (ret) >- atomic_init(v, newval); >+ atomic_init_db(v, newval); > MUTEX_UNLOCK(env, mtx); > > return (ret); >diff --git a/src/mutex/mut_tas.c b/src/mutex/mut_tas.c >index 106b161..fc4de9d 100644 >--- a/src/mutex/mut_tas.c >+++ b/src/mutex/mut_tas.c >@@ -47,7 +47,7 @@ __db_tas_mutex_init(env, mutex, flags) > > #ifdef HAVE_SHARED_LATCHES > if (F_ISSET(mutexp, DB_MUTEX_SHARED)) >- atomic_init(&mutexp->sharecount, 0); >+ atomic_init_db(&mutexp->sharecount, 0); > else > #endif > if (MUTEX_INIT(&mutexp->tas)) { >@@ -550,7 +550,7 @@ __db_tas_mutex_unlock(env, mutex) > F_CLR(mutexp, DB_MUTEX_LOCKED); > /* Flush flag update before zeroing count */ > MEMBAR_EXIT(); >- atomic_init(&mutexp->sharecount, 0); >+ atomic_init_db(&mutexp->sharecount, 0); > } else { > DB_ASSERT(env, sharecount > 0); > MEMBAR_EXIT();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 928488
:
889332
|
889333
|
889334
|
889335
|
889336
|
889337
|
889338
|
889339
| 917712