apr_atomic.c (apr-1.6.5.tar.bz2) | : | apr_atomic.c (apr-1.7.0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 17 | skipping to change at line 17 | |||
* | * | |||
* http://www.apache.org/licenses/LICENSE-2.0 | * http://www.apache.org/licenses/LICENSE-2.0 | |||
* | * | |||
* Unless required by applicable law or agreed to in writing, software | * Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | * distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
* See the License for the specific language governing permissions and | * See the License for the specific language governing permissions and | |||
* limitations under the License. | * limitations under the License. | |||
*/ | */ | |||
#include "apr.h" | #include "apr_arch_atomic.h" | |||
#include "apr_atomic.h" | ||||
#include "apr_thread_mutex.h" | ||||
APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) | APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) | |||
{ | { | |||
#if defined (NEED_ATOMICS_GENERIC64) | ||||
return apr__atomic_generic64_init(p); | ||||
#else | ||||
return APR_SUCCESS; | return APR_SUCCESS; | |||
#endif | ||||
} | } | |||
APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint3 2_t val) | APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint3 2_t val) | |||
{ | { | |||
#if (defined(_M_IA64) || defined(_M_AMD64)) | #if (defined(_M_IA64) || defined(_M_AMD64)) | |||
return InterlockedExchangeAdd(mem, val); | return InterlockedExchangeAdd(mem, val); | |||
#else | #else | |||
return InterlockedExchangeAdd((long *)mem, val); | return InterlockedExchangeAdd((long *)mem, val); | |||
#endif | #endif | |||
} | } | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 5 lines changed or added |