pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: threads.c,v 1.213 2003/04/01 19:12:09 mast Exp $ + || $Id: threads.c,v 1.214 2003/04/01 19:41:13 mast Exp $   */      #ifndef CONFIGURE_TEST   #include "global.h" - RCSID("$Id: threads.c,v 1.213 2003/04/01 19:12:09 mast Exp $"); + RCSID("$Id: threads.c,v 1.214 2003/04/01 19:41:13 mast Exp $");      PMOD_EXPORT int num_threads = 1;   PMOD_EXPORT int threads_disabled = 0;   #endif /* !CONFIGURE_TEST */      #ifdef _REENTRANT      #ifndef CONFIGURE_TEST      #include "threads.h"
pike.git/src/threads.c:40: Inside #if defined(HAVE_SYS_PRCTL_H)
     #ifdef HAVE_SYS_PRCTL_H   #include <sys/prctl.h>   #endif /* HAVE_SYS_PRCTL_H */      PMOD_EXPORT int live_threads = 0, disallow_live_threads = 0;   PMOD_EXPORT COND_T live_threads_change;   PMOD_EXPORT COND_T threads_disabled_change;   PMOD_EXPORT size_t thread_stack_size=256 * 1204;    + PMOD_EXPORT void thread_low_error (int errcode) + { +  Pike_fatal ("Unexpected error from thread function: %d\n", errcode); + } +    #else   #include "pike_threadlib.h"   #endif /* !CONFIGURE_TEST */      /* SCO magic... */   int __thread_sys_behavior = 1;      #ifndef CONFIGURE_TEST      #if !defined(HAVE_PTHREAD_ATFORK) && !defined(th_atfork)
pike.git/src/threads.c:723: Inside #if defined(HAVE_BROKEN_LINUX_THREAD_EUID)
  #endif    setegid(arg.egid);    seteuid(arg.euid);   #if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)    if (prctl(PR_SET_DUMPABLE, current) == -1)    Pike_fatal ("Didn't expect prctl to go wrong. errno=%d\n", errno);   #endif    }   #endif /* HAVE_BROKEN_LINUX_THREAD_EUID */    -  if((tmp=mt_lock_interpreter())) -  Pike_fatal("Failed to lock interpreter, return value=%d, errno=%d\n",tmp, - #ifdef __NT__ -  GetLastError() - #else -  errno - #endif -  ); +  mt_lock_interpreter();      #if defined(PIKE_DEBUG)    if(d_flag) {    THREAD_T self = th_self();    if( !th_equal(arg.thread_state->id, self) )    Pike_fatal("Current thread is wrong. %lx %lx\n",    (long)arg.thread_state->id, (long)self);    }   #endif