pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1985:    *! @[Mutex], @[Condition], @[this_thread()]    */   void f_thread_create(INT32 args)   {    struct thread_starter arg;    struct thread_state *thread_state =    (struct thread_state *)Pike_fp->current_storage;    int tmp;       if (args < 1) { -  SIMPLE_TOO_FEW_ARGS_ERROR("create", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("create", 1);    }    if (!callablep(Pike_sp - args)) {    SIMPLE_ARG_TYPE_ERROR("create", 1, "function");    }       if (thread_state->status != THREAD_NOT_STARTED) {    Pike_error("Threads can not be restarted (status:%d).\n",    thread_state->status);    }   
pike.git/src/threads.c:2068: Inside #if defined(UNIX_THREADS)
   *!    *! @fixme    *! Document this function    */   void f_thread_set_concurrency(INT32 args)   {    int c=1;    if(args)    c=Pike_sp[-args].u.integer;    else -  SIMPLE_TOO_FEW_ARGS_ERROR("thread_set_concurrency", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("thread_set_concurrency", 1);    pop_n_elems(args);    num_lwps=c;    th_setconcurrency(c);   }   #endif      /*! @decl Thread.Thread this_thread()    *!    *! This function returns the object that identifies this thread.    *!
pike.git/src/threads.c:3159:    */   void f_thread_local_set(INT32 args)   {    struct svalue key;    struct mapping *m;    SET_SVAL(key, T_INT, NUMBER_NUMBER, integer,    ((struct thread_local_var *)CURRENT_STORAGE)->id);    if(args>1)    pop_n_elems(args-1);    else if(args<1) -  SIMPLE_TOO_FEW_ARGS_ERROR("Thread.Local.set", 1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("Thread.Local.set", 1);       if(Pike_interpreter.thread_state == NULL)    Pike_error("Trying to set Thread.Local without thread!\n");       if((m = Pike_interpreter.thread_state->thread_locals) == NULL)    m = Pike_interpreter.thread_state->thread_locals =    allocate_mapping(4);       mapping_insert(m, &key, &Pike_sp[-1]);   }