Subversion Repositories Kolibri OS

Rev

Rev 3263 | Rev 3277 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3263 Rev 3266
Line 1339... Line 1339...
1339
void __stdcall run_workqueue(struct workqueue_struct *cwq)
1339
void __stdcall run_workqueue(struct workqueue_struct *cwq)
1340
{
1340
{
1341
    unsigned long irqflags;
1341
    unsigned long irqflags;
Line 1342... Line 1342...
1342
 
1342
 
1343
    dbgprintf("wq: %x head %x, next %x\n",
1343
//    dbgprintf("wq: %x head %x, next %x\n",
Line 1344... Line 1344...
1344
               cwq, &cwq->worklist, cwq->worklist.next);
1344
//               cwq, &cwq->worklist, cwq->worklist.next);
Line 1345... Line 1345...
1345
 
1345
 
1346
    spin_lock_irqsave(&cwq->lock, irqflags);
1346
    spin_lock_irqsave(&cwq->lock, irqflags);
1347
 
1347
 
1348
    while (!list_empty(&cwq->worklist))
1348
    while (!list_empty(&cwq->worklist))
1349
    {
1349
    {
1350
        struct work_struct *work = list_entry(cwq->worklist.next,
1350
        struct work_struct *work = list_entry(cwq->worklist.next,
1351
                                        struct work_struct, entry);
1351
                                        struct work_struct, entry);
1352
        work_func_t f = work->func;
1352
        work_func_t f = work->func;
Line 1353... Line 1353...
1353
        list_del_init(cwq->worklist.next);
1353
        list_del_init(cwq->worklist.next);
1354
        dbgprintf("head %x, next %x\n",
1354
//        dbgprintf("head %x, next %x\n",
1355
                  &cwq->worklist, cwq->worklist.next);
1355
//                  &cwq->worklist, cwq->worklist.next);
1356
 
1356
 
Line 1368... Line 1368...
1368
                         struct work_struct *work)
1368
                         struct work_struct *work)
1369
{
1369
{
1370
    unsigned long flags;
1370
    unsigned long flags;
1371
 
1371
 
Line 1372... Line 1372...
1372
    dbgprintf("wq: %x, work: %x\n",
1372
//    dbgprintf("wq: %x, work: %x\n",
1373
               wq, work );
1373
//               wq, work );
Line 1374... Line 1374...
1374
 
1374
 
1375
    if(!list_empty(&work->entry))
1375
    if(!list_empty(&work->entry))
Line 1376... Line 1376...
1376
        return 0;
1376
        return 0;
Line 1382... Line 1382...
1382
 
1382
 
Line 1383... Line 1383...
1383
    list_add_tail(&work->entry, &wq->worklist);
1383
    list_add_tail(&work->entry, &wq->worklist);
Line 1384... Line 1384...
1384
 
1384
 
1385
    spin_unlock_irqrestore(&wq->lock, flags);
1385
    spin_unlock_irqrestore(&wq->lock, flags);
1386
   dbgprintf("wq: %x head %x, next %x\n",
1386
//    dbgprintf("wq: %x head %x, next %x\n",
Line 1387... Line 1387...
1387
               wq, &wq->worklist, wq->worklist.next);
1387
//               wq, &wq->worklist, wq->worklist.next);
1388
 
1388
 
Line 1389... Line 1389...
1389
    return 1;
1389
    return 1;
1390
};
1390
};
1391
 
1391
 
1392
void __stdcall delayed_work_timer_fn(unsigned long __data)
1392
void __stdcall delayed_work_timer_fn(unsigned long __data)
Line 1393... Line 1393...
1393
{
1393
{
1394
    struct delayed_work *dwork = (struct delayed_work *)__data;
1394
    struct delayed_work *dwork = (struct delayed_work *)__data;
Line 1395... Line 1395...
1395
    struct workqueue_struct *wq = dwork->work.data;
1395
    struct workqueue_struct *wq = dwork->work.data;
1396
 
1396
 
Line 1415... Line 1415...
1415
                        struct delayed_work *dwork, unsigned long delay)
1415
                        struct delayed_work *dwork, unsigned long delay)
1416
{
1416
{
1417
    u32  flags;
1417
    u32  flags;
1418
 
1418
 
Line 1419... Line 1419...
1419
   dbgprintf("wq: %x, work: %x\n",
1419
//    dbgprintf("wq: %x, work: %x\n",
1420
               wq, &dwork->work );
1420
//               wq, &dwork->work );
Line 1421... Line 1421...
1421
 
1421
 
1422
    if (delay == 0)
1422
    if (delay == 0)
Line 1423... Line 1423...
1423
        return __queue_work(wq, &dwork->work);
1423
        return __queue_work(wq, &dwork->work);