Project

General

Profile

Backport #2564 ยป 0001-re-initialize-timer_thread_-lock-cond-after-fork.patch

alk (Aliaksey Kandratsenka), 01/06/2010 10:19 PM

View differences:

thread_pthread.c
pthread_attr_setstacksize(&attr,
PTHREAD_STACK_MIN + (THREAD_DEBUG ? BUFSIZ : 0));
#endif
/* we can be called after fork. And this variables need to be re-initialized */
native_mutex_initialize(&timer_thread_lock);
native_cond_initialize(&timer_thread_cond);
native_mutex_lock(&timer_thread_lock);
err = pthread_create(&timer_thread_id, &attr, thread_timer, 0);
if (err != 0) {
    (1-1/1)