示例#1
0
/**
 *  @author Louis Rilling
 */
static int task_remove_object(void *object,
			      struct kddm_set *set, objid_t objid)
{
	struct task_kddm_object *obj = object;

	krg_task_unlink(obj, 0);

#ifdef CONFIG_KRG_EPM
	rcu_read_lock();
	krg_pid_unlink_task(rcu_dereference(obj->pid_obj));
	rcu_read_unlock();
	BUG_ON(obj->pid_obj);
#endif

	obj->alive = 0;
	call_rcu(&obj->rcu, delayed_task_put);

	return 0;
}
示例#2
0
static int pid_remove_object(void *object,
			     struct kddm_set *set, objid_t objid)
{
	struct pid_kddm_object *obj = object;
	struct pid *pid = obj->pid;

	spin_lock(&pid_kddm_lock);
	pid->kddm_obj = NULL;
	obj->pid = NULL;
	spin_unlock(&pid_kddm_lock);
	free_pid(pid);

	rcu_read_lock();
	krg_pid_unlink_task(obj);
	rcu_read_unlock();

	call_rcu(&obj->rcu, delayed_pid_free);

	return 0;
}