Ignore:
Timestamp:
Jul 22, 2010, 7:29:34 PM (15 years ago)
Author:
David Azarewicz
Message:

flush_workqueue hack, misc code cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-2.1.x/lib32/misc.c

    r519 r523  
    269269void flush_workqueue(struct workqueue_struct *wq)
    270270{
     271        short sDAZ;
     272
    271273        if (wq->task == current) {
    272274                run_workqueue(wq);
     
    278280                spin_lock_irq(&wq->lock);
    279281                add_wait_queue(&wq->work_done, &wait);
     282                sDAZ = 0;
    280283                while (!list_empty(&wq->worklist)) {
     284                        if (sDAZ++ > 20) { // Temporary hack to prevent system hangs
     285                                rprintf(("flush_workqueue: can't empty list"));
     286                                break;
     287                        }                       
    281288                        spin_unlock_irq(&wq->lock);
    282                         schedule();
     289                        schedule();  // DAZ system hangs here because this function does nothing
    283290                        spin_lock_irq(&wq->lock);
    284291                }
Note: See TracChangeset for help on using the changeset viewer.