Skip to content

Commit

Permalink
workqueue: relocate global variable defs and function decls in workqu…
Browse files Browse the repository at this point in the history
…eue.c

They're split across debugobj code for some reason.  Collect them.

This patch is pure relocation.

Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Tejun Heo committed Mar 14, 2013
1 parent cd54968 commit 7d19c5c
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,21 @@ struct workqueue_struct {

static struct kmem_cache *pwq_cache;

/* Serializes the accesses to the list of workqueues. */
static DEFINE_SPINLOCK(workqueue_lock);
static LIST_HEAD(workqueues);
static bool workqueue_freezing; /* W: have wqs started freezing? */

/* the per-cpu worker pools */
static DEFINE_PER_CPU_SHARED_ALIGNED(struct worker_pool [NR_STD_WORKER_POOLS],
cpu_worker_pools);

/*
* R: idr of all pools. Modifications are protected by workqueue_lock.
* Read accesses are protected by sched-RCU protected.
*/
static DEFINE_IDR(worker_pool_idr);

/* W: hash of all unbound pools keyed by pool->attrs */
static DEFINE_HASHTABLE(unbound_pool_hash, UNBOUND_POOL_HASH_ORDER);

Expand All @@ -265,6 +280,10 @@ EXPORT_SYMBOL_GPL(system_unbound_wq);
struct workqueue_struct *system_freezable_wq __read_mostly;
EXPORT_SYMBOL_GPL(system_freezable_wq);

static int worker_thread(void *__worker);
static void copy_workqueue_attrs(struct workqueue_attrs *to,
const struct workqueue_attrs *from);

#define CREATE_TRACE_POINTS
#include <trace/events/workqueue.h>

Expand Down Expand Up @@ -431,25 +450,6 @@ static inline void debug_work_activate(struct work_struct *work) { }
static inline void debug_work_deactivate(struct work_struct *work) { }
#endif

/* Serializes the accesses to the list of workqueues. */
static DEFINE_SPINLOCK(workqueue_lock);
static LIST_HEAD(workqueues);
static bool workqueue_freezing; /* W: have wqs started freezing? */

/* the per-cpu worker pools */
static DEFINE_PER_CPU_SHARED_ALIGNED(struct worker_pool [NR_STD_WORKER_POOLS],
cpu_worker_pools);

/*
* R: idr of all pools. Modifications are protected by workqueue_lock.
* Read accesses are protected by sched-RCU protected.
*/
static DEFINE_IDR(worker_pool_idr);

static int worker_thread(void *__worker);
static void copy_workqueue_attrs(struct workqueue_attrs *to,
const struct workqueue_attrs *from);

/* allocate ID and assign it to @pool */
static int worker_pool_assign_id(struct worker_pool *pool)
{
Expand Down

0 comments on commit 7d19c5c

Please sign in to comment.