mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-20 14:13:09 +00:00
parent
84c31a7ea1
commit
1571e09823
@ -196,6 +196,19 @@ namespace Genode {
|
|||||||
Lock::Guard lock_guard(_lock);
|
Lock::Guard lock_guard(_lock);
|
||||||
return (OBJ_TYPE *)_tree.first();
|
return (OBJ_TYPE *)_tree.first();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return first element of tree locked
|
||||||
|
*
|
||||||
|
* This function is used for removing tree elements step by step.
|
||||||
|
*/
|
||||||
|
OBJ_TYPE *first_locked()
|
||||||
|
{
|
||||||
|
Lock::Guard lock_guard(_lock);
|
||||||
|
OBJ_TYPE * const obj_typed = (OBJ_TYPE *)_tree.first();
|
||||||
|
obj_typed->lock();
|
||||||
|
return obj_typed;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user