source: CIVL/examples/pthread/cprover/46_monabsex2_vs_true.c@ 0fdf4bd

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since 0fdf4bd was e3151da, checked in by Ziqing Luo <ziqing@…>, 12 years ago

re-organized example directory

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@1763 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 296 bytes
Line 
1#include <pthread.h>
2
3#define assert(e) { if(!(e)) { ERROR: goto ERROR; (void)0; } }
4
5_Bool s = 0;
6__thread _Bool l = 0;
7
8void* thr1(void* arg)
9{
10 assert(!l || s);
11 s = s || 1;
12 l = 1; //overapproximates
13
14 return 0;
15}
16
17int main()
18{
19 pthread_t t;
20
21 while(1) pthread_create(&t, 0, thr1, 0);
22}
23
Note: See TracBrowser for help on using the repository browser.