Lines Matching refs:rhbeat
428 struct ibmasmfs_heartbeat_data *rhbeat; in r_heartbeat_file_open() local
433 rhbeat = kmalloc(sizeof(struct ibmasmfs_heartbeat_data), GFP_KERNEL); in r_heartbeat_file_open()
434 if (!rhbeat) in r_heartbeat_file_open()
437 rhbeat->sp = inode->i_private; in r_heartbeat_file_open()
438 rhbeat->active = 0; in r_heartbeat_file_open()
439 ibmasm_init_reverse_heartbeat(rhbeat->sp, &rhbeat->heartbeat); in r_heartbeat_file_open()
440 file->private_data = rhbeat; in r_heartbeat_file_open()
446 struct ibmasmfs_heartbeat_data *rhbeat = file->private_data; in r_heartbeat_file_close() local
448 kfree(rhbeat); in r_heartbeat_file_close()
454 struct ibmasmfs_heartbeat_data *rhbeat = file->private_data; in r_heartbeat_file_read() local
466 spin_lock_irqsave(&rhbeat->sp->lock, flags); in r_heartbeat_file_read()
467 if (rhbeat->active) { in r_heartbeat_file_read()
468 spin_unlock_irqrestore(&rhbeat->sp->lock, flags); in r_heartbeat_file_read()
471 rhbeat->active = 1; in r_heartbeat_file_read()
472 spin_unlock_irqrestore(&rhbeat->sp->lock, flags); in r_heartbeat_file_read()
474 result = ibmasm_start_reverse_heartbeat(rhbeat->sp, &rhbeat->heartbeat); in r_heartbeat_file_read()
475 rhbeat->active = 0; in r_heartbeat_file_read()
482 struct ibmasmfs_heartbeat_data *rhbeat = file->private_data; in r_heartbeat_file_write() local
491 if (rhbeat->active) in r_heartbeat_file_write()
492 ibmasm_stop_reverse_heartbeat(&rhbeat->heartbeat); in r_heartbeat_file_write()