Пример #1
0
void vtime_guest_exit(struct task_struct *tsk)
{
    write_seqlock(&tsk->vtime_seqlock);
    __vtime_account_system(tsk);
    current->flags &= ~PF_VCPU;
    write_sequnlock(&tsk->vtime_seqlock);
}
Пример #2
0
void vtime_account_system(struct task_struct *tsk)
{
	unsigned long flags;

	local_irq_save(flags);
	__vtime_account_system(tsk);
	local_irq_restore(flags);
}
Пример #3
0
void vtime_account_system(struct task_struct *tsk)
{
    if (!vtime_accounting_enabled())
        return;

    write_seqlock(&tsk->vtime_seqlock);
    __vtime_account_system(tsk);
    write_sequnlock(&tsk->vtime_seqlock);
}
Пример #4
0
void vtime_user_enter(struct task_struct *tsk)
{
    if (!vtime_accounting_enabled())
        return;

    write_seqlock(&tsk->vtime_seqlock);
    tsk->vtime_snap_whence = VTIME_USER;
    __vtime_account_system(tsk);
    write_sequnlock(&tsk->vtime_seqlock);
}
Пример #5
0
void vtime_account_irq_exit(struct task_struct *tsk)
{
    if (!vtime_accounting_enabled())
        return;

    write_seqlock(&tsk->vtime_seqlock);
    if (context_tracking_in_user())
        tsk->vtime_snap_whence = VTIME_USER;
    __vtime_account_system(tsk);
    write_sequnlock(&tsk->vtime_seqlock);
}
Пример #6
0
void vtime_account(struct task_struct *tsk)
{
	unsigned long flags;

	local_irq_save(flags);

	if (in_interrupt() || !is_idle_task(tsk))
		__vtime_account_system(tsk);
	else
		__vtime_account_idle(tsk);

	local_irq_restore(flags);
}