lkml.org 
[lkml]   [2015]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH 5 1/7] kmod - add workqueue service thread store
Date
Ian Kent <raven@themaw.net> wrote:

> +static struct umh_wq_entry *umh_wq_find_entry(int token)
> +{
> + struct umh_wq_entry *this, *entry;
> + struct hlist_head *bucket;
> + unsigned int hash;
> +
> + hash = hash_32((unsigned long) token, UMH_WQ_HASH_SHIFT);
> + bucket = &umh_wq_hash[hash];
> +
> + entry = ERR_PTR(-ENOENT);
> + if (hlist_empty(bucket))
> + goto out;
> +
> + hlist_for_each_entry(this, bucket, umh_wq_hlist) {
> + if (this->token == token) {
> + entry = this;
> + break;
> + }
> + }
> +out:
> + return entry;
> +}

Can "struct umh_wq_entry *" be used as the token?

David


\
 
 \ /
  Last update: 2015-04-02 15:21    [W:0.109 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site