Skip to content

Commit e864728

Browse files
Include goblint header
1 parent 4e04bc7 commit e864728

File tree

12 files changed

+33
-21
lines changed

12 files changed

+33
-21
lines changed

tests/regression/86-barrier/01-simple.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include<pthread.h>
33
#include<stdio.h>
44
#include<unistd.h>
5+
#include<goblint.h>
56

67
int g;
78

@@ -12,9 +13,9 @@ int main(int argc, char const *argv[])
1213
{
1314
int top;
1415
int i = 0;
15-
16+
1617
pthread_barrier_init(&barrier, NULL, 2);
17-
18+
1819
if(top) {
1920
pthread_barrier_wait(&barrier);
2021
// Unreachable

tests/regression/86-barrier/02-more.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include<pthread.h>
33
#include<stdio.h>
44
#include<unistd.h>
5+
#include<goblint.h>
56

67
int g;
78

@@ -26,12 +27,12 @@ int main(int argc, char const *argv[])
2627
{
2728
int top;
2829
int i = 0;
29-
30+
3031
pthread_barrier_init(&barrier, NULL, 3);
3132

3233
pthread_t t1;
3334
pthread_create(&t1,NULL,f1,NULL);
34-
35+
3536
if(top) {
3637
pthread_barrier_wait(&barrier);
3738
// Unreachable

tests/regression/86-barrier/03-problem.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include<pthread.h>
33
#include<stdio.h>
44
#include<unistd.h>
5+
#include<goblint.h>
56

67
int g;
78

@@ -17,12 +18,12 @@ int main(int argc, char const *argv[])
1718
{
1819
int top;
1920
int i = 0;
20-
21+
2122
pthread_barrier_init(&barrier, NULL, 2);
2223

2324
pthread_t t1;
2425
pthread_create(&t1,NULL,f1,NULL);
25-
26+
2627
if(top) {
2728
pthread_barrier_wait(&barrier);
2829
// Live!

tests/regression/86-barrier/04-challenge.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include<pthread.h>
33
#include<stdio.h>
44
#include<unistd.h>
5+
#include<goblint.h>
56

67
int g;
78

@@ -26,12 +27,12 @@ int main(int argc, char const *argv[])
2627
{
2728
int top;
2829
int i = 0;
29-
30+
3031
pthread_barrier_init(&barrier, NULL, 3);
3132

3233
pthread_t t1;
3334
pthread_create(&t1,NULL,f1,NULL);
34-
35+
3536
if(top) {
3637
pthread_barrier_wait(&barrier);
3738
// Unreachable

tests/regression/86-barrier/05-mhp-not-enough.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include<pthread.h>
33
#include<stdio.h>
44
#include<unistd.h>
5+
#include<goblint.h>
56

67
int g;
78

@@ -21,19 +22,19 @@ int main(int argc, char const *argv[])
2122
{
2223
int top;
2324
int i = 0;
24-
25+
2526
pthread_barrier_init(&barrier, NULL, 3);
2627

2728
pthread_t t1;
2829
pthread_create(&t1,NULL,f1,NULL);
29-
30+
3031
if(top) {
3132
pthread_barrier_wait(&barrier);
3233
// Unreachable
3334
i = 1;
3435
} else {
3536
pthread_t t2;
36-
pthread_create(&t2,NULL,f1,NULL);
37+
pthread_create(&t2,NULL,f1,NULL);
3738
}
3839

3940

tests/regression/86-barrier/06-multiprocess.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include<pthread.h>
33
#include<stdio.h>
44
#include<unistd.h>
5+
#include<goblint.h>
56

67
int g;
78

@@ -12,15 +13,15 @@ int main(int argc, char const *argv[])
1213
{
1314
int top;
1415
int i = 0;
15-
16+
1617
pthread_barrierattr_t barattr;
1718
pthread_barrierattr_setpshared(&barattr, PTHREAD_PROCESS_SHARED);
1819

1920
pthread_barrier_init(&barrier, &barattr, 2);
2021

2122
fork();
2223
pthread_t t1;
23-
24+
2425
if(top) {
2526
pthread_barrier_wait(&barrier);
2627
// Reachable if both processes go into this branch

tests/regression/86-barrier/07-lockset.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include<pthread.h>
33
#include<stdio.h>
44
#include<unistd.h>
5+
#include<goblint.h>
56

67
int g;
78

@@ -19,12 +20,12 @@ int main(int argc, char const *argv[])
1920
{
2021
int top;
2122
int i = 0;
22-
23+
2324
pthread_barrier_init(&barrier, NULL, 2);
2425

2526
pthread_t t1;
2627
pthread_create(&t1,NULL,f1,NULL);
27-
28+
2829
if(top) {
2930
pthread_mutex_lock(&mutex);
3031
pthread_barrier_wait(&barrier);

tests/regression/86-barrier/08-lockset-more.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include<pthread.h>
33
#include<stdio.h>
44
#include<unistd.h>
5+
#include<goblint.h>
56

67
int g;
78

@@ -26,16 +27,16 @@ int main(int argc, char const *argv[])
2627
{
2728
int top;
2829
int i = 0;
29-
30+
3031
pthread_barrier_init(&barrier, NULL, 2);
3132

3233
pthread_t t1;
3334
pthread_create(&t1,NULL,f1,NULL);
3435

3536
pthread_t t2;
3637
pthread_create(&t2,NULL,f2,NULL);
37-
38-
38+
39+
3940
if(top) {
4041
pthread_barrier_wait(&barrier);
4142
i = 1;

tests/regression/86-barrier/09-race.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include<pthread.h>
33
#include<stdio.h>
44
#include<unistd.h>
5+
#include<goblint.h>
56

67
int g;
78
int h;
@@ -21,7 +22,7 @@ int main(int argc, char const *argv[])
2122
{
2223
int top;
2324
int i = 0;
24-
25+
2526
pthread_barrier_init(&barrier, NULL, 2);
2627

2728
pthread_t t1;

tests/regression/86-barrier/10-several.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include<pthread.h>
33
#include<stdio.h>
44
#include<unistd.h>
5+
#include<goblint.h>
56

67
int g;
78

@@ -17,7 +18,7 @@ int main(int argc, char const *argv[])
1718
{
1819
int top;
1920
int i = 0;
20-
21+
2122
pthread_barrier_init(&barrier, NULL, 4);
2223

2324
pthread_t t1, t2, t3;

0 commit comments

Comments
 (0)