On 06/26/2012 10:45 AM, levin li wrote:
> +     pthread_mutex_lock(&req->wait_mutex);
> +     while (!req->done)
> +             pthread_cond_wait(&req->wait_cond, &req->wait_mutex);
> +     pthread_mutex_unlock(&req->wait_mutex);

This might be replaced by a more efficient internal eventfd. For e.g,
here we can read(done_fd) to sleep and in req_done(), just
write(done_fd) to wake it up.

Thanks,
Yuan

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to