~ubuntu-branches/ubuntu/wily/spl-linux/wily

« back to all changes in this revision

Viewing changes to module/splat/splat-taskq.c

  • Committer: Package Import Robot
  • Author(s): Liang Guo
  • Date: 2014-07-31 15:16:53 UTC
  • Revision ID: package-import@ubuntu.com-20140731151653-tgao12alohj26jcs
Tags: upstream-0.6.3+git20140731
ImportĀ upstreamĀ versionĀ 0.6.3+git20140731

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
        atomic_t *count;
83
83
        int order[SPLAT_TASKQ_ORDER_MAX];
84
84
        unsigned int depth;
85
 
        unsigned long expire;
 
85
        clock_t expire;
86
86
        taskq_t *tq;
87
87
        taskq_ent_t *tqe;
88
88
        spinlock_t lock;
1140
1140
        splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg;
1141
1141
        ASSERT(tq_arg);
1142
1142
 
1143
 
        if (ddi_get_lbolt() >= tq_arg->expire)
 
1143
        if (ddi_time_after_eq(ddi_get_lbolt(), tq_arg->expire))
1144
1144
                atomic_inc(tq_arg->count);
1145
1145
 
1146
1146
        kmem_free(tq_arg, sizeof(splat_taskq_arg_t));
1228
1228
        splat_taskq_arg_t *tq_arg = (splat_taskq_arg_t *)arg;
1229
1229
        uint8_t rnd;
1230
1230
 
1231
 
        if (ddi_get_lbolt() >= tq_arg->expire)
 
1231
        if (ddi_time_after_eq(ddi_get_lbolt(), tq_arg->expire))
1232
1232
                atomic_inc(tq_arg->count);
1233
1233
 
1234
1234
        /* Randomly sleep to further perturb the system */
1249
1249
        int canceled = 0;
1250
1250
        int completed = 0;
1251
1251
        int blocked = 0;
1252
 
        unsigned long start, cancel;
 
1252
        clock_t start, cancel;
1253
1253
 
1254
1254
        tqas = vmalloc(sizeof(*tqas) * nr_tasks);
1255
1255
        if (tqas == NULL)
1327
1327
        start = ddi_get_lbolt();
1328
1328
        i = 0;
1329
1329
 
1330
 
        while (ddi_get_lbolt() < start + 5 * HZ) {
 
1330
        while (ddi_time_before(ddi_get_lbolt(), start + 5 * HZ)) {
1331
1331
                taskqid_t id;
1332
1332
                uint32_t rnd;
1333
1333