Skip to content
This repository was archived by the owner on Oct 3, 2021. It is now read-only.

Commit e5a8805

Browse files
missing atomic defininitions
1 parent 9f6e36f commit e5a8805

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

c/pthread-ext/02_inc_cas.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
extern void abort(void);
22
#include <assert.h>
33
void reach_error() { assert(0); }
4+
extern void __VERIFIER_atomic_begin(void);
5+
extern void __VERIFIER_atomic_end(void);
46

57
//http://www.ibm.com/developerworks/java/library/j-jtp04186/index.html
68
//Listing 2. A nonblocking counter using CAS

c/pthread-ext/02_inc_cas.i

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ extern void __assert (const char *__assertion, const char *__file, int __line)
1010
__attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1111

1212
void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "02_inc_cas.c", 3, __extension__ __PRETTY_FUNCTION__); })); }
13+
extern void __VERIFIER_atomic_begin(void);
14+
extern void __VERIFIER_atomic_end(void);
1315
typedef unsigned char __u_char;
1416
typedef unsigned short int __u_short;
1517
typedef unsigned int __u_int;

0 commit comments

Comments
 (0)