thi 247 drivers/block/drbd/drbd_int.h static inline enum drbd_thread_state get_t_state(struct drbd_thread *thi) thi 254 drivers/block/drbd/drbd_int.h return thi->t_state; thi 1071 drivers/block/drbd/drbd_int.h extern int drbd_thread_start(struct drbd_thread *thi); thi 1072 drivers/block/drbd/drbd_int.h extern void _drbd_thread_stop(struct drbd_thread *thi, int restart, int wait); thi 1074 drivers/block/drbd/drbd_int.h extern void drbd_thread_current_set_cpu(struct drbd_thread *thi); thi 1494 drivers/block/drbd/drbd_int.h extern int drbd_worker(struct drbd_thread *thi); thi 1549 drivers/block/drbd/drbd_int.h extern int drbd_receiver(struct drbd_thread *thi); thi 1550 drivers/block/drbd/drbd_int.h extern int drbd_ack_receiver(struct drbd_thread *thi); thi 1986 drivers/block/drbd/drbd_int.h static inline void drbd_thread_stop(struct drbd_thread *thi) thi 1988 drivers/block/drbd/drbd_int.h _drbd_thread_stop(thi, false, true); thi 1991 drivers/block/drbd/drbd_int.h static inline void drbd_thread_stop_nowait(struct drbd_thread *thi) thi 1993 drivers/block/drbd/drbd_int.h _drbd_thread_stop(thi, false, false); thi 1996 drivers/block/drbd/drbd_int.h static inline void drbd_thread_restart_nowait(struct drbd_thread *thi) thi 1998 drivers/block/drbd/drbd_int.h _drbd_thread_stop(thi, true, false); thi 316 drivers/block/drbd/drbd_main.c struct drbd_thread *thi = (struct drbd_thread *) arg; thi 317 drivers/block/drbd/drbd_main.c struct drbd_resource *resource = thi->resource; thi 322 drivers/block/drbd/drbd_main.c thi->name[0], thi 328 drivers/block/drbd/drbd_main.c retval = thi->function(thi); thi 330 drivers/block/drbd/drbd_main.c spin_lock_irqsave(&thi->t_lock, flags); thi 342 drivers/block/drbd/drbd_main.c if (thi->t_state == RESTARTING) { thi 343 drivers/block/drbd/drbd_main.c drbd_info(resource, "Restarting %s thread\n", thi->name); thi 344 drivers/block/drbd/drbd_main.c thi->t_state = RUNNING; thi 345 drivers/block/drbd/drbd_main.c spin_unlock_irqrestore(&thi->t_lock, flags); thi 349 drivers/block/drbd/drbd_main.c thi->task = NULL; thi 350 drivers/block/drbd/drbd_main.c thi->t_state = NONE; thi 352 drivers/block/drbd/drbd_main.c complete_all(&thi->stop); thi 353 drivers/block/drbd/drbd_main.c spin_unlock_irqrestore(&thi->t_lock, flags); thi 359 drivers/block/drbd/drbd_main.c if (thi->connection) thi 360 drivers/block/drbd/drbd_main.c kref_put(&thi->connection->kref, drbd_destroy_connection); thi 366 drivers/block/drbd/drbd_main.c static void drbd_thread_init(struct drbd_resource *resource, struct drbd_thread *thi, thi 369 drivers/block/drbd/drbd_main.c spin_lock_init(&thi->t_lock); thi 370 drivers/block/drbd/drbd_main.c thi->task = NULL; thi 371 drivers/block/drbd/drbd_main.c thi->t_state = NONE; thi 372 drivers/block/drbd/drbd_main.c thi->function = func; thi 373 drivers/block/drbd/drbd_main.c thi->resource = resource; thi 374 drivers/block/drbd/drbd_main.c thi->connection = NULL; thi 375 drivers/block/drbd/drbd_main.c thi->name = name; thi 378 drivers/block/drbd/drbd_main.c int drbd_thread_start(struct drbd_thread *thi) thi 380 drivers/block/drbd/drbd_main.c struct drbd_resource *resource = thi->resource; thi 386 drivers/block/drbd/drbd_main.c spin_lock_irqsave(&thi->t_lock, flags); thi 388 drivers/block/drbd/drbd_main.c switch (thi->t_state) { thi 391 drivers/block/drbd/drbd_main.c thi->name, current->comm, current->pid); thi 396 drivers/block/drbd/drbd_main.c spin_unlock_irqrestore(&thi->t_lock, flags); thi 401 drivers/block/drbd/drbd_main.c if (thi->connection) thi 402 drivers/block/drbd/drbd_main.c kref_get(&thi->connection->kref); thi 404 drivers/block/drbd/drbd_main.c init_completion(&thi->stop); thi 405 drivers/block/drbd/drbd_main.c thi->reset_cpu_mask = 1; thi 406 drivers/block/drbd/drbd_main.c thi->t_state = RUNNING; thi 407 drivers/block/drbd/drbd_main.c spin_unlock_irqrestore(&thi->t_lock, flags); thi 410 drivers/block/drbd/drbd_main.c nt = kthread_create(drbd_thread_setup, (void *) thi, thi 411 drivers/block/drbd/drbd_main.c "drbd_%c_%s", thi->name[0], thi->resource->name); thi 416 drivers/block/drbd/drbd_main.c if (thi->connection) thi 417 drivers/block/drbd/drbd_main.c kref_put(&thi->connection->kref, drbd_destroy_connection); thi 422 drivers/block/drbd/drbd_main.c spin_lock_irqsave(&thi->t_lock, flags); thi 423 drivers/block/drbd/drbd_main.c thi->task = nt; thi 424 drivers/block/drbd/drbd_main.c thi->t_state = RUNNING; thi 425 drivers/block/drbd/drbd_main.c spin_unlock_irqrestore(&thi->t_lock, flags); thi 429 drivers/block/drbd/drbd_main.c thi->t_state = RESTARTING; thi 431 drivers/block/drbd/drbd_main.c thi->name, current->comm, current->pid); thi 436 drivers/block/drbd/drbd_main.c spin_unlock_irqrestore(&thi->t_lock, flags); thi 444 drivers/block/drbd/drbd_main.c void _drbd_thread_stop(struct drbd_thread *thi, int restart, int wait) thi 451 drivers/block/drbd/drbd_main.c spin_lock_irqsave(&thi->t_lock, flags); thi 453 drivers/block/drbd/drbd_main.c if (thi->t_state == NONE) { thi 454 drivers/block/drbd/drbd_main.c spin_unlock_irqrestore(&thi->t_lock, flags); thi 456 drivers/block/drbd/drbd_main.c drbd_thread_start(thi); thi 460 drivers/block/drbd/drbd_main.c if (thi->t_state != ns) { thi 461 drivers/block/drbd/drbd_main.c if (thi->task == NULL) { thi 462 drivers/block/drbd/drbd_main.c spin_unlock_irqrestore(&thi->t_lock, flags); thi 466 drivers/block/drbd/drbd_main.c thi->t_state = ns; thi 468 drivers/block/drbd/drbd_main.c init_completion(&thi->stop); thi 469 drivers/block/drbd/drbd_main.c if (thi->task != current) thi 470 drivers/block/drbd/drbd_main.c send_sig(DRBD_SIGKILL, thi->task, 1); thi 473 drivers/block/drbd/drbd_main.c spin_unlock_irqrestore(&thi->t_lock, flags); thi 476 drivers/block/drbd/drbd_main.c wait_for_completion(&thi->stop); thi 539 drivers/block/drbd/drbd_main.c void drbd_thread_current_set_cpu(struct drbd_thread *thi) thi 541 drivers/block/drbd/drbd_main.c struct drbd_resource *resource = thi->resource; thi 544 drivers/block/drbd/drbd_main.c if (!thi->reset_cpu_mask) thi 546 drivers/block/drbd/drbd_main.c thi->reset_cpu_mask = 0; thi 5590 drivers/block/drbd/drbd_receiver.c int drbd_receiver(struct drbd_thread *thi) thi 5592 drivers/block/drbd/drbd_receiver.c struct drbd_connection *connection = thi->connection; thi 6010 drivers/block/drbd/drbd_receiver.c int drbd_ack_receiver(struct drbd_thread *thi) thi 6012 drivers/block/drbd/drbd_receiver.c struct drbd_connection *connection = thi->connection; thi 6028 drivers/block/drbd/drbd_receiver.c while (get_t_state(thi) == RUNNING) { thi 6029 drivers/block/drbd/drbd_receiver.c drbd_thread_current_set_cpu(thi); thi 2162 drivers/block/drbd/drbd_worker.c int drbd_worker(struct drbd_thread *thi) thi 2164 drivers/block/drbd/drbd_worker.c struct drbd_connection *connection = thi->connection; thi 2170 drivers/block/drbd/drbd_worker.c while (get_t_state(thi) == RUNNING) { thi 2171 drivers/block/drbd/drbd_worker.c drbd_thread_current_set_cpu(thi); thi 2185 drivers/block/drbd/drbd_worker.c if (get_t_state(thi) == RUNNING) { thi 2192 drivers/block/drbd/drbd_worker.c if (get_t_state(thi) != RUNNING) thi 435 drivers/i2c/algos/i2c-algo-pca.c int tlow, thi; thi 490 drivers/i2c/algos/i2c-algo-pca.c thi = 1000000 - clock * raise_fall_time; thi 491 drivers/i2c/algos/i2c-algo-pca.c thi /= (I2C_PCA_OSC_PER * clock) - tlow; thi 495 drivers/i2c/algos/i2c-algo-pca.c thi = tlow * min_thi / min_tlow; thi 508 drivers/i2c/algos/i2c-algo-pca.c pca_outw(pca_data, I2C_PCA_IND, thi); thi 3824 drivers/infiniband/hw/cxgb4/cm.c u64 thi = be64_to_cpu(tcb[((31 - word) / 2) - 1]); thi 3828 drivers/infiniband/hw/cxgb4/cm.c t = (thi << shift) | (tlo >> shift);