Windows-port: some special code and switches for statical libraries added
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@73 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
@@ -382,6 +382,12 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
|
||||
int retCode = 0;
|
||||
int persistent = -1;
|
||||
ThreadPool *tp = ( ThreadPool * ) arg;
|
||||
//leuk_he allow static linking
|
||||
#ifdef WIN32
|
||||
#ifdef PTW32_STATIC_LIB
|
||||
pthread_win32_thread_attach_np();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
assert( tp != NULL );
|
||||
|
||||
@@ -449,7 +455,12 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
|
||||
tp->totalThreads--;
|
||||
ithread_cond_broadcast( &tp->start_and_shutdown );
|
||||
ithread_mutex_unlock( &tp->mutex );
|
||||
|
||||
//leuk_he
|
||||
#ifdef WIN32
|
||||
#ifdef PTW32_STATIC_LIB
|
||||
pthread_win32_thread_detach_np ();
|
||||
#endif
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -478,6 +489,12 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
|
||||
ithread_cond_broadcast( &tp->start_and_shutdown );
|
||||
|
||||
ithread_mutex_unlock( &tp->mutex );
|
||||
//leuk_he
|
||||
#ifdef WIN32
|
||||
#ifdef PTW32_STATIC_LIB
|
||||
pthread_win32_thread_detach_np ();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
} else {
|
||||
@@ -705,6 +722,12 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
|
||||
if( tp == NULL ) {
|
||||
return EINVAL;
|
||||
}
|
||||
//leuk_he
|
||||
#ifdef WIN32
|
||||
#ifdef PTW32_STATIC_LIB
|
||||
pthread_win32_process_attach_np();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
retCode += ithread_mutex_init( &tp->mutex, NULL );
|
||||
assert( retCode == 0 );
|
||||
|
Reference in New Issue
Block a user