@@ -531,16 +531,10 @@ inline int pthread_rwlock_wrlock(pthread_rwlock_t *lock)
531531 return 0 ; // we never fail
532532}
533533
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 */
540535
541536extern __CPROVER_bool __CPROVER_threads_exited [];
542537extern __CPROVER_thread_local unsigned long __CPROVER_thread_id ;
543- extern unsigned long __CPROVER_next_thread_id ;
544538
545539extern __CPROVER_thread_local const void * __CPROVER_thread_keys [];
546540extern __CPROVER_thread_local void (* __CPROVER_thread_key_dtors [])(void * );
@@ -595,6 +589,26 @@ __CPROVER_HIDE:;
595589 __CPROVER_threads_exited [this_thread_id ] = 1 ;
596590}
597591
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+
598612inline int pthread_create (
599613 pthread_t * thread , // must not be null
600614 const pthread_attr_t * attr , // may be null
0 commit comments