Beispiel #1
0
void bio_submit(struct bio *bio)
{
	mutex_lock(&ide_bio_queue_mutex);
	list_add_tail(&bio->link, &ide_bio_queue);
	condition_notify(&ide_bio_queue_condition);
	mutex_unlock(&ide_bio_queue_mutex);
}
Beispiel #2
0
static PyObject*
ConditionObject_notify(ConditionObject *self, PyObject *args, PyObject *kwargs)
{
    int num = 1;
    static char *keywords[] = {"n", NULL};

    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:notify", keywords, &num)) {
        return NULL;
    }
    DEBUG("self:%p", self);
    //TODO check nagative value
    return condition_notify(self, num);
}
Beispiel #3
0
static PyObject*
ConditionObject_notify_all(ConditionObject *self, PyObject *args, PyObject *kwargs)
{
    DEBUG("self:%p", self);
    return condition_notify(self, Py_SIZE(self->waiters));
}