X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Fklnds%2Fo2iblnd%2Fo2iblnd.h;h=26956a37677c36912a558cc79152aecb709156c3;hb=9976d2c35d40a1709c3539aed76033124e88040e;hp=652c798505e3065efd12c8fe0ccb6df179ac1d1a;hpb=a39f07804153f4f120727a4decbece5db0ef5bef;p=fs%2Flustre-release.git diff --git a/lnet/klnds/o2iblnd/o2iblnd.h b/lnet/klnds/o2iblnd/o2iblnd.h index 652c798..26956a3 100644 --- a/lnet/klnds/o2iblnd/o2iblnd.h +++ b/lnet/klnds/o2iblnd/o2iblnd.h @@ -1093,7 +1093,15 @@ int kiblnd_tunables_init(void); int kiblnd_connd (void *arg); int kiblnd_scheduler(void *arg); -int kiblnd_thread_start(int (*fn)(void *arg), void *arg, char *name); +#define kiblnd_thread_start(fn, data, namefmt, arg...) \ + ({ \ + struct task_struct *__task = kthread_run(fn, data, \ + namefmt, ##arg); \ + if (!IS_ERR(__task)) \ + atomic_inc(&kiblnd_data.kib_nthreads); \ + PTR_ERR_OR_ZERO(__task); \ + }) + int kiblnd_failover_thread (void *arg); int kiblnd_alloc_pages(struct kib_pages **pp, int cpt, int npages);