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.252 2006/08/09 01:20:33 nilsson Exp $ + || $Id: threads.c,v 1.253 2007/06/09 18:02:14 mast Exp $   */    - #ifndef CONFIGURE_TEST +    #include "global.h"      PMOD_EXPORT int num_threads = 1;   PMOD_EXPORT int threads_disabled = 0; - #endif /* !CONFIGURE_TEST */ +       /* #define PICKY_MUTEX */      #ifdef _REENTRANT    -  + #include "pike_error.h" +    #ifndef CONFIGURE_TEST      /* #define VERBOSE_THREADS_DEBUG */      #include "threads.h"   #include "array.h"   #include "mapping.h"   #include "object.h"   #include "pike_macros.h"   #include "callback.h"
pike.git/src/threads.c:59: Inside #if undefined(PIKE_THREAD_C_STACK_SIZE)
     #ifndef PIKE_THREAD_C_STACK_SIZE   #define PIKE_THREAD_C_STACK_SIZE (256 * 1024)   #endif      PMOD_EXPORT size_t thread_stack_size=PIKE_THREAD_C_STACK_SIZE;      PMOD_EXPORT void thread_low_error (int errcode, const char *cmd,    const char *fname, int lineno)   { + #ifdef CONFIGURE_TEST +  fprintf (stderr, "%s:%d: %s\n" +  "Unexpected error from thread function: %d\n", +  fname, lineno, cmd, errcode); +  abort(); + #else    Pike_fatal ("%s:%d: %s\n"    "Unexpected error from thread function: %d\n",    fname, lineno, cmd, errcode); -  + #endif   }      /* SCO magic... */   int __thread_sys_behavior = 1;      #ifndef CONFIGURE_TEST      #if !defined(HAVE_PTHREAD_ATFORK) && !defined(th_atfork)   #include "callback.h"   #define PIKE_USE_OWN_ATFORK