source: CIVL/examples/pthread/cprover/46_monabsex2_vs_true.c@ 1aaefd4

1.23 2.0 main test-branch
Last change on this file since 1aaefd4 was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 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.