pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:2468:    struct mutex_storage *m = THIS_MUTEX;    int c = 0;    if(args>0 && TYPEOF(Pike_sp[-args]) == PIKE_T_INT)    c = Pike_sp[-args].u.integer;    pop_n_elems (args);    if(c != 'O') {    push_undefined();    return;    }    if (m->key && OB2KEY(m->key)->owner) { -  push_static_text("Thread.Mutex(/*locked by 0x"); +  push_text("Thread.Mutex(/*locked by 0x");    push_int64(PTR_TO_INT(THREAD_T_TO_PTR(OB2KEY(m->key)->owner->id)));    f_int2hex(1); -  push_static_text("*/)"); +  push_text("*/)");    f_add(3);    } else {    push_text("Thread.Mutex()");    }   }      void init_mutex_obj(struct object *UNUSED(o))   {    co_init(& THIS_MUTEX->condition);    THIS_MUTEX->key=0;
pike.git/src/threads.c:2895:   void f_thread_id__sprintf (INT32 args)   {    int c = 0;    if(args>0 && TYPEOF(Pike_sp[-args]) == PIKE_T_INT)    c = Pike_sp[-args].u.integer;    pop_n_elems (args);    if(c != 'O') {    push_undefined();    return;    } -  push_static_text ("Thread.Thread(0x"); +  push_text ("Thread.Thread(0x");    push_int64(PTR_TO_INT(THREAD_T_TO_PTR(THIS_THREAD->id)));    f_int2hex(1); -  push_static_text (")"); +  push_text (")");    f_add (3);   }      /*! @decl protected int id_number()    *!    *! Returns an id number identifying the thread.    *!    *! @note    *! This function was added in Pike 7.2.204.    */