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.218 2003/06/26 08:28:17 tomas Exp $ + || $Id: threads.c,v 1.219 2003/06/30 17:06:10 mast Exp $   */      #ifndef CONFIGURE_TEST   #include "global.h" - RCSID("$Id: threads.c,v 1.218 2003/06/26 08:28:17 tomas Exp $"); + RCSID("$Id: threads.c,v 1.219 2003/06/30 17:06:10 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:1451:   {    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(((char *)THREAD_T_TO_PTR(THIS_THREAD->id))-(char *)0); +  push_int64(PTR_TO_INT(THREAD_T_TO_PTR(THIS_THREAD->id)));    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(((char *)THREAD_T_TO_PTR(THIS_THREAD->id))-(char *)0); +  push_int64(PTR_TO_INT(THREAD_T_TO_PTR(THIS_THREAD->id)));   }      /*! @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;