Lines Matching refs:switch_log
2371 return (ctx->switch_log->head - ctx->switch_log->tail) % in spufs_switch_log_used()
2389 if (ctx->switch_log) { in spufs_switch_log_open()
2394 ctx->switch_log = kmalloc(sizeof(struct switch_log) + in spufs_switch_log_open()
2398 if (!ctx->switch_log) { in spufs_switch_log_open()
2403 ctx->switch_log->head = ctx->switch_log->tail = 0; in spufs_switch_log_open()
2404 init_waitqueue_head(&ctx->switch_log->wait); in spufs_switch_log_open()
2421 kfree(ctx->switch_log); in spufs_switch_log_release()
2422 ctx->switch_log = NULL; in spufs_switch_log_release()
2432 p = ctx->switch_log->log + ctx->switch_log->tail % SWITCH_LOG_BUFSIZE; in switch_log_sprint()
2477 error = spufs_wait(ctx->switch_log->wait, in spufs_switch_log_read()
2495 ctx->switch_log->tail = in spufs_switch_log_read()
2496 (ctx->switch_log->tail + 1) % in spufs_switch_log_read()
2521 poll_wait(file, &ctx->switch_log->wait, wait); in spufs_switch_log_poll()
2551 if (!ctx->switch_log) in spu_switch_log_notify()
2557 p = ctx->switch_log->log + ctx->switch_log->head; in spu_switch_log_notify()
2564 ctx->switch_log->head = in spu_switch_log_notify()
2565 (ctx->switch_log->head + 1) % SWITCH_LOG_BUFSIZE; in spu_switch_log_notify()
2568 wake_up(&ctx->switch_log->wait); in spu_switch_log_notify()