lkml.org 
[lkml]   [2011]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 2.6.39-rc1-tip 6/26] 6: Uprobes: register/unregister probes.
From
Date
On Fri, 2011-04-01 at 20:03 +0530, Srikar Dronamraju wrote:
> +static int remove_uprobe(struct mm_struct *mm, struct uprobe *uprobe)
> +{
> + int ret = 0;
> +
> + /*TODO: remove breakpoint */
> + if (!ret)
> + atomic_dec(&mm->uprobes_count);
> +
> + return ret;
> +}

> +static void delete_uprobe(struct mm_struct *mm, struct uprobe *uprobe)
> +{
> + down_read(&mm->mmap_sem);
> + remove_uprobe(mm, uprobe);
> + list_del(&mm->uprobes_list);
> + up_read(&mm->mmap_sem);
> + mmput(mm);
> +}

> +static void erase_uprobe(struct uprobe *uprobe)
> +{
> + unsigned long flags;
> +
> + synchronize_sched();
> + spin_lock_irqsave(&treelock, flags);
> + rb_erase(&uprobe->rb_node, &uprobes_tree);
> + spin_unlock_irqrestore(&treelock, flags);
> + iput(uprobe->inode);
> +}

remove,delete,erase.. head spins.. ;-)




\
 
 \ /
  Last update: 2011-04-18 14:23    [W:0.289 / U:5.856 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site