Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350288
b: refs/heads/master
c: 4e8f0a6
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed Jan 24, 2013
1 parent 52287e7 commit af33441
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 38db41d984f17938631420ff78160dda7f182d24
refs/heads/master: 4e8f0a609677a25f504527e50981df146c5b3d08
12 changes: 5 additions & 7 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ enum {
/* struct worker is defined in workqueue_internal.h */

struct worker_pool {
struct global_cwq *gcwq; /* I: the owning gcwq */
spinlock_t lock; /* the pool lock */
unsigned int cpu; /* I: the associated cpu */
int id; /* I: pool ID */
Expand Down Expand Up @@ -451,11 +450,6 @@ static DEFINE_IDR(worker_pool_idr);

static int worker_thread(void *__worker);

static int std_worker_pool_pri(struct worker_pool *pool)
{
return pool - pool->gcwq->pools;
}

static struct global_cwq *get_gcwq(unsigned int cpu)
{
if (cpu != WORK_CPU_UNBOUND)
Expand All @@ -464,6 +458,11 @@ static struct global_cwq *get_gcwq(unsigned int cpu)
return &unbound_global_cwq;
}

static int std_worker_pool_pri(struct worker_pool *pool)
{
return pool - get_gcwq(pool->cpu)->pools;
}

/* allocate ID and assign it to @pool */
static int worker_pool_assign_id(struct worker_pool *pool)
{
Expand Down Expand Up @@ -3818,7 +3817,6 @@ static int __init init_workqueues(void)
struct worker_pool *pool;

for_each_std_worker_pool(pool, cpu) {
pool->gcwq = get_gcwq(cpu);
spin_lock_init(&pool->lock);
pool->cpu = cpu;
pool->flags |= POOL_DISASSOCIATED;
Expand Down

0 comments on commit af33441

Please sign in to comment.