Lines Matching refs:rhbeat
433 struct ibmasmfs_heartbeat_data *rhbeat; in r_heartbeat_file_open() local
438 rhbeat = kmalloc(sizeof(struct ibmasmfs_heartbeat_data), GFP_KERNEL); in r_heartbeat_file_open()
439 if (!rhbeat) in r_heartbeat_file_open()
442 rhbeat->sp = inode->i_private; in r_heartbeat_file_open()
443 rhbeat->active = 0; in r_heartbeat_file_open()
444 ibmasm_init_reverse_heartbeat(rhbeat->sp, &rhbeat->heartbeat); in r_heartbeat_file_open()
445 file->private_data = rhbeat; in r_heartbeat_file_open()
451 struct ibmasmfs_heartbeat_data *rhbeat = file->private_data; in r_heartbeat_file_close() local
453 kfree(rhbeat); in r_heartbeat_file_close()
459 struct ibmasmfs_heartbeat_data *rhbeat = file->private_data; in r_heartbeat_file_read() local
471 spin_lock_irqsave(&rhbeat->sp->lock, flags); in r_heartbeat_file_read()
472 if (rhbeat->active) { in r_heartbeat_file_read()
473 spin_unlock_irqrestore(&rhbeat->sp->lock, flags); in r_heartbeat_file_read()
476 rhbeat->active = 1; in r_heartbeat_file_read()
477 spin_unlock_irqrestore(&rhbeat->sp->lock, flags); in r_heartbeat_file_read()
479 result = ibmasm_start_reverse_heartbeat(rhbeat->sp, &rhbeat->heartbeat); in r_heartbeat_file_read()
480 rhbeat->active = 0; in r_heartbeat_file_read()
487 struct ibmasmfs_heartbeat_data *rhbeat = file->private_data; in r_heartbeat_file_write() local
496 if (rhbeat->active) in r_heartbeat_file_write()
497 ibmasm_stop_reverse_heartbeat(&rhbeat->heartbeat); in r_heartbeat_file_write()