workqueue: include workqueue info when printing debug dump of a worker task
[linux-2.6-block.git] / include / linux / workqueue.h
index 7179756393781e3346d5a6ee7445403a63590f3f..623488fdc1f5ee6cf24f3745902c4b95c1f5417d 100644 (file)
@@ -92,6 +92,9 @@ enum {
        /* bit mask for work_busy() return values */
        WORK_BUSY_PENDING       = 1 << 0,
        WORK_BUSY_RUNNING       = 1 << 1,
+
+       /* maximum string length for set_worker_desc() */
+       WORKER_DESC_LEN         = 24,
 };
 
 struct work_struct {
@@ -447,6 +450,8 @@ extern void workqueue_set_max_active(struct workqueue_struct *wq,
 extern bool current_is_workqueue_rescuer(void);
 extern bool workqueue_congested(int cpu, struct workqueue_struct *wq);
 extern unsigned int work_busy(struct work_struct *work);
+extern __printf(1, 2) void set_worker_desc(const char *fmt, ...);
+extern void print_worker_info(const char *log_lvl, struct task_struct *task);
 
 /**
  * queue_work - queue work on a workqueue