ASF Bugzilla – Attachment 20456 Details for
Bug 42806
apr_atomic problems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
remove volatile from apr_atomic_* prototypes
apr-atomic-volatile.patch (text/plain), 3.34 KB, created by
Davi Arnaut
on 2007-07-05 12:13:13 UTC
(
hide
)
Description:
remove volatile from apr_atomic_* prototypes
Filename:
MIME Type:
Creator:
Davi Arnaut
Created:
2007-07-05 12:13:13 UTC
Size:
3.34 KB
patch
obsolete
>Index: apr/include/apr_atomic.h >=================================================================== >--- apr.orig/include/apr_atomic.h >+++ apr/include/apr_atomic.h >@@ -48,22 +48,21 @@ APR_DECLARE(apr_status_t) apr_atomic_ini > > /* > * Atomic operations on 32-bit values >- * Note: Each of these functions internally implements a memory barrier >- * on platforms that require it >+ * Note: Each of these functions internally issues a full memory barrier > */ > > /** > * atomically read an apr_uint32_t from memory > * @param mem the pointer > */ >-APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem); >+APR_DECLARE(apr_uint32_t) apr_atomic_read32(apr_uint32_t *mem); > > /** > * atomically set an apr_uint32_t in memory > * @param mem pointer to the object > * @param val value that the object will assume > */ >-APR_DECLARE(void) apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val); >+APR_DECLARE(void) apr_atomic_set32(apr_uint32_t *mem, apr_uint32_t val); > > /** > * atomically add 'val' to an apr_uint32_t >@@ -71,28 +70,28 @@ APR_DECLARE(void) apr_atomic_set32(volat > * @param val amount to add > * @return old value pointed to by mem > */ >-APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val); >+APR_DECLARE(apr_uint32_t) apr_atomic_add32(apr_uint32_t *mem, apr_uint32_t val); > > /** > * atomically subtract 'val' from an apr_uint32_t > * @param mem pointer to the object > * @param val amount to subtract > */ >-APR_DECLARE(void) apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val); >+APR_DECLARE(void) apr_atomic_sub32(apr_uint32_t *mem, apr_uint32_t val); > > /** > * atomically increment an apr_uint32_t by 1 > * @param mem pointer to the object > * @return old value pointed to by mem > */ >-APR_DECLARE(apr_uint32_t) apr_atomic_inc32(volatile apr_uint32_t *mem); >+APR_DECLARE(apr_uint32_t) apr_atomic_inc32(apr_uint32_t *mem); > > /** > * atomically decrement an apr_uint32_t by 1 > * @param mem pointer to the atomic value > * @return zero if the value becomes zero on decrement, otherwise non-zero > */ >-APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem); >+APR_DECLARE(int) apr_atomic_dec32(apr_uint32_t *mem); > > /** > * compare an apr_uint32_t's value with 'cmp'. >@@ -102,8 +101,8 @@ APR_DECLARE(int) apr_atomic_dec32(volati > * @param cmp the value to compare it to > * @return the old value of *mem > */ >-APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with, >- apr_uint32_t cmp); >+APR_DECLARE(apr_uint32_t) apr_atomic_cas32(apr_uint32_t *mem, apr_uint32_t with, >+ apr_uint32_t cmp); > > /** > * exchange an apr_uint32_t's value with 'val'. >@@ -111,7 +110,7 @@ APR_DECLARE(apr_uint32_t) apr_atomic_cas > * @param val what to swap it with > * @return the old value of *mem > */ >-APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val); >+APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(apr_uint32_t *mem, apr_uint32_t val); > > /** > * compare the pointer's value with cmp. >@@ -121,7 +120,7 @@ APR_DECLARE(apr_uint32_t) apr_atomic_xch > * @param cmp the value to compare it to > * @return the old value of the pointer > */ >-APR_DECLARE(void*) apr_atomic_casptr(volatile void **mem, void *with, const void *cmp); >+APR_DECLARE(void*) apr_atomic_casptr(void **mem, void *with, void *cmp); > > /** @} */ >
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 42806
:
20437
|
20438
|
20439
|
20440
|
20441
| 20456 |
20457
|
20458
|
20459
|
20460
|
20461
|
20462
|
20463
|
20464
|
20465
|
20466
|
20468