pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:2094:    struct mutex_storage *m;    struct object *o;    INT_TYPE type;       DEBUG_CHECK_THREAD();       m=THIS_MUTEX;    if(!args)    type=0;    else -  get_all_args("mutex->lock",args,"%i",&type); +  get_all_args("lock",args,"%i",&type);       switch(type)    {    default: -  bad_arg_error("mutex->lock", Pike_sp-args, args, 2, "int(0..2)", Pike_sp+1-args, +  bad_arg_error("lock", Pike_sp-args, args, 2, "int(0..2)", Pike_sp+1-args,    "Unknown mutex locking style: %"PRINTPIKEINT"d\n",type);          case 0:    case 2:    if(m->key && OB2KEY(m->key)->owner == Pike_interpreter.thread_state)    {    THREADS_FPRINTF(0,    (stderr, "Recursive LOCK k:%p, m:%p(%p), t:%p\n",    OB2KEY(m->key), m, OB2KEY(m->key)->mut,
pike.git/src/threads.c:2196:       /* No reason to release the interpreter lock here    * since we aren't calling any functions that take time.    */       m=THIS_MUTEX;       if(!args)    type=0;    else -  get_all_args("mutex->trylock",args,"%i",&type); +  get_all_args("trylock",args,"%i",&type);       switch(type)    {    default: -  bad_arg_error("mutex->trylock", Pike_sp-args, args, 2, "int(0..2)", Pike_sp+1-args, +  bad_arg_error("trylock", Pike_sp-args, args, 2, "int(0..2)", Pike_sp+1-args,    "Unknown mutex locking style: %"PRINTPIKEINT"d\n",type);       case 0:    if(m->key && OB2KEY(m->key)->owner == Pike_interpreter.thread_state)    {    Pike_error("Recursive mutex locks!\n");    }       case 2:    case 1:
pike.git/src/threads.c:2498:    struct object *key, *mutex_obj;    struct mutex_storage *mut;    struct pike_cond *c;    INT_TYPE seconds = 0, nanos = 0;       if(threads_disabled)    Pike_error("Cannot wait for conditions when threads are disabled!\n");       if (args <= 2) {    FLOAT_TYPE fsecs = 0.0; -  get_all_args("condition->wait", args, "%o.%F", &key, &fsecs); +  get_all_args("wait", args, "%o.%F", &key, &fsecs);    seconds = (INT_TYPE) fsecs;    nanos = (INT_TYPE)((fsecs - seconds)*1000000000);    } else {    /* FIXME: Support bignum nanos. */ -  get_all_args("condition->wait", args, "%o%i%i", &key, &seconds, &nanos); +  get_all_args("wait", args, "%o%i%i", &key, &seconds, &nanos);    }       if ((key->prog != mutex_key) ||    (!(OB2KEY(key)->initialized)) ||    (!(mut = OB2KEY(key)->mut))) { -  Pike_error("Bad argument 1 to condition->wait()\n"); +  Pike_error("Bad argument 1 to wait()\n");    }       if(args > 1) {    pop_n_elems(args - 1);    args = 1;    }       c = THIS_COND;       /* Unlock mutex */