Branch: Tag:

2002-08-15

2002-08-15 14:50:28 by Marcus Comstedt <marcus@mc.pp.se>

Rename fatal -> Pike_fatal.

Rev: src/apply_low.h:1.7
Rev: src/array.c:1.129
Rev: src/array.h:1.41
Rev: src/backend.cmod:1.27
Rev: src/bignum.c:1.25
Rev: src/block_alloc.h:1.41
Rev: src/builtin.cmod:1.90
Rev: src/builtin_functions.c:1.435
Rev: src/callback.c:1.26
Rev: src/code/ia32.c:1.21
Rev: src/code/ppc32.c:1.16
Rev: src/code/ppc32.h:1.14
Rev: src/code/sparc.c:1.11
Rev: src/code/sparc.h:1.13
Rev: src/compilation.h:1.28
Rev: src/constants.c:1.38
Rev: src/cpp.c:1.102
Rev: src/cyclic.c:1.6
Rev: src/dlopen.c:1.32
Rev: src/docode.c:1.144
Rev: src/dynamic_buffer.c:1.16
Rev: src/dynamic_load.c:1.64
Rev: src/encode.c:1.151
Rev: src/error.c:1.86
Rev: src/fd_control.c:1.41
Rev: src/fdlib.c:1.52
Rev: src/fdlib.h:1.41
Rev: src/fsort_template.h:1.11
Rev: src/gc.c:1.185
Rev: src/gc.h:1.90
Rev: src/hashtable.c:1.11
Rev: src/interpret.c:1.263
Rev: src/interpret.h:1.110
Rev: src/interpret_functions.h:1.105
Rev: src/interpreter.h:1.76
Rev: src/iterators.cmod:1.26
Rev: src/language.yacc:1.289
Rev: src/las.c:1.297
Rev: src/lex.c:1.105
Rev: src/lexer.h:1.38
Rev: src/main.c:1.150
Rev: src/mapping.c:1.149
Rev: src/module_support.c:1.46
Rev: src/modules/Gmp/mpf.cmod:1.9
Rev: src/modules/Gmp/mpq.cmod:1.10
Rev: src/modules/Gmp/mpz_glue.c:1.107
Rev: src/modules/HTTPLoop/cache.c:1.17
Rev: src/modules/HTTPLoop/requestobject.c:1.21
Rev: src/modules/Image/colors.c:1.61
Rev: src/modules/Image/colortable.c:1.109
Rev: src/modules/Image/colortable_lookup.h:1.18
Rev: src/modules/Image/encodings/bmp.c:1.35
Rev: src/modules/Image/font.c:1.72
Rev: src/modules/Image/image_module.c:1.14
Rev: src/modules/Image/layers.c:1.79
Rev: src/modules/Odbc/odbc.c:1.30
Rev: src/modules/Oracle/oracle.c:1.70
Rev: src/modules/PDF/pdf_module.c:1.11
Rev: src/modules/Parser/html.c:1.152
Rev: src/modules/Parser/parser.c:1.14
Rev: src/modules/Perl/perlmod.c:1.25
Rev: src/modules/Pipe/pipe.c:1.49
Rev: src/modules/_Charset/charsetmod.c:1.35
Rev: src/modules/_Charset/iso2022.c:1.23
Rev: src/modules/files/file.c:1.239
Rev: src/modules/files/sendfile.c:1.57
Rev: src/modules/files/socket.c:1.63
Rev: src/modules/files/stat.c:1.22
Rev: src/modules/files/udp.c:1.37
Rev: src/modules/spider/xml.c:1.52
Rev: src/modules/sprintf/sprintf.c:1.93
Rev: src/modules/sybase/sybase.c:1.9
Rev: src/multiset.c:1.50
Rev: src/multiset.h:1.25
Rev: src/object.c:1.203
Rev: src/object.h:1.71
Rev: src/opcodes.c:1.122
Rev: src/operators.c:1.159
Rev: src/peep.c:1.72
Rev: src/pike_error.h:1.19
Rev: src/pike_macros.h:1.31
Rev: src/pike_memory.c:1.120
Rev: src/pike_search.c:1.9
Rev: src/pike_search_engine.c:1.8
Rev: src/pike_search_engine2.c:1.5
Rev: src/pike_threadlib.h:1.16
Rev: src/pike_types.c:1.194
Rev: src/pike_types.h:1.79
Rev: src/port.c:1.52
Rev: src/post_modules/GTK/source/support.c:1.33
Rev: src/post_modules/Unicode/normalize.c:1.9
Rev: src/preprocessor.h:1.51
Rev: src/program.c:1.441
Rev: src/queue.c:1.8
Rev: src/rbtree.c:1.10
Rev: src/rbtree_low.h:1.2
Rev: src/signal_handler.c:1.225
Rev: src/stralloc.c:1.143
Rev: src/stralloc.h:1.66
Rev: src/svalue.c:1.144
Rev: src/svalue.h:1.106
Rev: src/threads.c:1.180

1:   #include "global.h" - RCSID("$Id: threads.c,v 1.179 2002/06/17 15:42:39 grubba Exp $"); + RCSID("$Id: threads.c,v 1.180 2002/08/15 14:49:26 marcus Exp $");      PMOD_EXPORT int num_threads = 1;   PMOD_EXPORT int threads_disabled = 0;
118: Inside #if defined(SIMULATE_COND_WITH_EVENT) and #if defined(PIKE_DEBUG)
     #ifdef PIKE_DEBUG    if(me.next) -  fatal("Wait on event return prematurely!!\n"); +  Pike_fatal("Wait on event return prematurely!!\n");   #endif       return 0;
340: Inside #if defined(PIKE_DEBUG)
   }   #ifdef PIKE_DEBUG    } else { -  fatal("exit_threads_disable() called too many times!\n"); +  Pike_fatal("exit_threads_disable() called too many times!\n");   #endif /* PIKE_DEBUG */    }   }
430: Inside #if defined(PIKE_DEBUG)
   unsigned INT32 h = thread_table_hash(&s->id);   #ifdef PIKE_DEBUG    if(h>=THREAD_TABLE_SIZE) -  fatal("thread_table_hash failed miserably!\n"); +  Pike_fatal("thread_table_hash failed miserably!\n");    if(thread_state_for_id(s->id))    {    if(thread_state_for_id(s->id) == s) -  fatal("Registring thread twice!\n"); +  Pike_fatal("Registring thread twice!\n");    else -  fatal("Forgot to unregister thread!\n"); +  Pike_fatal("Forgot to unregister thread!\n");    }   /* dumpmem("thread_table_insert",&s->id, sizeof(THREAD_T)); */   #endif
471: Inside #if defined(PIKE_DEBUG)
  #endif   #ifdef PIKE_DEBUG    if(h>=THREAD_TABLE_SIZE) -  fatal("thread_table_hash failed miserably!\n"); +  Pike_fatal("thread_table_hash failed miserably!\n");   #endif    mt_lock( & thread_table_lock );    if(thread_table_chains[h] == NULL)
624: Inside #if defined(DEBUG)
  #ifdef DEBUG    if(thread_for_id(th_self()) != Pike_interpreter.thread_id) {    debug_list_all_threads(); -  fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ; +  Pike_fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ;    }       if(Pike_interpreter.backlink != OBJ2THREAD(Pike_interpreter.thread_id)) -  fatal("Hashlink is wrong!\n"); +  Pike_fatal("Hashlink is wrong!\n");   #endif       THREADS_ALLOW();
639:    DO_IF_DEBUG(    if(thread_for_id(th_self()) != Pike_interpreter.thread_id) {    debug_list_all_threads(); -  fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ; +  Pike_fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ;    } )   }   
663:   #endif /* HAVE_BROKEN_LINUX_THREAD_EUID */       if((tmp=mt_lock_interpreter())) -  fatal("Failed to lock interpreter, return value=%d, errno=%d\n",tmp, +  Pike_fatal("Failed to lock interpreter, return value=%d, errno=%d\n",tmp,   #ifdef __NT__    GetLastError()   #else
687: Inside #if defined(PIKE_DEBUG)
   THREAD_T self = th_self();       if( Pike_interpreter.thread_id && !th_equal( OBJ2THREAD(Pike_interpreter.thread_id)->id, self) ) -  fatal("Current thread is wrong. %lx %lx\n", +  Pike_fatal("Current thread is wrong. %lx %lx\n",    (long)OBJ2THREAD(Pike_interpreter.thread_id)->id, (long)self);       if(thread_for_id(th_self()) != Pike_interpreter.thread_id) {    debug_list_all_threads(); -  fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ; +  Pike_fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ;    }    }   #endif
708:    DO_IF_DEBUG(    if(thread_for_id(th_self()) != Pike_interpreter.thread_id) {    debug_list_all_threads(); -  fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ; +  Pike_fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ;    } )      
738:    DO_IF_DEBUG(    if(thread_for_id(th_self()) != Pike_interpreter.thread_id) {    debug_list_all_threads(); -  fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ; +  Pike_fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ;    } )      
959:    DO_IF_DEBUG(    if(thread_for_id(th_self()) != Pike_interpreter.thread_id) {    debug_list_all_threads(); -  fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ; +  Pike_fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ;    } )       m=THIS_MUTEX;
1004:    DO_IF_DEBUG(    if(thread_for_id(th_self()) != Pike_interpreter.thread_id) {    debug_list_all_threads(); -  fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ; +  Pike_fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ;    } )       if(m->key)
1029:    DO_IF_DEBUG(    if(thread_for_id(th_self()) != Pike_interpreter.thread_id) {    debug_list_all_threads(); -  fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ; +  Pike_fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id) ;    } )       THREADS_FPRINTF(1, (stderr, "LOCK k:%08x, m:%08x(%08x), t:%08x\n",
1187: Inside #if defined(PIKE_DEBUG)
     #ifdef PIKE_DEBUG    if(mut->key != o) -  fatal("Mutex unlock from wrong key %p != %p!\n",THIS_KEY->mut->key,o); +  Pike_fatal("Mutex unlock from wrong key %p != %p!\n",THIS_KEY->mut->key,o);   #endif    mut->key=0;    if (THIS_KEY->owner) {
1646:       do    { - /* if(farmers == me) fatal("Ouch!\n"); */ + /* if(farmers == me) Pike_fatal("Ouch!\n"); */   /* fprintf(stderr, "farm_begin %p\n",me ); */    me->harvest( me->field );   /* fprintf(stderr, "farm_end %p\n", me); */
1690:       if (!me) {    /* Out of memory */ -  fatal("new_farmer(): Out of memory!\n"); +  Pike_fatal("new_farmer(): Out of memory!\n");    }       dmalloc_accept_leak(me);
1712:      PMOD_EXPORT void th_farm(void (*fun)(void *), void *here)   { -  if(!fun) fatal("The farmers don't known how to handle empty fields\n"); +  if(!fun) Pike_fatal("The farmers don't known how to handle empty fields\n");    mt_lock( &rosie );    if(farmers)    {
1798: Inside #if defined(PIKE_DEBUG)
   mutex_key->flags|=PROGRAM_DESTRUCT_IMMEDIATE;   #ifdef PIKE_DEBUG    if(!mutex_key) -  fatal("Failed to initialize mutex_key program!\n"); +  Pike_fatal("Failed to initialize mutex_key program!\n");   #endif       START_NEW_PROGRAM_ID(THREAD_MUTEX);
1858:    add_ref(thread_local_prog);    end_class("thread_local", 0);    if(!thread_local_prog) -  fatal("Failed to initialize thread_local program!\n"); +  Pike_fatal("Failed to initialize thread_local program!\n");    ADD_EFUN("thread_local", f_thread_local,    tFunc(tNone,tObjIs_THREAD_LOCAL),    OPT_EXTERNAL_DEPEND);
1904:    add_integer_constant("THREAD_EXITED", THREAD_EXITED, 0);       if(!mutex_key) -  fatal("Failed to initialize thread program!\n"); +  Pike_fatal("Failed to initialize thread program!\n");       Pike_interpreter.thread_id=clone_object(thread_id_prog,0);    SWAP_OUT_THREAD(OBJ2THREAD(Pike_interpreter.thread_id)); /* Init struct */