"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "atomic/os390/atomic.c" between
apr-1.6.5.tar.bz2 and apr-1.7.0.tar.bz2

About: APR (Apache Portable Runtime) project offers software libraries that provide a predictable and consistent interface to underlying platform-specific implementations (APR core library).

atomic.c  (apr-1.6.5.tar.bz2):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 <stdlib.h> #include <stdlib.h>
apr_status_t apr_atomic_init(apr_pool_t *p) 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_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val) apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
{ {
apr_uint32_t old, new_val; apr_uint32_t old, new_val;
old = *mem; /* old is automatically updated on cs failure */ old = *mem; /* old is automatically updated on cs failure */
do { do {
new_val = old + val; new_val = old + val;
} while (__cs(&old, (cs_t *)mem, new_val)); } while (__cs(&old, (cs_t *)mem, new_val));
 End of changes. 3 change blocks. 
2 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)