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.196 2003/01/09 15:21:27 grubba Exp $ + || $Id: threads.c,v 1.197 2003/01/10 17:06:12 grubba Exp $   */      #include "global.h" - RCSID("$Id: threads.c,v 1.196 2003/01/09 15:21:27 grubba Exp $"); + RCSID("$Id: threads.c,v 1.197 2003/01/10 17:06:12 grubba Exp $");      PMOD_EXPORT int num_threads = 1;   PMOD_EXPORT int threads_disabled = 0;      #ifdef _REENTRANT   #include "threads.h"   #include "array.h"   #include "mapping.h"   #include "object.h"   #include "pike_macros.h"
pike.git/src/threads.c:1397:   {    int c = 0;    if(args>0 && Pike_sp[-args].type == PIKE_T_INT)    c = Pike_sp[-args].u.integer;    pop_n_elems (args);    if(c != 'O') {    push_undefined();    return;    }    push_constant_text ("Thread.Thread("); -  push_int64((ptrdiff_t)THIS_THREAD->id); +  push_int64(((char *)THREAD_T_TO_PTR(THIS_THREAD->id))-(char *)0);    push_constant_text (")");    f_add (3);   }      /*! @decl static int id_number()    *!    *! Returns an id number identifying the thread.    *!    *! @note    *! This function was added in Pike 7.2.204.    */   void f_thread_id_id_number(INT32 args)   {    pop_n_elems(args); -  push_int64((ptrdiff_t)THIS_THREAD->id); +  push_int64(((char *)THREAD_T_TO_PTR(THIS_THREAD->id))-(char *)0);   }      /*! @decl mixed result()    *!    *! Waits for the thread to complete, and then returns    *! the value returned from the thread function.    */   static void f_thread_id_result(INT32 args)   {    struct thread_state *th=THIS_THREAD;