@@ -531,16 +531,10 @@ inline int pthread_rwlock_wrlock(pthread_rwlock_t *lock)
531
531
return 0 ; // we never fail
532
532
}
533
533
534
- /* FUNCTION: pthread_create */
535
-
536
- #ifndef __CPROVER_PTHREAD_H_INCLUDED
537
- #include <pthread.h>
538
- #define __CPROVER_PTHREAD_H_INCLUDED
539
- #endif
534
+ /* FUNCTION: __spawned_thread */
540
535
541
536
extern __CPROVER_bool __CPROVER_threads_exited [];
542
537
extern __CPROVER_thread_local unsigned long __CPROVER_thread_id ;
543
- extern unsigned long __CPROVER_next_thread_id ;
544
538
545
539
extern __CPROVER_thread_local const void * __CPROVER_thread_keys [];
546
540
extern __CPROVER_thread_local void (* __CPROVER_thread_key_dtors [])(void * );
@@ -595,6 +589,26 @@ __CPROVER_HIDE:;
595
589
__CPROVER_threads_exited [this_thread_id ] = 1 ;
596
590
}
597
591
592
+ /* FUNCTION: pthread_create */
593
+
594
+ #ifndef __CPROVER_PTHREAD_H_INCLUDED
595
+ # include <pthread.h>
596
+ # define __CPROVER_PTHREAD_H_INCLUDED
597
+ #endif
598
+
599
+ extern unsigned long __CPROVER_next_thread_id ;
600
+
601
+ void __spawned_thread (
602
+ unsigned long this_thread_id ,
603
+ #if 0
604
+ // Destructor support is disabled as it is too expensive due to its extensive
605
+ // use of shared variables.
606
+ void (* * thread_key_dtors )(void * ),
607
+ #endif
608
+ unsigned long next_thread_key ,
609
+ void * (* start_routine )(void * ),
610
+ void * arg );
611
+
598
612
inline int pthread_create (
599
613
pthread_t * thread , // must not be null
600
614
const pthread_attr_t * attr , // may be null
0 commit comments